llvm-project/mlir/docs/Tutorials/Toy
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
..
Ch-1.md [mlir] Add tutorial index.md pages 2020-09-21 15:50:48 -07:00
Ch-2.md [mlir][Toy] Tidy up the first half of Chapter 2. 2021-03-17 17:37:28 -07:00
Ch-3.md [PatternMatch] Big mechanical rename OwningRewritePatternList -> RewritePatternSet and insert -> add. NFC 2021-03-22 17:20:50 -07:00
Ch-4.md [mlir][Toy] Update the tutorial to use tablegen for dialect declarations 2021-03-17 17:37:28 -07:00
Ch-5.md Tidy up some docs. 2021-03-22 17:20:50 -07:00
Ch-6.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
Ch-7.md [mlir][Toy] Update the tutorial to use tablegen for dialect declarations 2021-03-17 17:37:28 -07:00
_index.md Add a link to the LLVM Dev recording from the MLIR tutorial landing page 2021-02-06 01:26:59 +00:00