[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 13:45:22 PDT 2025
================
@@ -2391,6 +2390,18 @@ void VPlanTransforms::createInterleaveGroups(
}
}
+void VPlanTransforms::dissolveLoopRegions(VPlan &Plan) {
+ // Replace loop regions with explicity CFG.
+ SmallVector<VPRegionBlock *> LoopRegions;
+ for (VPRegionBlock *R : VPBlockUtils::blocksOnly<VPRegionBlock>(
+ vp_depth_first_deep(Plan.getEntry()))) {
+ if (!R->isReplicator())
+ LoopRegions.push_back(R);
+ }
+ for (VPRegionBlock *R : LoopRegions)
+ R->removeRegion();
----------------
ayalz wrote:
Perhaps clearer to rename into something like
```suggestion
R->dissolveToCFGLoop();
```
to emphasize this is not "just removing".
https://github.com/llvm/llvm-project/pull/117506
More information about the llvm-commits
mailing list