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

Mehdi Amini llvmlistbot at llvm.org
Sat Feb 28 05:26:45 PST 2026


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

>> To begin with, just the implementation of the verifier would have to change drastically if none of this was Core, and I'm not sure we could preserve the efficiency we have now with a "monolithic" design.
> We already look up RegionKindInterface and OpTrait::IsTerminator for every region-based op in the verifier, 

You're missing the point: I'm talking about the verifier is keeping states across regions to ensure things like dominance, isolated from above, etc. All in a single traversal.
If everything was an interface, the verifier would just call opaque "op->verify()" and everything would happen in interface implementations. Without the monolithic design you lose the ability to centralize the state and actually could the specific logic associated with each "property" (SSA dominance, isolation, etc.) with the traversal and bookkeeping. 

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


More information about the Mlir-commits mailing list