[Mlir-commits] [mlir] [mlir][interface] Add getRegionNonForwardedValues API to RegionBranchOpInterface (PR #175212)

Matthias Springer llvmlistbot at llvm.org
Fri Jan 23 03:32:32 PST 2026


================
@@ -606,25 +607,20 @@ void AbstractSparseBackwardDataFlowAnalysis::visitRegionSuccessors(
       unaccounted.reset(operand->getOperandNumber());
     }
   }
-
   Operation *op = branch.getOperation();
   SmallVector<RegionSuccessor> successors;
   SmallVector<Attribute> operands(op->getNumOperands(), nullptr);
   branch.getEntrySuccessorRegions(operands, successors);
   for (RegionSuccessor &successor : successors) {
     if (successor.isParent())
       continue;
-    SmallVector<BlockArgument> noControlFlowArguments;
-    MutableArrayRef<BlockArgument> arguments =
-        successor.getSuccessor()->getArguments();
-    ValueRange inputs = branch.getSuccessorInputs(successor);
-    for (BlockArgument argument : arguments) {
-      // Visit blockArgument of RegionBranchOp which isn't "control
-      // flow block arguments". For example, the IV of a loop.
-      if (!llvm::is_contained(inputs, argument)) {
-        noControlFlowArguments.push_back(argument);
-      }
-    }
+    auto ValueToArgument = [](Value value) {
----------------
matthias-springer wrote:

`llvm::to_vector_of<BlockArgument>`

https://github.com/llvm/llvm-project/pull/175212


More information about the Mlir-commits mailing list