[Mlir-commits] [mlir] [mlir][Interfaces] Add `mustProgress` interface method + folding pattern (PR #179039)
Matthias Springer
llvmlistbot at llvm.org
Sat Jan 31 08:44:25 PST 2026
================
@@ -351,6 +351,18 @@ def RegionBranchOpInterface : OpInterface<"RegionBranchOpInterface"> {
(ins "::mlir::Type":$lhs, "::mlir::Type":$rhs), [{}],
/*defaultImplementation=*/[{ return lhs == rhs; }]
>,
+ InterfaceMethod<[{
+ Region branch ops that "must progress" are required to terminate (i.e.,
+ not loop infinitely between their regions) or interact with the
----------------
matthias-springer wrote:
Imo, that would be consistent with `mustprogress`. When you terminate the program, the loop also terminates.
What's a bit weird is that `exit` can be a kind of "early exit" from loops, which MLIR does not support today. But that's independent of `mustprogress`.
https://github.com/llvm/llvm-project/pull/179039
More information about the Mlir-commits
mailing list