llvm-project/mlir/examples/toy/Ch4
Mehdi Amini 575b22b5d1 Revisit Dialect registration: require and store a TypeID on dialects
This patch moves the registration to a method in the MLIRContext: getOrCreateDialect<ConcreteDialect>()

This method requires dialect to provide a static getDialectNamespace()
and store a TypeID on the Dialect itself, which allows to lazyily
create a dialect when not yet loaded in the context.
As a side effect, it means that duplicated registration of the same
dialect is not an issue anymore.

To limit the boilerplate, TableGen dialect generation is modified to
emit the constructor entirely and invoke separately a "init()" method
that the user implements.

Differential Revision: https://reviews.llvm.org/D85495
2020-08-07 15:57:08 +00:00
..
include [MLIR] Continue renaming of "SideEffects" 2020-05-15 14:37:09 -07:00
mlir Revisit Dialect registration: require and store a TypeID on dialects 2020-08-07 15:57:08 +00:00
parser [MLIR] Fix several misc issues in in Toy tutorial 2020-05-11 16:56:47 -07:00
CMakeLists.txt [MLIR] Continue renaming of "SideEffects" 2020-05-15 14:37:09 -07:00
toyc.cpp Register printer and context CL options with the toyc example 2020-06-10 19:59:40 +00:00