[llvm] 1feeeb4 - [LoopVectorize][NFC] Move "LV: Selecting VF" debug output (#120744)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 02:39:38 PST 2025


Author: David Sherwood
Date: 2025-01-06T10:39:34Z
New Revision: 1feeeb47e56f8551dcd813fbb987bec628970f0d

URL: https://github.com/llvm/llvm-project/commit/1feeeb47e56f8551dcd813fbb987bec628970f0d
DIFF: https://github.com/llvm/llvm-project/commit/1feeeb47e56f8551dcd813fbb987bec628970f0d.diff

LOG: [LoopVectorize][NFC] Move "LV: Selecting VF" debug output (#120744)

Move the debug output that prints out the selected VF from
selectVectorizationFactor -> computeBestVF. This means that the output
will still be written even after removing the assert for the legacy and
vplan cost models matching.

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 0797100b182cb1..e0f629e14f6571 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4695,7 +4695,6 @@ VectorizationFactor LoopVectorizationPlanner::selectVectorizationFactor() {
                  !isMoreProfitable(ChosenFactor, ScalarCost)) dbgs()
              << "LV: Vectorization seems to be not beneficial, "
              << "but was forced by a user.\n");
-  LLVM_DEBUG(dbgs() << "LV: Selecting VF: " << ChosenFactor.Width << ".\n");
   return ChosenFactor;
 }
 #endif
@@ -7624,6 +7623,7 @@ VectorizationFactor LoopVectorizationPlanner::computeBestVF() {
          "when vectorizing, the scalar cost must be computed.");
 #endif
 
+  LLVM_DEBUG(dbgs() << "LV: Selecting VF: " << BestFactor.Width << ".\n");
   return BestFactor;
 }
 


        


More information about the llvm-commits mailing list