mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Consistently use dbgs() in debug printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2216,7 +2216,7 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB,
|
||||
// DCE instruction if trivially dead.
|
||||
if (isInstructionTriviallyDead(Inst, TLI)) {
|
||||
++NumDeadInst;
|
||||
DEBUG(errs() << "IC: DCE: " << *Inst << '\n');
|
||||
DEBUG(dbgs() << "IC: DCE: " << *Inst << '\n');
|
||||
Inst->eraseFromParent();
|
||||
continue;
|
||||
}
|
||||
@@ -2224,7 +2224,7 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB,
|
||||
// ConstantProp instruction if trivially constant.
|
||||
if (!Inst->use_empty() && isa<Constant>(Inst->getOperand(0)))
|
||||
if (Constant *C = ConstantFoldInstruction(Inst, TD, TLI)) {
|
||||
DEBUG(errs() << "IC: ConstFold to: " << *C << " from: "
|
||||
DEBUG(dbgs() << "IC: ConstFold to: " << *C << " from: "
|
||||
<< *Inst << '\n');
|
||||
Inst->replaceAllUsesWith(C);
|
||||
++NumConstProp;
|
||||
@@ -2300,7 +2300,7 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB,
|
||||
bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
MadeIRChange = false;
|
||||
|
||||
DEBUG(errs() << "\n\nINSTCOMBINE ITERATION #" << Iteration << " on "
|
||||
DEBUG(dbgs() << "\n\nINSTCOMBINE ITERATION #" << Iteration << " on "
|
||||
<< F.getName() << "\n");
|
||||
|
||||
{
|
||||
@@ -2345,7 +2345,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
|
||||
// Check to see if we can DCE the instruction.
|
||||
if (isInstructionTriviallyDead(I, TLI)) {
|
||||
DEBUG(errs() << "IC: DCE: " << *I << '\n');
|
||||
DEBUG(dbgs() << "IC: DCE: " << *I << '\n');
|
||||
EraseInstFromFunction(*I);
|
||||
++NumDeadInst;
|
||||
MadeIRChange = true;
|
||||
@@ -2355,7 +2355,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
// Instruction isn't dead, see if we can constant propagate it.
|
||||
if (!I->use_empty() && isa<Constant>(I->getOperand(0)))
|
||||
if (Constant *C = ConstantFoldInstruction(I, TD, TLI)) {
|
||||
DEBUG(errs() << "IC: ConstFold to: " << *C << " from: " << *I << '\n');
|
||||
DEBUG(dbgs() << "IC: ConstFold to: " << *C << " from: " << *I << '\n');
|
||||
|
||||
// Add operands to the worklist.
|
||||
ReplaceInstUsesWith(*I, C);
|
||||
@@ -2403,13 +2403,13 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
std::string OrigI;
|
||||
#endif
|
||||
DEBUG(raw_string_ostream SS(OrigI); I->print(SS); OrigI = SS.str(););
|
||||
DEBUG(errs() << "IC: Visiting: " << OrigI << '\n');
|
||||
DEBUG(dbgs() << "IC: Visiting: " << OrigI << '\n');
|
||||
|
||||
if (Instruction *Result = visit(*I)) {
|
||||
++NumCombined;
|
||||
// Should we replace the old instruction with a new one?
|
||||
if (Result != I) {
|
||||
DEBUG(errs() << "IC: Old = " << *I << '\n'
|
||||
DEBUG(dbgs() << "IC: Old = " << *I << '\n'
|
||||
<< " New = " << *Result << '\n');
|
||||
|
||||
if (!I->getDebugLoc().isUnknown())
|
||||
@@ -2438,7 +2438,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
EraseInstFromFunction(*I);
|
||||
} else {
|
||||
#ifndef NDEBUG
|
||||
DEBUG(errs() << "IC: Mod = " << OrigI << '\n'
|
||||
DEBUG(dbgs() << "IC: Mod = " << OrigI << '\n'
|
||||
<< " New = " << *I << '\n');
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user