[Mlir-commits] [mlir] [mlir][dataflow] Delete visitRegionSuccessors not run code (NFC) (PR #174790)
Matthias Springer
llvmlistbot at llvm.org
Sat Jan 10 07:07:35 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:
The implicit assumption here is: All op results of a `RegionBranchOpInterface` op are guaranteed to be successor inputs (i.e., forwarded values).
This is currently not documented anywhere in the op interface, and I think it is incorrect. The op interface is more general: you can specify the successor inputs during `getSuccessors`; it can be a slice of the op results.
It's already the second time that I am seeing this assumption being made. (Other case [here](https://github.com/llvm/llvm-project/issues/175168).) I think we should clarify this in the op interface documentation. (I don't think the op interface itself is underspecified. The authors of this code just jumped the gun too quickly.)
Maybe @ftynse's and @joker-eph's to double check...
https://github.com/llvm/llvm-project/pull/174790
More information about the Mlir-commits
mailing list