@@ -3758,7 +3758,8 @@ void InnerLoopVectorizer::fixCrossIterationPHIs(VPTransformState &State) {
3758
3758
// the currently empty PHI nodes. At this point every instruction in the
3759
3759
// original loop is widened to a vector form so we can use them to construct
3760
3760
// the incoming edges.
3761
- VPBasicBlock *Header = State.Plan ->getEntry ()->getEntryBasicBlock ();
3761
+ VPBasicBlock *Header =
3762
+ State.Plan ->getVectorLoopRegion ()->getEntryBasicBlock ();
3762
3763
for (VPRecipeBase &R : Header->phis ()) {
3763
3764
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R))
3764
3765
fixReduction (ReductionPhi, State);
@@ -8092,7 +8093,8 @@ VPValue *VPRecipeBuilder::createBlockInMask(BasicBlock *BB, VPlanPtr &Plan) {
8092
8093
// constructing the desired canonical IV in the header block as its first
8093
8094
// non-phi instructions.
8094
8095
assert (CM.foldTailByMasking () && " must fold the tail" );
8095
- VPBasicBlock *HeaderVPBB = Plan->getEntry ()->getEntryBasicBlock ();
8096
+ VPBasicBlock *HeaderVPBB =
8097
+ Plan->getVectorLoopRegion ()->getEntryBasicBlock ();
8096
8098
auto NewInsertionPoint = HeaderVPBB->getFirstNonPhi ();
8097
8099
auto *IV = new VPWidenCanonicalIVRecipe (Plan->getCanonicalIV ());
8098
8100
HeaderVPBB->insert (IV, HeaderVPBB->getFirstNonPhi ());
@@ -8860,8 +8862,8 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
8860
8862
// After here, VPBB should not be used.
8861
8863
VPBB = nullptr ;
8862
8864
8863
- assert (isa<VPRegionBlock>(Plan->getEntry ()) &&
8864
- !Plan->getEntry ()->getEntryBasicBlock ()->empty () &&
8865
+ assert (isa<VPRegionBlock>(Plan->getVectorLoopRegion ()) &&
8866
+ !Plan->getVectorLoopRegion ()->getEntryBasicBlock ()->empty () &&
8865
8867
" entry block must be set to a VPRegionBlock having a non-empty entry "
8866
8868
" VPBasicBlock" );
8867
8869
RecipeBuilder.fixHeaderPhis ();
@@ -8946,7 +8948,8 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
8946
8948
8947
8949
// Introduce a recipe to combine the incoming and previous values of a
8948
8950
// first-order recurrence.
8949
- for (VPRecipeBase &R : Plan->getEntry ()->getEntryBasicBlock ()->phis ()) {
8951
+ for (VPRecipeBase &R :
8952
+ Plan->getVectorLoopRegion ()->getEntryBasicBlock ()->phis ()) {
8950
8953
auto *RecurPhi = dyn_cast<VPFirstOrderRecurrencePHIRecipe>(&R);
8951
8954
if (!RecurPhi)
8952
8955
continue ;
@@ -9162,7 +9165,8 @@ void LoopVectorizationPlanner::adjustRecipesForReductions(
9162
9165
// dedicated latch block.
9163
9166
if (CM.foldTailByMasking ()) {
9164
9167
Builder.setInsertPoint (LatchVPBB, LatchVPBB->begin ());
9165
- for (VPRecipeBase &R : Plan->getEntry ()->getEntryBasicBlock ()->phis ()) {
9168
+ for (VPRecipeBase &R :
9169
+ Plan->getVectorLoopRegion ()->getEntryBasicBlock ()->phis ()) {
9166
9170
VPReductionPHIRecipe *PhiR = dyn_cast<VPReductionPHIRecipe>(&R);
9167
9171
if (!PhiR || PhiR->isInLoop ())
9168
9172
continue ;
@@ -10574,7 +10578,8 @@ bool LoopVectorizePass::processLoop(Loop *L) {
10574
10578
10575
10579
// Ensure that the start values for any VPReductionPHIRecipes are
10576
10580
// updated before vectorising the epilogue loop.
10577
- VPBasicBlock *Header = BestEpiPlan.getEntry ()->getEntryBasicBlock ();
10581
+ VPBasicBlock *Header =
10582
+ BestEpiPlan.getVectorLoopRegion ()->getEntryBasicBlock ();
10578
10583
for (VPRecipeBase &R : Header->phis ()) {
10579
10584
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
10580
10585
if (auto *Resume = MainILV.getReductionResumeValue (
0 commit comments