[VPlan] Address post-commit for #114305.
Apply suggested renaming and adjust placement as suggested in https://github.com/llvm/llvm-project/pull/114305. Also drop unneeded RPOT creation.
This commit is contained in:
@@ -7677,6 +7677,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
|
||||
VPlanTransforms::unrollByUF(BestVPlan, BestUF,
|
||||
OrigLoop->getHeader()->getContext());
|
||||
VPlanTransforms::optimizeForVFAndUF(BestVPlan, BestVF, BestUF, PSE);
|
||||
VPlanTransforms::convertToConcreteRecipes(BestVPlan);
|
||||
|
||||
// Perform the actual loop transformation.
|
||||
VPTransformState State(&TTI, BestVF, BestUF, LI, DT, ILV.Builder, &ILV,
|
||||
@@ -7740,7 +7741,6 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
|
||||
BestVPlan.prepareToExecute(ILV.getTripCount(),
|
||||
ILV.getOrCreateVectorTripCount(nullptr),
|
||||
CanonicalIVStartValue, State);
|
||||
VPlanTransforms::prepareToExecute(BestVPlan);
|
||||
|
||||
BestVPlan.execute(&State);
|
||||
|
||||
|
||||
@@ -3486,7 +3486,7 @@ void VPEVLBasedIVPHIRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
|
||||
void VPScalarPHIRecipe::execute(VPTransformState &State) {
|
||||
BasicBlock *VectorPH = State.CFG.getPreheaderBBFor(this);
|
||||
Value *Start = State.get(getOperand(0), VPLane(0));
|
||||
Value *Start = State.get(getStartValue(), VPLane(0));
|
||||
PHINode *Phi = State.Builder.CreatePHI(Start->getType(), 2, Name);
|
||||
Phi->addIncoming(Start, VectorPH);
|
||||
Phi->setDebugLoc(getDebugLoc());
|
||||
|
||||
@@ -1820,9 +1820,7 @@ void VPlanTransforms::createInterleaveGroups(
|
||||
}
|
||||
}
|
||||
|
||||
void VPlanTransforms::prepareToExecute(VPlan &Plan) {
|
||||
ReversePostOrderTraversal<VPBlockDeepTraversalWrapper<VPBlockBase *>> RPOT(
|
||||
Plan.getVectorLoopRegion());
|
||||
void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan) {
|
||||
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
|
||||
vp_depth_first_deep(Plan.getEntry()))) {
|
||||
for (VPRecipeBase &R : make_early_inc_range(VPBB->phis())) {
|
||||
|
||||
@@ -125,7 +125,7 @@ struct VPlanTransforms {
|
||||
static void removeDeadRecipes(VPlan &Plan);
|
||||
|
||||
/// Lower abstract recipes to concrete ones, that can be codegen'd.
|
||||
static void prepareToExecute(VPlan &Plan);
|
||||
static void convertToConcreteRecipes(VPlan &Plan);
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
Reference in New Issue
Block a user