diff options
-rw-r--r-- | llvm/lib/Transforms/Scalar/MergeICmps.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/MergeICmps.cpp b/llvm/lib/Transforms/Scalar/MergeICmps.cpp index 14045fe5992..2275a0b5b89 100644 --- a/llvm/lib/Transforms/Scalar/MergeICmps.cpp +++ b/llvm/lib/Transforms/Scalar/MergeICmps.cpp @@ -289,13 +289,15 @@ BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi) 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::vector<BasicBlock *> &Blocks, PHINode &Phi) // 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); } |