1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[MergeICmps][NFC] Improve logging.

llvm-svn: 326683
This commit is contained in:
Clement Courbet 2018-03-05 08:21:47 +00:00
parent fd8b3ce3b0
commit 3e66b31c6a

View File

@ -289,13 +289,15 @@ BCECmpChain::BCECmpChain(const std::vector<BasicBlock *> &Blocks, PHINode &Phi)
return; return;
} }
if (Comparison.doesOtherWork()) { 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. if (BlockIdx == 0) { // First block.
// TODO(courbet): The first block can do other things, and we should // TODO(courbet): The first block can do other things, and we should
// split them apart in a separate block before the comparison chain. // split them apart in a separate block before the comparison chain.
// Right now we just discard it and make the chain shorter. // Right now we just discard it and make the chain shorter.
DEBUG(dbgs() 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; continue;
} }
// TODO(courbet): Right now we abort the whole chain. We could be // 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. // We could still merge bb1 and bb2 though.
return; return;
} }
DEBUG(dbgs() << "*Found cmp of " << Comparison.SizeBits() DEBUG(dbgs() << "Block '" << Comparison.BB->getName()<< "': Found cmp of "
<< " bits between " << Comparison.Lhs().Base() << " + " << Comparison.SizeBits() << " bits between "
<< Comparison.Lhs().Offset << " and " << Comparison.Lhs().Base() << " + " << Comparison.Lhs().Offset
<< Comparison.Rhs().Base() << " + " << Comparison.Rhs().Offset << " and " << Comparison.Rhs().Base() << " + "
<< "\n"); << Comparison.Rhs().Offset << "\n");
DEBUG(dbgs() << "\n"); DEBUG(dbgs() << "\n");
Comparisons.push_back(Comparison); Comparisons.push_back(Comparison);
} }