brintos

brintos / llvm-project-archived public Read only

0
0
Text · 588 B · bb89351 Raw
14 lines · plain
1# Tell Tablegen to use MyExtension.td as input.2set(LLVM_TARGET_DEFINITIONS MyExtension.td)3 4# Ask Tablegen to generate op declarations and definitions from ODS.5mlir_tablegen(MyExtension.h.inc -gen-op-decls)6mlir_tablegen(MyExtension.cpp.inc -gen-op-defs)7 8# Add a CMakeTarget we can depend on to ensure the generation happens before the compilation.9add_public_tablegen_target(MyExtensionCh2IncGen)10 11# Don't forget to generate the documentation, this will produce a12# MyExtensionCh2.md under Tutorials/transform13add_mlir_doc(MyExtension MyExtensionCh2 Tutorials/transform/ -gen-op-doc)14