feat: toy tutorial chapter 3.

Signed-off-by: jackfiled <xcrenchangjun@outlook.com>
This commit is contained in:
2025-06-02 17:22:53 +08:00
parent 8d2f844e2b
commit eacf20fe3c
7 changed files with 157 additions and 31 deletions

View File

@@ -30,16 +30,22 @@ include_directories(include)
include_directories(${CMAKE_BINARY_DIR}/include)
add_subdirectory(include)
set(LLVM_TARGET_DEFINITIONS lib/HelloCombine.td)
mlir_tablegen(HelloCombine.inc -gen-rewriters)
include_directories(${CMAKE_BINARY_DIR})
add_public_tablegen_target(HelloCombineIncGen)
add_library(SyntaxNode STATIC
lib/SyntaxNode.cpp
lib/Dialect.cpp
lib/MLIRGen.cpp
lib/HelloCombine.cpp
include/SyntaxNode.h
include/Parser.h
include/Lexer.h
)
add_dependencies(SyntaxNode HelloOpsIncGen)
add_dependencies(SyntaxNode HelloOpsIncGen HelloCombineIncGen)
target_link_libraries(SyntaxNode
PRIVATE