[llvm] [VPlan] Introduce ExitPhi VPInstruction, use to create phi for FOR. (PR #94760)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 06:51:28 PDT 2024
================
@@ -1195,9 +1200,18 @@ VPlan *VPlan::duplicate() {
remapOperands(Preheader, NewPreheader, Old2NewVPValues);
remapOperands(Entry, NewEntry, Old2NewVPValues);
+ DenseMap<VPBlockBase *, VPBlockBase *> Old2NewVPBlocks;
+ VPBlockBase *OldMiddle = getVectorLoopRegion()->getSingleSuccessor();
+ VPBlockBase *NewMiddle = NewPlan->getVectorLoopRegion()->getSingleSuccessor();
+ Old2NewVPBlocks[OldMiddle] = NewMiddle;
+ for (const auto &[Old, New] :
+ zip(OldMiddle->getSuccessors(), NewMiddle->getSuccessors()))
+ Old2NewVPBlocks[Old] = New;
----------------
fhahn wrote:
Not needed in the latest version
https://github.com/llvm/llvm-project/pull/94760
More information about the llvm-commits
mailing list