[llvm] 47737cd - [LV] Move introduceCheckBlockInVPlan to EpilogueVectorizerMainLoop (NFC)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 11:18:48 PDT 2025


Author: Florian Hahn
Date: 2025-08-28T19:18:02+01:00
New Revision: 47737cdedaee2a45e05f86446668991ca28c5084

URL: https://github.com/llvm/llvm-project/commit/47737cdedaee2a45e05f86446668991ca28c5084
DIFF: https://github.com/llvm/llvm-project/commit/47737cdedaee2a45e05f86446668991ca28c5084.diff

LOG: [LV] Move introduceCheckBlockInVPlan to EpilogueVectorizerMainLoop (NFC)

Move it to the sub-class that is actually using it.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6317bc3c20e25..1b1797ab30a35 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -552,11 +552,6 @@ class InnerLoopVectorizer {
   virtual void printDebugTracesAtStart() {}
   virtual void printDebugTracesAtEnd() {}
 
-  /// Introduces a new VPIRBasicBlock for \p CheckIRBB to Plan between the
-  /// vector preheader and its predecessor, also connecting the new block to the
-  /// scalar preheader.
-  void introduceCheckBlockInVPlan(BasicBlock *CheckIRBB);
-
   /// The original loop.
   Loop *OrigLoop;
 
@@ -696,6 +691,11 @@ class EpilogueVectorizerMainLoop : public InnerLoopAndEpilogueVectorizer {
   BasicBlock *createVectorizedLoopSkeleton() final;
 
 protected:
+  /// Introduces a new VPIRBasicBlock for \p CheckIRBB to Plan between the
+  /// vector preheader and its predecessor, also connecting the new block to the
+  /// scalar preheader.
+  void introduceCheckBlockInVPlan(BasicBlock *CheckIRBB);
+
   // Create a check to see if the main vector loop should be executed
   Value *createIterationCountCheck(ElementCount VF, unsigned UF) const;
 
@@ -2251,7 +2251,8 @@ static bool useMaskedInterleavedAccesses(const TargetTransformInfo &TTI) {
   return TTI.enableMaskedInterleavedAccessVectorization();
 }
 
-void InnerLoopVectorizer::introduceCheckBlockInVPlan(BasicBlock *CheckIRBB) {
+void EpilogueVectorizerMainLoop::introduceCheckBlockInVPlan(
+    BasicBlock *CheckIRBB) {
   // Note: The block with the minimum trip-count check is already connected
   // during earlier VPlan construction.
   VPBlockBase *ScalarPH = Plan.getScalarPreheader();


        


More information about the llvm-commits mailing list