[llvm] [VPlan] Remove loop region in optimizeForVFAndUF. (PR #108378)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 15:53:29 PST 2025


================
@@ -3845,9 +3843,8 @@ class VPlan {
   const VPBasicBlock *getEntry() const { return Entry; }
 
   /// Returns the preheader of the vector loop region.
-  VPBasicBlock *getVectorPreheader() {
-    return cast<VPBasicBlock>(getVectorLoopRegion()->getSinglePredecessor());
-  }
+  VPBasicBlock *getVectorPreheader();
+  VPBasicBlock *getVectorPreheader() const;
----------------
ayalz wrote:

Worth extending the comment to explain that the vector preheader VPBB continues to exist beyond its vector loop region, when the latter is removed for having a single iteration.

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


More information about the llvm-commits mailing list