Skip to content

Commit 29f6ddf

Browse files
committed
!fixup adjust names and comments after recent changes.
1 parent 646a112 commit 29f6ddf

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9332,9 +9332,9 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
93329332
VPlanHCFGBuilder HCFGBuilder(OrigLoop, LI, *Plan);
93339333
HCFGBuilder.buildPlainCFG();
93349334

9335-
VPlanTransforms::introduceTopLevelVectorLoopRegion(
9336-
*Plan, Legal->getWidestInductionType(), PSE, RequiresScalarEpilogueCheck,
9337-
CM.foldTailByMasking(), OrigLoop);
9335+
VPlanTransforms::introduceRegions(*Plan, Legal->getWidestInductionType(), PSE,
9336+
RequiresScalarEpilogueCheck,
9337+
CM.foldTailByMasking(), OrigLoop);
93389338

93399339
// Don't use getDecisionAndClampRange here, because we don't know the UF
93409340
// so this function is better to be conservative, rather than to split
@@ -9636,8 +9636,8 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VFRange &Range) {
96369636
VPlanHCFGBuilder HCFGBuilder(OrigLoop, LI, *Plan);
96379637
HCFGBuilder.buildPlainCFG();
96389638

9639-
VPlanTransforms::introduceTopLevelVectorLoopRegion(
9640-
*Plan, Legal->getWidestInductionType(), PSE, true, false, OrigLoop);
9639+
VPlanTransforms::introduceRegions(*Plan, Legal->getWidestInductionType(), PSE,
9640+
true, false, OrigLoop);
96419641

96429642
for (ElementCount VF : Range)
96439643
Plan->addVF(VF);

llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ static VPRegionBlock *introduceRegion(VPlan &Plan, VPBlockBase *HeaderVPBB) {
4848
return R;
4949
}
5050

51-
void VPlanTransforms::introduceTopLevelVectorLoopRegion(
52-
VPlan &Plan, Type *InductionTy, PredicatedScalarEvolution &PSE,
53-
bool RequiresScalarEpilogueCheck, bool TailFolded, Loop *TheLoop) {
51+
void VPlanTransforms::introduceRegions(VPlan &Plan, Type *InductionTy,
52+
PredicatedScalarEvolution &PSE,
53+
bool RequiresScalarEpilogueCheck,
54+
bool TailFolded, Loop *TheLoop) {
5455
VPDominatorTree VPDT;
5556
VPDT.recalculate(Plan);
5657
for (VPBasicBlock *HeaderVPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(

llvm/lib/Transforms/Vectorize/VPlanTransforms.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,19 @@ struct VPlanTransforms {
5252
verifyVPlanIsValid(Plan);
5353
}
5454

55-
/// Introduce the top-level VPRegionBlock for the main loop in \p Plan. Coming
56-
/// into this function, \p Plan's top-level loop is modeled using a plain CFG.
57-
/// This transform wraps the plain CFG of the top-level loop within a
58-
/// VPRegionBlock and creates a VPValue expression for the original trip
59-
/// count. It will also introduce a dedicated VPBasicBlock for the vector
60-
/// pre-header as well a VPBasicBlock as exit block of the region
61-
/// (middle.block). If a check is needed to guard executing the scalar
55+
/// Replace loops in \p Plan's flat CFG with VPRegionBlocks, turing \p Plan's
56+
/// flat CFG into a hierarchical CFG. It also creates a VPValue expression for
57+
/// the original trip count. It will also introduce a dedicated VPBasicBlock
58+
/// for the vector pre-header as well a VPBasicBlock as exit block of the
59+
/// region (middle.block). If a check is needed to guard executing the scalar
6260
/// epilogue loop, it will be added to the middle block, together with
6361
/// VPBasicBlocks for the scalar preheader and exit blocks. \p InductionTy is
6462
/// the type of the canonical induction and used for related values, like the
6563
/// trip count expression.
66-
static void introduceTopLevelVectorLoopRegion(
67-
VPlan &Plan, Type *InductionTy, PredicatedScalarEvolution &PSE,
68-
bool RequiresScalarEpilogueCheck, bool TailFolded, Loop *TheLoop);
64+
static void introduceRegions(VPlan &Plan, Type *InductionTy,
65+
PredicatedScalarEvolution &PSE,
66+
bool RequiresScalarEpilogueCheck,
67+
bool TailFolded, Loop *TheLoop);
6968

7069
/// Replaces the VPInstructions in \p Plan with corresponding
7170
/// widen recipes. Returns false if any VPInstructions could not be converted

llvm/unittests/Transforms/Vectorize/VPlanTestBase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class VPlanTestIRBase : public testing::Test {
7474
auto Plan = std::make_unique<VPlan>(L);
7575
VPlanHCFGBuilder HCFGBuilder(L, LI.get(), *Plan);
7676
HCFGBuilder.buildPlainCFG();
77-
VPlanTransforms::introduceTopLevelVectorLoopRegion(
78-
*Plan, IntegerType::get(*Ctx, 64), PSE, true, false, L);
77+
VPlanTransforms::introduceRegions(*Plan, IntegerType::get(*Ctx, 64), PSE,
78+
true, false, L);
7979
return Plan;
8080
}
8181
};

0 commit comments

Comments
 (0)