[llvm] 70af292 - [Unswitch] Guard dbgs logging with LLVM_DEBUG

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 16 22:32:10 PDT 2021


Author: Arthur Eubanks
Date: 2021-03-16T22:31:57-07:00
New Revision: 70af2924a71c5c7bbfcd330371670cf7a373135e

URL: https://github.com/llvm/llvm-project/commit/70af2924a71c5c7bbfcd330371670cf7a373135e
DIFF: https://github.com/llvm/llvm-project/commit/70af2924a71c5c7bbfcd330371670cf7a373135e.diff

LOG: [Unswitch] Guard dbgs logging with LLVM_DEBUG

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index 0e5a787cea70..92461ea88c63 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2684,11 +2684,13 @@ unswitchBestCondition(Loop &L, DominatorTree &DT, LoopInfo &LI,
   // don't know how to split those exit blocks.
   // FIXME: We should teach SplitBlock to handle this and remove this
   // restriction.
-  for (auto *ExitBB : ExitBlocks)
+  for (auto *ExitBB : ExitBlocks) {
     if (isa<CleanupPadInst>(ExitBB->getFirstNonPHI())) {
-      dbgs() << "Cannot unswitch because of cleanuppad in exit block\n";
+      LLVM_DEBUG(
+          dbgs() << "Cannot unswitch because of cleanuppad in exit block\n");
       return false;
     }
+  }
 
   LLVM_DEBUG(
       dbgs() << "Considering " << UnswitchCandidates.size()


        


More information about the llvm-commits mailing list