[llvm] ec7154f - [SLP] Add banner argument to SLP costs debug printer method - NFC.
Valery N Dmitriev via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 11:23:11 PST 2023
Author: Valery N Dmitriev
Date: 2023-02-28T11:22:49-08:00
New Revision: ec7154fe70284a51b7b246c7e5aebabd33a7e2d4
URL: https://github.com/llvm/llvm-project/commit/ec7154fe70284a51b7b246c7e5aebabd33a7e2d4
DIFF: https://github.com/llvm/llvm-project/commit/ec7154fe70284a51b7b246c7e5aebabd33a7e2d4.diff
LOG: [SLP] Add banner argument to SLP costs debug printer method - NFC.
Removed unnecessary warning workaround.
Differential Revision: https://reviews.llvm.org/D144992
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 4317aabb5057e..3eaa627e0244f 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2812,15 +2812,16 @@ class BoUpSLP {
#ifndef NDEBUG
void dumpTreeCosts(const TreeEntry *E, InstructionCost ReuseShuffleCost,
- InstructionCost VecCost,
- InstructionCost ScalarCost) const {
- dbgs() << "SLP: Calculated costs for Tree:\n"; E->dump();
+ InstructionCost VecCost, InstructionCost ScalarCost,
+ StringRef Banner) const {
+ dbgs() << "SLP: " << Banner << ":\n";
+ E->dump();
dbgs() << "SLP: Costs:\n";
dbgs() << "SLP: ReuseShuffleCost = " << ReuseShuffleCost << "\n";
dbgs() << "SLP: VectorCost = " << VecCost << "\n";
dbgs() << "SLP: ScalarCost = " << ScalarCost << "\n";
- dbgs() << "SLP: ReuseShuffleCost + VecCost - ScalarCost = " <<
- ReuseShuffleCost + VecCost - ScalarCost << "\n";
+ dbgs() << "SLP: ReuseShuffleCost + VecCost - ScalarCost = "
+ << ReuseShuffleCost + VecCost - ScalarCost << "\n";
}
#endif
@@ -7143,12 +7144,8 @@ InstructionCost BoUpSLP::getEntryCost(const TreeEntry *E,
}
InstructionCost VecCost = VectorCost(CommonCost);
- LLVM_DEBUG(
- dumpTreeCosts(E, CommonCost, VecCost - CommonCost, ScalarCost));
- // Disable warnings for `this` and `E` are unused. Required for
- // `dumpTreeCosts`.
- (void)this;
- (void)E;
+ LLVM_DEBUG(dumpTreeCosts(E, CommonCost, VecCost - CommonCost,
+ ScalarCost, "Calculated costs for Tree"));
return VecCost - ScalarCost;
};
// Calculate cost
diff erence from vectorizing set of GEPs.
More information about the llvm-commits
mailing list