[Mlir-commits] [mlir] [mlir][dataflow] Add visitBranchPropertyArgument API to SparseDataFlowAnalysis and apply it in LivenessAnalysis/RemoveDeadValues/IntegerRangeAnalysis (PR #169816)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Mon Dec 29 02:13:36 PST 2025
================
@@ -311,6 +311,21 @@ void AbstractSparseForwardDataFlowAnalysis::visitRegionSuccessors(
if (!point->isBlockStart()) {
if (!inputs.empty())
firstIndex = cast<OpResult>(inputs.front()).getResultNumber();
+
+ Region *region = point->getBlock()->getParent();
+ MutableArrayRef<BlockArgument> propertyArguments =
+ region->getArguments().drop_back(inputs.size());
----------------
ftynse wrote:
I don't think it is guaranteed that non-forwarded arguments are at the beginning of the list, so this can't just drop back. It should instead query the interfaces to see where the forwarded arguments are located. Much like the code in https://github.com/llvm/llvm-project/pull/169816/changes?new_files_changed=true#diff-002761434d8d29f0128611c19795d13a3f3364d059cb80a7a41760a03789107dL180 was doing.
https://github.com/llvm/llvm-project/pull/169816
More information about the Mlir-commits
mailing list