BranchInst *BI = cast<BranchInst>(BB->getTerminator());
BasicBlock *DestBB = BI->getSuccessor(0);
- DEBUG(errs() << "MERGING MOSTLY EMPTY BLOCKS - BEFORE:\n" << *BB << *DestBB);
+ DEBUG(dbgs() << "MERGING MOSTLY EMPTY BLOCKS - BEFORE:\n" << *BB << *DestBB);
// If the destination block has a single pred, then this is a trivial edge,
// just collapse it.
if (isEntry && BB != &BB->getParent()->getEntryBlock())
BB->moveBefore(&BB->getParent()->getEntryBlock());
- DEBUG(errs() << "AFTER:\n" << *DestBB << "\n\n\n");
+ DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
return;
}
}
}
BB->eraseFromParent();
- DEBUG(errs() << "AFTER:\n" << *DestBB << "\n\n\n");
+ DEBUG(dbgs() << "AFTER:\n" << *DestBB << "\n\n\n");
}
// If all the instructions matched are already in this BB, don't do anything.
if (!AnyNonLocal) {
- DEBUG(errs() << "CGP: Found local addrmode: " << AddrMode << "\n");
+ DEBUG(dbgs() << "CGP: Found local addrmode: " << AddrMode << "\n");
return false;
}
// computation.
Value *&SunkAddr = SunkAddrs[Addr];
if (SunkAddr) {
- DEBUG(errs() << "CGP: Reusing nonlocal addrmode: " << AddrMode << " for "
+ DEBUG(dbgs() << "CGP: Reusing nonlocal addrmode: " << AddrMode << " for "
<< *MemoryInst);
if (SunkAddr->getType() != Addr->getType())
SunkAddr = new BitCastInst(SunkAddr, Addr->getType(), "tmp", InsertPt);
} else {
- DEBUG(errs() << "CGP: SINKING nonlocal addrmode: " << AddrMode << " for "
+ DEBUG(dbgs() << "CGP: SINKING nonlocal addrmode: " << AddrMode << " for "
<< *MemoryInst);
const Type *IntPtrTy =
TLI->getTargetData()->getIntPtrType(AccessTy->getContext());