[Mlir-commits] [mlir] [mlir][interface] Add getRegionNonForwardedValues API to RegionBranchOpInterface (PR #175212)
lonely eagle
llvmlistbot at llvm.org
Fri Jan 23 07:42:44 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) {
----------------
linuxlonelyeagle wrote:
It say:
```
ent; unsigned int N = 6]'
/root/llvm-project/llvm/include/llvm/ADT/SmallVector.h:1321:43: required from 'llvm::SmallVector<Out> llvm::to_vector_of(R&&) [with Out = mlir::BlockArgument; R = SmallVector<mlir::Value>]'
/root/llvm-project/mlir/lib/Analysis/DataFlow/SparseAnalysis.cpp:620:90: required from here
/usr/include/c++/13/bits/stl_uninitialized.h:90:56: error: static assertion failed: result type must be constructible from input type
90 | static_assert(is_constructible<_ValueType, _Tp>::value,
| ^~~~~
/usr/include/c++/13/bits/stl_uninitialized.h:90:56: note: 'std::integral_constant<bool, false>::value' evaluates to false
```
https://github.com/llvm/llvm-project/pull/175212
More information about the Mlir-commits
mailing list