[Mlir-commits] [mlir] [mlir][Interfaces] Add `ExecutionProgressOpInterface` + folding pattern (PR #179039)
Matthias Springer
llvmlistbot at llvm.org
Mon Feb 2 06:52:10 PST 2026
matthias-springer wrote:
> I'm not sure it's safe to mark loops as `mustprogress` by default without looking at their body first which may contain operations that may not progress.
I believe this is at least well-defined. It doesn't matter what's inside of the loop. If the loop is "mustProgress", but something inside of the loop violates that property, we have UB and the loop can be replaced with `ub.poison`.
(Whether "mustProgress = true" should be the default... I agree, I would also feel more comfortable with `false` being the default.)
> For example, what if we have a nested loop where the inner one is marked as `mustProgress=false`? I'm not sure it's reasonable for the emitted of the outer loop to be responsible for deciding this -- seems like a footgun.
Note that this loop structure is not contradicting.
```
loop must_progress=true {
loop must_progress=false {
...
}
}
```
`must_progress=false` just means that we have no information.
> had a cannon pattern to set `mustProgress` when safe?
That sounds like a reasonable canonicalization to me.
https://github.com/llvm/llvm-project/pull/179039
More information about the Mlir-commits
mailing list