[llvm] [VPlan] Implement cloning of VPlans. (PR #73158)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 14 11:11:42 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;
----------------
ayalz wrote:
Set NewEntry to Old2New[Entry], afterwards?
https://github.com/llvm/llvm-project/pull/73158
More information about the llvm-commits
mailing list