2020-05-13 23:57:25 +08:00
|
|
|
# For a better template to copy, see examples/standalone
|
2020-04-01 02:45:59 +08:00
|
|
|
include_directories(include)
|
2019-10-17 08:33:34 +08:00
|
|
|
add_subdirectory(include)
|
|
|
|
|
2019-04-09 14:00:49 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2019-10-17 08:33:34 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS mlir/ToyCombine.td)
|
2020-04-01 02:45:59 +08:00
|
|
|
mlir_tablegen(ToyCombine.inc -gen-rewriters)
|
2019-10-17 08:33:34 +08:00
|
|
|
add_public_tablegen_target(ToyCh5CombineIncGen)
|
|
|
|
|
2019-04-09 14:00:49 +08:00
|
|
|
add_toy_chapter(toyc-ch5
|
|
|
|
toyc.cpp
|
|
|
|
parser/AST.cpp
|
|
|
|
mlir/MLIRGen.cpp
|
2019-10-17 08:33:34 +08:00
|
|
|
mlir/Dialect.cpp
|
|
|
|
mlir/LowerToAffineLoops.cpp
|
2019-04-09 14:00:49 +08:00
|
|
|
mlir/ShapeInferencePass.cpp
|
|
|
|
mlir/ToyCombine.cpp
|
2020-02-21 02:48:51 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
ToyCh5ShapeInferenceInterfaceIncGen
|
|
|
|
ToyCh5OpsIncGen
|
|
|
|
ToyCh5CombineIncGen
|
2019-04-09 14:00:49 +08:00
|
|
|
)
|
2019-10-17 08:33:34 +08:00
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
2020-02-27 03:50:03 +08:00
|
|
|
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
|
2019-04-09 14:00:49 +08:00
|
|
|
target_link_libraries(toyc-ch5
|
|
|
|
PRIVATE
|
2020-02-27 03:50:03 +08:00
|
|
|
${dialect_libs}
|
2019-04-09 14:00:49 +08:00
|
|
|
MLIRAnalysis
|
2020-03-11 03:20:24 +08:00
|
|
|
MLIRCallInterfaces
|
2021-01-21 08:17:13 +08:00
|
|
|
MLIRCastInterfaces
|
2019-04-09 14:00:49 +08:00
|
|
|
MLIRIR
|
|
|
|
MLIRParser
|
|
|
|
MLIRPass
|
2020-05-14 01:27:19 +08:00
|
|
|
MLIRSideEffectInterfaces
|
2020-02-28 06:53:12 +08:00
|
|
|
MLIRSupport
|
2019-10-17 08:33:34 +08:00
|
|
|
MLIRTransforms)
|