llvm-project
1e33b736 - [mlir][Interfaces] Add `ExecutionProgressOpInterface` + folding pattern (#179039)

Commit
24 days ago
[mlir][Interfaces] Add `ExecutionProgressOpInterface` + folding pattern (#179039) Add the `ExecutionProgressOpInterface` with an interface method to check if an operation "must progress". Add `mustProgress` attributes to `scf.for` and `scf.while` (default value is "true"). `mustProgress` corresponds to the [`llvm.loop.mustprogress` metadata](https://llvm.org/docs/LangRef.html#langref-llvm-loop-mustprogress). Also add a canonicalization pattern to erase `RegionBranchOpInterface` ops that must progress but loop infinitely (and are non-side-effecting). This canonicalization pattern is enabled for `scf.for` and `scf.while`. RFC: https://discourse.llvm.org/t/infinite-loops-and-dead-code/89530
Parents
Loading