forked from OSchip/llvm-project
[LV] Fetch vector loop region once and remember it (NFC).
This avoids an unnecessary lookup and makes the code slightly more compact.
This commit is contained in:
parent
c8cb644185
commit
5b00d13c00
|
@ -10634,13 +10634,12 @@ bool LoopVectorizePass::processLoop(Loop *L) {
|
|||
Checks);
|
||||
|
||||
VPlan &BestEpiPlan = LVP.getBestPlanFor(EPI.EpilogueVF);
|
||||
BestEpiPlan.getVectorLoopRegion()->getEntryBasicBlock()->setName(
|
||||
"vec.epilog.vector.body");
|
||||
VPRegionBlock *VectorLoop = BestEpiPlan.getVectorLoopRegion();
|
||||
VectorLoop->getEntryBasicBlock()->setName("vec.epilog.vector.body");
|
||||
|
||||
// Ensure that the start values for any VPReductionPHIRecipes are
|
||||
// updated before vectorising the epilogue loop.
|
||||
VPBasicBlock *Header =
|
||||
BestEpiPlan.getVectorLoopRegion()->getEntryBasicBlock();
|
||||
VPBasicBlock *Header = VectorLoop->getEntryBasicBlock();
|
||||
for (VPRecipeBase &R : Header->phis()) {
|
||||
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
|
||||
if (auto *Resume = MainILV.getReductionResumeValue(
|
||||
|
|
Loading…
Reference in New Issue