[MergeICmps][NFC] Improve logging.

llvm-svn: 326683
diff --git a/llvm/lib/Transforms/Scalar/MergeICmps.cpp b/llvm/lib/Transforms/Scalar/MergeICmps.cpp
index 14045fe..2275a0b 100644
--- a/llvm/lib/Transforms/Scalar/MergeICmps.cpp
+++ b/llvm/lib/Transforms/Scalar/MergeICmps.cpp
@@ -289,13 +289,15 @@
       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 @@
       // 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);
   }