================
@@ -521,6 +523,45 @@ void
RegionBranchOpInterface::getSuccessorOperandInputMapping(
}
}
+void RegionBranchOpInterface::getSuccessorInputOperandMapping(
+ RegionBranchInverseSuccessorMapping &mapping) {
+ RegionBranchSuccessorMapping operandToInputs;
+ getSuccessorOperandInputMapping(operandToInputs);
+ for (const auto &[operand, inputs] : operandToInputs) {
+ for (Value input : inputs)
+ mapping[input].push_back(operand);
+ }
+}
+
+DenseSet<Value>
+RegionBranchOpInterface::computePossibleValuesOfSuccessorInput(Value value) {
+ RegionBranchInverseSuccessorMapping inputToOperands;
+ getSuccessorInputOperandMapping(inputToOperands);
+
+ DenseSet<Value> possibleValues;
+ DenseSet<Value> visited;
----------------
Hardcode84 wrote:
`SmallDenseSet`s?
https://github.com/llvm/llvm-project/pull/174094
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits