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);
|
Checks);
|
||||||
|
|
||||||
VPlan &BestEpiPlan = LVP.getBestPlanFor(EPI.EpilogueVF);
|
VPlan &BestEpiPlan = LVP.getBestPlanFor(EPI.EpilogueVF);
|
||||||
BestEpiPlan.getVectorLoopRegion()->getEntryBasicBlock()->setName(
|
VPRegionBlock *VectorLoop = BestEpiPlan.getVectorLoopRegion();
|
||||||
"vec.epilog.vector.body");
|
VectorLoop->getEntryBasicBlock()->setName("vec.epilog.vector.body");
|
||||||
|
|
||||||
// Ensure that the start values for any VPReductionPHIRecipes are
|
// Ensure that the start values for any VPReductionPHIRecipes are
|
||||||
// updated before vectorising the epilogue loop.
|
// updated before vectorising the epilogue loop.
|
||||||
VPBasicBlock *Header =
|
VPBasicBlock *Header = VectorLoop->getEntryBasicBlock();
|
||||||
BestEpiPlan.getVectorLoopRegion()->getEntryBasicBlock();
|
|
||||||
for (VPRecipeBase &R : Header->phis()) {
|
for (VPRecipeBase &R : Header->phis()) {
|
||||||
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
|
if (auto *ReductionPhi = dyn_cast<VPReductionPHIRecipe>(&R)) {
|
||||||
if (auto *Resume = MainILV.getReductionResumeValue(
|
if (auto *Resume = MainILV.getReductionResumeValue(
|
||||||
|
|
Loading…
Reference in New Issue