mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 09:16:08 +00:00
[VPlan] Use unique_ptr to clean up duplicated plan.
This commit is contained in:
parent
517063e0f3
commit
7c03d5d41d
@ -10141,9 +10141,10 @@ bool LoopVectorizePass::processLoop(Loop *L) {
|
||||
EpilogueVectorizerMainLoop MainILV(L, PSE, LI, DT, TLI, TTI, AC, ORE,
|
||||
EPI, &LVL, &CM, BFI, PSI, Checks);
|
||||
|
||||
VPlan &BestMainPlan = *LVP.getBestPlanFor(EPI.MainLoopVF).duplicate();
|
||||
std::unique_ptr<VPlan> BestMainPlan(
|
||||
LVP.getBestPlanFor(EPI.MainLoopVF).duplicate());
|
||||
const auto &[ExpandedSCEVs, ReductionResumeValues] = LVP.executePlan(
|
||||
EPI.MainLoopVF, EPI.MainLoopUF, BestMainPlan, MainILV, DT, true);
|
||||
EPI.MainLoopVF, EPI.MainLoopUF, *BestMainPlan, MainILV, DT, true);
|
||||
++LoopsVectorized;
|
||||
|
||||
// Second pass vectorizes the epilogue and adjusts the control flow
|
||||
|
Loading…
x
Reference in New Issue
Block a user