[llvm] r326683 - [MergeICmps][NFC] Improve logging.

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 00:21:47 PST 2018


Author: courbet
Date: Mon Mar  5 00:21:47 2018
New Revision: 326683

URL: http://llvm.org/viewvc/llvm-project?rev=326683&view=rev
Log:
[MergeICmps][NFC] Improve logging.

Modified:
    llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp?rev=326683&r1=326682&r2=326683&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/MergeICmps.cpp Mon Mar  5 00:21:47 2018
@@ -289,13 +289,15 @@ BCECmpChain::BCECmpChain(const std::vect
       return;
     }
     if (Comparison.doesOtherWork()) {
-      DEBUG(dbgs() << "block does extra work besides compare\n");
+      DEBUG(dbgs() << "block '" << Comparison.BB->getName()
+                   << "' does extra work besides compare\n");
       if (BlockIdx == 0) {  // First block.
         // TODO(courbet): The first block can do other things, and we should
         // split them apart in a separate block before the comparison chain.
         // Right now we just discard it and make the chain shorter.
         DEBUG(dbgs()
-              << "ignoring first block that does extra work besides compare\n");
+              << "ignoring first block '" << Comparison.BB->getName()
+              << "' that does extra work besides compare\n");
         continue;
       }
       // TODO(courbet): Right now we abort the whole chain. We could be
@@ -323,11 +325,11 @@ BCECmpChain::BCECmpChain(const std::vect
       // We could still merge bb1 and bb2 though.
       return;
     }
-    DEBUG(dbgs() << "*Found cmp of " << Comparison.SizeBits()
-                 << " bits between " << Comparison.Lhs().Base() << " + "
-                 << Comparison.Lhs().Offset << " and "
-                 << Comparison.Rhs().Base() << " + " << Comparison.Rhs().Offset
-                 << "\n");
+    DEBUG(dbgs() << "Block '" << Comparison.BB->getName()<< "': Found cmp of "
+                 << Comparison.SizeBits() << " bits between "
+                 << Comparison.Lhs().Base() << " + " << Comparison.Lhs().Offset
+                 << " and " << Comparison.Rhs().Base() << " + "
+                 << Comparison.Rhs().Offset << "\n");
     DEBUG(dbgs() << "\n");
     Comparisons.push_back(Comparison);
   }




More information about the llvm-commits mailing list