[Mlir-commits] [mlir] [mlir][interface] Add getNonSuccessorInputs API to RegionBranchOpInterface (PR #175212)
Matthias Springer
llvmlistbot at llvm.org
Fri Jan 23 07:51:33 PST 2026
================
@@ -606,25 +607,18 @@ 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:
nit: lower case variable name
https://github.com/llvm/llvm-project/pull/175212
More information about the Mlir-commits
mailing list