[libcxx-commits] [libcxx] [clang-tools-extra] [lld] [clang] [flang] [libc] [compiler-rt] [llvm] [lldb] [VPlan] Implement cloning of VPlans. (PR #73158)

Florian Hahn via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 21 04:44:47 PST 2024


================
@@ -1200,6 +1271,59 @@ void VPUser::printOperands(raw_ostream &O, VPSlotTracker &SlotTracker) const {
 }
 #endif
 
+VPBlockBase *VPBlockUtils::cloneCFG(
+    VPBlockBase *Entry, DenseMap<VPBlockBase *, VPBlockBase *> &Old2New,
+    DenseMap<VPValue *, VPValue *> &Old2NewVPValues, bool FullRemapping) {
+  ReversePostOrderTraversal<VPBlockShallowTraversalWrapper<VPBlockBase *>> RPOT(
+      Entry);
+  VPBlockBase *NewEntry = nullptr;
+  for (VPBlockBase *BB : RPOT) {
+    VPBlockBase *NewBB = BB->clone();
+    if (!NewEntry)
+      NewEntry = NewBB;
----------------
fhahn wrote:

updated, thanks!

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


More information about the libcxx-commits mailing list