[llvm] StructurizeCFG: Optimize phi insertion during ssa reconstruction (PR #101301)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 01:34:10 PDT 2024
================
@@ -710,10 +714,107 @@ void StructurizeCFG::findUndefBlocks(
}
}
+// Return true if two PHI nodes have compatible incoming values (for each
+// incoming block, either they have the same incoming value or only one PHI
+// node has a incoming value). And return the union of the incoming values
+// through \p Merged.
+bool StructurizeCFG::isCompatible(const BBValueVector &IncomingA,
+ const BBValueVector &IncomingB,
+ BBValueVector &Merged) {
+ MapVector<BasicBlock *, Value *> UnionSet;
----------------
ruiling wrote:
I tried to get some deterministic order, I agree it is not important here. have changed to DenseMap.
https://github.com/llvm/llvm-project/pull/101301
More information about the llvm-commits
mailing list