[Mlir-commits] [mlir] [mlir][dataflow] Delete visitRegionSuccessors not run code (NFC) (PR #174790)
Matthias Springer
llvmlistbot at llvm.org
Sat Jan 10 06:52:34 PST 2026
================
@@ -307,29 +307,20 @@ void AbstractSparseForwardDataFlowAnalysis::visitRegionSuccessors(
"expected the same number of successor inputs as operands");
unsigned firstIndex = 0;
- if (inputs.size() != lattices.size()) {
- if (!point->isBlockStart()) {
- if (!inputs.empty())
- firstIndex = cast<OpResult>(inputs.front()).getResultNumber();
- visitNonControlFlowArgumentsImpl(
----------------
matthias-springer wrote:
I don't understand why it's safe to remove the case for OpResults. Imagine a hypothetical op that's like `scf.for`, but has an additional op result, which is the number of iterations.
```
%num_iter, %loop_carried = scf.fancy_for_loop ... iter_args(%arg0 = %0) {
...
}
```
In the above example, `%num_iter` is not a successor input, so `inputs.size() != lattices.size()`. (`inputs.size()` is 1, `lattices.size()` is 2.)
https://github.com/llvm/llvm-project/pull/174790
More information about the Mlir-commits
mailing list