[PATCH] D61035: Fix unused variable warning in LoopFusion pass

Kit Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 12:27:56 PDT 2019


kbarton created this revision.
kbarton added reviewers: rtereshin, Meinersbur.
Herald added subscribers: jsji, hiraditya.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61035

Files:
  llvm/lib/Transforms/Scalar/LoopFuse.cpp


Index: llvm/lib/Transforms/Scalar/LoopFuse.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -311,20 +311,19 @@
   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";
-    });
   }
 }
 #endif
 
+
 /// Collect all loops in function at the same nest level, starting at the
 /// outermost level.
 ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61035.196300.patch
Type: text/x-patch
Size: 831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190423/332d047c/attachment.bin>


More information about the llvm-commits mailing list