[llvm] r359161 - Fix unused variable warning in LoopFusion pass.
Kit Barton via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 19:10:03 PDT 2019
Author: kbarton
Date: Wed Apr 24 19:10:02 2019
New Revision: 359161
URL: http://llvm.org/viewvc/llvm-project?rev=359161&view=rev
Log:
Fix unused variable warning in LoopFusion pass.
Do not wrap the contents of printFusionCandidates in the LLVM_DEBUG macro. This
fixes an unused variable warning generated when compiling without asserts but
with -DENABLE_LLVM_DUMP.
Differential Revision: https://reviews.llvm.org/D61035
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopFuse.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopFuse.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopFuse.cpp?rev=359161&r1=359160&r2=359161&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopFuse.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopFuse.cpp Wed Apr 24 19:10:02 2019
@@ -311,16 +311,14 @@ inline llvm::raw_ostream &operator<<(llv
return OS;
}
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+#if !defined(NDEBUG)
static void
printFusionCandidates(const FusionCandidateCollection &FusionCandidates) {
- LLVM_DEBUG(dbgs() << "Fusion Candidates: \n");
+ dbgs() << "Fusion Candidates: \n";
for (const auto &CandidateSet : FusionCandidates) {
- LLVM_DEBUG({
- dbgs() << "*** Fusion Candidate Set ***\n";
- dbgs() << CandidateSet;
- dbgs() << "****************************\n";
- });
+ dbgs() << "*** Fusion Candidate Set ***\n";
+ dbgs() << CandidateSet;
+ dbgs() << "****************************\n";
}
}
#endif
More information about the llvm-commits
mailing list