llvm/mlir/docs/Tutorials
Mehdi Amini 973ddb7d6e Define a NoTerminator traits that allows operations with a single block region to not provide a terminator
In particular for Graph Regions, the terminator needs is just a
historical artifact of the generalization of MLIR from CFG region.
Operations like Module don't need a terminator, and before Module
migrated to be an operation with region there wasn't any needed.

To validate the feature, the ModuleOp is migrated to use this trait and
the ModuleTerminator operation is deleted.

This patch is likely to break clients, if you're in this case:

- you may iterate on a ModuleOp with `getBody()->without_terminator()`,
  the solution is simple: just remove the ->without_terminator!
- you created a builder with `Builder::atBlockTerminator(module_body)`,
  just use `Builder::atBlockEnd(module_body)` instead.
- you were handling ModuleTerminator: it isn't needed anymore.
- for generic code, a `Block::mayNotHaveTerminator()` may be used.

Differential Revision: https://reviews.llvm.org/D98468
2021-03-25 03:59:03 +00:00
..
Toy Define a NoTerminator traits that allows operations with a single block region to not provide a terminator 2021-03-25 03:59:03 +00:00
_index.md
CreatingADialect.md
DefiningAttributesAndTypes.md [mlir][StorageUniquer] Properly call the destructor on non-trivially destructible storage instances 2021-03-11 11:35:32 -08:00
QuickstartRewrites.md [ODS] Implement a new 'hasCanonicalizeMethod' bit for cann patterns. 2021-03-23 13:45:45 -07:00
UnderstandingTheIRStructure.md Define a NoTerminator traits that allows operations with a single block region to not provide a terminator 2021-03-25 03:59:03 +00:00