[llvm] e792a35 - [slp] adjust debug output to include final computed cost
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 13:51:54 PDT 2022
Author: Philip Reames
Date: 2022-08-15T13:51:39-07:00
New Revision: e792a353b5706b01686fded5acce2b4d0dbf8745
URL: https://github.com/llvm/llvm-project/commit/e792a353b5706b01686fded5acce2b4d0dbf8745
DIFF: https://github.com/llvm/llvm-project/commit/e792a353b5706b01686fded5acce2b4d0dbf8745.diff
LOG: [slp] adjust debug output to include final computed cost
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 7d76e1b12346..2a01542fadf6 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -10079,7 +10079,7 @@ bool SLPVectorizerPass::vectorizeStoreChain(ArrayRef<Value *> Chain, BoUpSLP &R,
InstructionCost Cost = R.getTreeCost();
- LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for VF =" << VF << "\n");
+ LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for VF=" << VF << "\n");
if (Cost < -SLPCostThreshold) {
LLVM_DEBUG(dbgs() << "SLP: Decided to vectorize cost = " << Cost << "\n");
@@ -10380,6 +10380,7 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R,
CandidateFound = true;
MinCost = std::min(MinCost, Cost);
+ LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for VF=" << VF << "\n");
if (Cost < -SLPCostThreshold) {
LLVM_DEBUG(dbgs() << "SLP: Vectorizing list at cost:" << Cost << ".\n");
R.getORE()->emit(OptimizationRemark(SV_NAME, "VectorizedList",
@@ -11219,8 +11220,8 @@ class HorizontalReduction {
InstructionCost ReductionCost =
getReductionCost(TTI, VL, ReduxWidth, RdxFMF);
InstructionCost Cost = TreeCost + ReductionCost;
+ LLVM_DEBUG(dbgs() << "SLP: Found cost = " << Cost << " for reduction\n");
if (!Cost.isValid()) {
- LLVM_DEBUG(dbgs() << "Encountered invalid baseline cost.\n");
return nullptr;
}
if (Cost >= -SLPCostThreshold) {
More information about the llvm-commits
mailing list