[Mlir-commits] [mlir] [mlir][dataflow] Add new visitNonControlFlowArgumentst API to SparseDataFlowAnalysis and apply it in LivenessAnalysis/RemoveDeadValues/IntegerRangeAnalysis (PR #169816)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Tue Dec 30 02:47:29 PST 2025
================
@@ -217,6 +217,10 @@ class AbstractSparseForwardDataFlowAnalysis : public DataFlowAnalysis {
Operation *op, const RegionSuccessor &successor,
ArrayRef<AbstractSparseLattice *> argLattices, unsigned firstIndex) = 0;
+ virtual void visitBranchPropertyArgumentImpl(
----------------
ftynse wrote:
I missed that comment. To my excuse, it is marked as resolved... `visitNonControlFlowArguments` is expected to update the lattices of block arguments of the first block of each region that do not have their values forwarded to directly from some operands. The forwarding is described by control flow interfaces, hence the name. Perhaps a better name could have been `visitNonForwardedToArguments` or even `updateNonForwardedToArgumentLattices` because itdoesn't actually _visit_ them in the sense that the lattices for these arguments are not passed into the function.
What may be confusing is the `RegionSuccessor` function argument. It contains the list of operands that _are_ being forwarded, so the ones that are most likely useless for this update. This is just to make sure the `RegionSuccessor` object is well-formed, but should have no effect on what the function does.
https://github.com/llvm/llvm-project/pull/169816
More information about the Mlir-commits
mailing list