[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 07:31:29 PST 2024


================
@@ -3958,9 +4006,7 @@ class VPlan {
   }
 
   /// Returns the preheader of the vector loop region.
-  VPBasicBlock *getVectorPreheader() {
-    return cast<VPBasicBlock>(getVectorLoopRegion()->getSinglePredecessor());
-  }
+  VPBasicBlock *getVectorPreheader() { return cast<VPBasicBlock>(getEntry()); }
----------------
alexey-bataev wrote:

```suggestion
  VPBasicBlock *getVectorPreheader() const { return cast<VPBasicBlock>(getEntry()); }
```


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


More information about the llvm-commits mailing list