diff options
author | John Demme <john.demme@microsoft.com> | 2020-10-13 22:07:27 +0000 |
---|---|---|
committer | John Demme <john.demme@microsoft.com> | 2020-10-14 00:32:18 +0000 |
commit | 5fe53c412832b3c18cd1e4e9f54848304e3a74bc (patch) | |
tree | 3603e054175103c04238fb8005dc18550bc10c3b /mlir/cmake | |
parent | ef3d17482fff105a1c44fccbbe494ccddafa5661 (diff) | |
download | llvm-libc-5fe53c412832b3c18cd1e4e9f54848304e3a74bc.tar.gz |
[MLIR] Add support for defining Types in tblgen
Adds a TypeDef class to OpBase and backing generation code. Allows one
to define the Type, its parameters, and printer/parser methods in ODS.
Can generate the Type C++ class, accessors, storage class, per-parameter
custom allocators (for the storage constructor), and documentation.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D86904
Diffstat (limited to 'mlir/cmake')
-rw-r--r-- | mlir/cmake/modules/AddMLIR.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mlir/cmake/modules/AddMLIR.cmake b/mlir/cmake/modules/AddMLIR.cmake index 8394c056c1db..0d99c29c716a 100644 --- a/mlir/cmake/modules/AddMLIR.cmake +++ b/mlir/cmake/modules/AddMLIR.cmake @@ -9,6 +9,8 @@ function(add_mlir_dialect dialect dialect_namespace) set(LLVM_TARGET_DEFINITIONS ${dialect}.td) mlir_tablegen(${dialect}.h.inc -gen-op-decls) mlir_tablegen(${dialect}.cpp.inc -gen-op-defs) + mlir_tablegen(${dialect}Types.h.inc -gen-typedef-decls) + mlir_tablegen(${dialect}Types.cpp.inc -gen-typedef-defs) mlir_tablegen(${dialect}Dialect.h.inc -gen-dialect-decls -dialect=${dialect_namespace}) add_public_tablegen_target(MLIR${dialect}IncGen) add_dependencies(mlir-headers MLIR${dialect}IncGen) |