[Mlir-commits] [mlir] [mlir][dataflow] Add new visitNonControlFlowArgumentst API to SparseDataFlowAnalysis and apply it in LivenessAnalysis/RemoveDeadValues/IntegerRangeAnalysis (PR #169816)
lonely eagle
llvmlistbot at llvm.org
Mon Dec 29 10:12:03 PST 2025
================
@@ -312,20 +312,35 @@ void AbstractSparseForwardDataFlowAnalysis::visitRegionSuccessors(
if (!inputs.empty())
firstIndex = cast<OpResult>(inputs.front()).getResultNumber();
+ SmallVector<BlockArgument> notSuccessorInputsArguments;
Region *region = point->getBlock()->getParent();
- MutableArrayRef<BlockArgument> propertyArguments =
- region->getArguments().drop_back(inputs.size());
- SmallVector<AbstractSparseLattice *> propertyArgumentLattices;
- propertyArgumentLattices.reserve(propertyArguments.size());
- for (BlockArgument argument : propertyArguments) {
- AbstractSparseLattice *propertyArgumentLattice =
+ SmallVector<RegionSuccessor> successors;
+ branch.getSuccessorRegions(*region, successors);
+ for (RegionSuccessor successor : successors) {
+ if (successor.isParent())
+ continue;
+ auto arguments = successor.getSuccessor()->getArguments();
+ ValueRange regionInputs = successor.getSuccessorInputs();
+ for (auto argument : arguments) {
+ if (llvm::find(regionInputs, argument) == regionInputs.end()) {
----------------
linuxlonelyeagle wrote:
Thanks.
https://github.com/llvm/llvm-project/pull/169816
More information about the Mlir-commits
mailing list