[llvm] [VPlan] Introduce child regions as VPlan transform. (PR #129402)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 02:20:46 PDT 2025


================
@@ -9641,10 +9641,10 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlan(VFRange &Range) {
   auto Plan = std::make_unique<VPlan>(OrigLoop);
   // Build hierarchical CFG
   VPlanHCFGBuilder HCFGBuilder(OrigLoop, LI, *Plan);
-  HCFGBuilder.buildHierarchicalCFG();
+  HCFGBuilder.buildPlainCFG();
 
-  VPlanTransforms::introduceTopLevelVectorLoopRegion(
-      *Plan, Legal->getWidestInductionType(), PSE, true, false, OrigLoop);
+  VPlanTransforms::introduceRegions(*Plan, Legal->getWidestInductionType(), PSE,
----------------
ayalz wrote:

```suggestion
  VPlanTransforms::createLoopRegions(*Plan, Legal->getWidestInductionType(), PSE,
```
to complement and be consistent with `createAndOptimizeReplicateRegions()`.

https://github.com/llvm/llvm-project/pull/129402


More information about the llvm-commits mailing list