[llvm] [VPlan] Refactor VPlan creation, add transform introducing region (NFC). (PR #128419)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 1 08:55:04 PST 2025
================
@@ -9307,14 +9307,15 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
return !CM.requiresScalarEpilogue(VF.isVector());
},
Range);
- VPlanPtr Plan = VPlan::createInitialVPlan(Legal->getWidestInductionType(),
- PSE, RequiresScalarEpilogueCheck,
- CM.foldTailByMasking(), OrigLoop);
-
+ auto Plan = std::make_unique<VPlan>(OrigLoop);
// Build hierarchical CFG.
VPlanHCFGBuilder HCFGBuilder(OrigLoop, LI, *Plan);
HCFGBuilder.buildHierarchicalCFG();
----------------
fhahn wrote:
Yep that sounds good. I think it would make sense to consolidate the transforms for initial VPlan construction into a separate `VPlanConstruction.cpp`
https://github.com/llvm/llvm-project/pull/128419
More information about the llvm-commits
mailing list