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-16 06:09:45 +08:00
|
|
|
add_subdirectory(include)
|
|
|
|
|
2019-04-04 09:45:01 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
Support
|
|
|
|
)
|
|
|
|
|
2019-10-16 02:40:12 +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-16 02:40:12 +08:00
|
|
|
add_public_tablegen_target(ToyCh3CombineIncGen)
|
|
|
|
|
2019-04-04 09:45:01 +08:00
|
|
|
add_toy_chapter(toyc-ch3
|
|
|
|
toyc.cpp
|
|
|
|
parser/AST.cpp
|
|
|
|
mlir/MLIRGen.cpp
|
2019-10-16 02:40:12 +08:00
|
|
|
mlir/Dialect.cpp
|
|
|
|
mlir/ToyCombine.cpp
|
2020-02-21 02:48:51 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
ToyCh3OpsIncGen
|
|
|
|
ToyCh3CombineIncGen
|
2019-04-04 09:45:01 +08:00
|
|
|
)
|
2019-10-16 02:40:12 +08:00
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
|
2019-04-04 09:45:01 +08:00
|
|
|
target_link_libraries(toyc-ch3
|
|
|
|
PRIVATE
|
|
|
|
MLIRAnalysis
|
|
|
|
MLIRIR
|
|
|
|
MLIRParser
|
2019-10-16 02:40:12 +08:00
|
|
|
MLIRPass
|
2020-05-14 01:27:19 +08:00
|
|
|
MLIRSideEffectInterfaces
|
2019-04-04 09:45:01 +08:00
|
|
|
MLIRTransforms)
|
2019-10-16 02:40:12 +08:00
|
|
|
|