llvm-project/mlir/tools
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
..
mlir-cpu-runner [mlir][cpu-runner] register all llvm ir dialects 2021-03-17 10:05:46 -07:00
mlir-linalg-ods-gen [mlir][Pattern] Add better support for using interfaces/traits to match root operations in rewrite patterns 2021-03-23 14:05:33 -07:00
mlir-opt [mlir] Remove mlir-rocm-runner 2021-03-19 00:24:10 -07:00
mlir-reduce [mlir] avoid exposing mutable DialectRegistry from MLIRContext 2021-02-10 12:07:34 +01:00
mlir-shlib [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
mlir-spirv-cpu-runner [mlir] fix SPIR-V CPU and Vulkan runners after e2310704d8 2021-03-15 18:36:58 +01:00
mlir-tblgen 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
mlir-translate Revert "[RFC] Factor out repetitive cmake patterns for llvm-style projects" 2020-10-04 15:17:34 -07:00
mlir-vulkan-runner [mlir] introduce data layout entry for index type 2021-03-24 15:13:42 +01:00
CMakeLists.txt [mlir] Remove mlir-rocm-runner 2021-03-19 00:24:10 -07:00