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

Mehdi Amini llvmlistbot at llvm.org
Mon Mar 2 03:04:42 PST 2026


================
@@ -558,6 +571,89 @@ func.func @accelerator_compute(i64, i1) -> i64 { // An SSACFG region
 }
 ```
 
+#### Region Terminator
----------------
joker-eph wrote:

It's only about performance: it is also about API convenience.
What if you had to dyn_cast and operation to "HasSSAOperandsOpInterface" before being able to call `op->getOperand(0)`?
Or `dyn_cast<OpWithRegionOpInterface>(op)->getRegion(0)`?

> Feels quite MLIR-ish: mightHaveTerminator, mightHaveEffect, mightHaveTrait, mightNotProgress...

These are all boolean flags, `collectAllNestedMaybePredecessors` behavior is on another level.
And these boolean "might..." **are** annoying already.



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


More information about the Mlir-commits mailing list