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)
|
|
|
|
mlir_tablegen(ToyCombine.inc -gen-rewriters "-I${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
|
|
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
|
|
|
|
MLIRCallOpInterfacesIncGen
|
2019-04-09 14:00:49 +08:00
|
|
|
)
|
2019-10-17 08:33:34 +08:00
|
|
|
|
2019-04-09 14:00:49 +08:00
|
|
|
include_directories(include/)
|
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
|
|
|
|
MLIRIR
|
|
|
|
MLIRParser
|
|
|
|
MLIRPass
|
2019-10-17 08:33:34 +08:00
|
|
|
MLIRTransforms)
|