Skip to content

Commit afef545

Browse files
committed
[VPlan] Address post-commit for #114305.
Apply suggested renaming and adjust placement as suggested in #114305. Also drop unneeded RPOT creation.
1 parent 47df46b commit afef545

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7677,6 +7677,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
76777677
VPlanTransforms::unrollByUF(BestVPlan, BestUF,
76787678
OrigLoop->getHeader()->getContext());
76797679
VPlanTransforms::optimizeForVFAndUF(BestVPlan, BestVF, BestUF, PSE);
7680+
VPlanTransforms::convertToConcreteRecipes(BestVPlan);
76807681

76817682
// Perform the actual loop transformation.
76827683
VPTransformState State(&TTI, BestVF, BestUF, LI, DT, ILV.Builder, &ILV,
@@ -7740,7 +7741,6 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
77407741
BestVPlan.prepareToExecute(ILV.getTripCount(),
77417742
ILV.getOrCreateVectorTripCount(nullptr),
77427743
CanonicalIVStartValue, State);
7743-
VPlanTransforms::prepareToExecute(BestVPlan);
77447744

77457745
BestVPlan.execute(&State);
77467746

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3486,7 +3486,7 @@ void VPEVLBasedIVPHIRecipe::print(raw_ostream &O, const Twine &Indent,
34863486

34873487
void VPScalarPHIRecipe::execute(VPTransformState &State) {
34883488
BasicBlock *VectorPH = State.CFG.getPreheaderBBFor(this);
3489-
Value *Start = State.get(getOperand(0), VPLane(0));
3489+
Value *Start = State.get(getStartValue(), VPLane(0));
34903490
PHINode *Phi = State.Builder.CreatePHI(Start->getType(), 2, Name);
34913491
Phi->addIncoming(Start, VectorPH);
34923492
Phi->setDebugLoc(getDebugLoc());

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,9 +1820,7 @@ void VPlanTransforms::createInterleaveGroups(
18201820
}
18211821
}
18221822

1823-
void VPlanTransforms::prepareToExecute(VPlan &Plan) {
1824-
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
1825-
Plan.getVectorLoopRegion());
1823+
void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan) {
18261824
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
18271825
vp_depth_first_deep(Plan.getEntry()))) {
18281826
for (VPRecipeBase &R : make_early_inc_range(VPBB->phis())) {

llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct VPlanTransforms {
125125
static void removeDeadRecipes(VPlan &Plan);
126126

127127
/// Lower abstract recipes to concrete ones, that can be codegen'd.
128-
static void prepareToExecute(VPlan &Plan);
128+
static void convertToConcreteRecipes(VPlan &Plan);
129129
};
130130

131131
} // namespace llvm

0 commit comments

Comments
 (0)