[Mlir-commits] [mlir] [mlir][Interfaces] Add `mustProgress` interface method + folding pattern (PR #179039)

Jakub Kuderski llvmlistbot at llvm.org
Sat Jan 31 08:39:09 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
----------------
kuhar wrote:

Say a function call to `exit(0)` -- I'm asking if having a loop annotated with `mustprogress` is valid in the presence of operations that may terminate the program. For example spirv exposes a Kill op https://mlir.llvm.org/docs/Dialects/SPIR-V/#spirvkill-spirvkillop

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


More information about the Mlir-commits mailing list