[Mlir-commits] [mlir] [MLIR] Introduce support for early exits (PR #166688)

Mehdi Amini llvmlistbot at llvm.org
Fri Feb 20 12:11:45 PST 2026


================
@@ -560,6 +571,86 @@ func.func @accelerator_compute(i64, i1) -> i64 { // An SSACFG region
 }
 ```
 
+#### Region Terminator
+
+A `RegionTerminator` is a specialization of a block terminator (the `Terminator`
+trait) that transfer the control back to a parent operation. It can exit multiple nested regions in a single step, bypassing the
+normal `RegionBranchOpInterface` exit path for every intermediate level. In the
+generic operation format, the exit count appears in the successor-list brackets
+as a plain integer rather than a block label (see `num-breaking-regions` in the
+grammar above). Custom assembly formats may surface this as a literal integer
+argument (e.g. `scf.break 2`).
+
+`num-breaking-regions = N` means the operation exits **N region levels** in
----------------
joker-eph wrote:

Done!

https://github.com/llvm/llvm-project/pull/166688


More information about the Mlir-commits mailing list