[mlir] Add extensible dialects
authorMathieu Fehr <mathieu.fehr@gmail.com>
Wed, 2 Mar 2022 20:17:06 +0000 (12:17 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Wed, 2 Mar 2022 20:42:59 +0000 (12:42 -0800)
commitdbe9f0914fcfd8444fd9656821af0f1a34a27e7a
treeb11f6700d89f47e7e471a62e71d612c9dd2bdf32
parent507f7317a0db6e58f170829ec6a10e380450ca47
[mlir] Add extensible dialects

Add support for extensible dialects, which are dialects that can be
extended at runtime with new operations and types.

These operations and types cannot at the moment implement traits
or interfaces.

Differential Revision: https://reviews.llvm.org/D104554
18 files changed:
mlir/docs/ExtensibleDialects.md [new file with mode: 0644]
mlir/include/mlir/IR/AttributeSupport.h
mlir/include/mlir/IR/Dialect.h
mlir/include/mlir/IR/ExtensibleDialect.h [new file with mode: 0644]
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/IR/TypeSupport.h
mlir/include/mlir/TableGen/Dialect.h
mlir/lib/IR/CMakeLists.txt
mlir/lib/IR/ExtensibleDialect.cpp [new file with mode: 0644]
mlir/lib/TableGen/Dialect.cpp
mlir/test/IR/dynamic.mlir [new file with mode: 0644]
mlir/test/lib/Dialect/Test/TestAttributes.cpp
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestDialect.h
mlir/test/lib/Dialect/Test/TestDialect.td
mlir/test/lib/Dialect/Test/TestTypes.cpp
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
mlir/tools/mlir-tblgen/DialectGen.cpp