[llvm-commits] [llvm] r92617 - /llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
David Greene
greened at obbligato.org
Mon Jan 4 17:27:24 PST 2010
Author: greened
Date: Mon Jan 4 19:27:24 2010
New Revision: 92617
URL: http://llvm.org/viewvc/llvm-project?rev=92617&view=rev
Log:
Change errs() to dbgs().
Modified:
llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=92617&r1=92616&r2=92617&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Mon Jan 4 19:27:24 2010
@@ -60,12 +60,12 @@
///
static void PrintOps(Instruction *I, const SmallVectorImpl<ValueEntry> &Ops) {
Module *M = I->getParent()->getParent()->getParent();
- errs() << Instruction::getOpcodeName(I->getOpcode()) << " "
+ dbgs() << Instruction::getOpcodeName(I->getOpcode()) << " "
<< *Ops[0].Op->getType() << '\t';
for (unsigned i = 0, e = Ops.size(); i != e; ++i) {
- errs() << "[ ";
- WriteAsOperand(errs(), Ops[i].Op, false, M);
- errs() << ", #" << Ops[i].Rank << "] ";
+ dbgs() << "[ ";
+ WriteAsOperand(dbgs(), Ops[i].Op, false, M);
+ dbgs() << ", #" << Ops[i].Rank << "] ";
}
}
#endif
@@ -186,7 +186,7 @@
(!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I)))
++Rank;
- //DEBUG(errs() << "Calculated Rank[" << V->getName() << "] = "
+ //DEBUG(dbgs() << "Calculated Rank[" << V->getName() << "] = "
// << Rank << "\n");
return ValueRankMap[I] = Rank;
@@ -226,7 +226,7 @@
isReassociableOp(RHS, I->getOpcode()) &&
"Not an expression that needs linearization?");
- DEBUG(errs() << "Linear" << *LHS << '\n' << *RHS << '\n' << *I << '\n');
+ DEBUG(dbgs() << "Linear" << *LHS << '\n' << *RHS << '\n' << *I << '\n');
// Move the RHS instruction to live immediately before I, avoiding breaking
// dominator properties.
@@ -239,7 +239,7 @@
++NumLinear;
MadeChange = true;
- DEBUG(errs() << "Linearized: " << *I << '\n');
+ DEBUG(dbgs() << "Linearized: " << *I << '\n');
// If D is part of this expression tree, tail recurse.
if (isReassociableOp(I->getOperand(1), I->getOpcode()))
@@ -335,10 +335,10 @@
if (I->getOperand(0) != Ops[i].Op ||
I->getOperand(1) != Ops[i+1].Op) {
Value *OldLHS = I->getOperand(0);
- DEBUG(errs() << "RA: " << *I << '\n');
+ DEBUG(dbgs() << "RA: " << *I << '\n');
I->setOperand(0, Ops[i].Op);
I->setOperand(1, Ops[i+1].Op);
- DEBUG(errs() << "TO: " << *I << '\n');
+ DEBUG(dbgs() << "TO: " << *I << '\n');
MadeChange = true;
++NumChanged;
@@ -351,9 +351,9 @@
assert(i+2 < Ops.size() && "Ops index out of range!");
if (I->getOperand(1) != Ops[i].Op) {
- DEBUG(errs() << "RA: " << *I << '\n');
+ DEBUG(dbgs() << "RA: " << *I << '\n');
I->setOperand(1, Ops[i].Op);
- DEBUG(errs() << "TO: " << *I << '\n');
+ DEBUG(dbgs() << "TO: " << *I << '\n');
MadeChange = true;
++NumChanged;
}
@@ -484,7 +484,7 @@
Sub->replaceAllUsesWith(New);
Sub->eraseFromParent();
- DEBUG(errs() << "Negated: " << *New << '\n');
+ DEBUG(dbgs() << "Negated: " << *New << '\n');
return New;
}
@@ -971,7 +971,7 @@
SmallVector<ValueEntry, 8> Ops;
LinearizeExprTree(I, Ops);
- DEBUG(errs() << "RAIn:\t"; PrintOps(I, Ops); errs() << '\n');
+ DEBUG(dbgs() << "RAIn:\t"; PrintOps(I, Ops); dbgs() << '\n');
// Now that we have linearized the tree to a list and have gathered all of
// the operands and their ranks, sort the operands by their rank. Use a
@@ -986,7 +986,7 @@
if (Value *V = OptimizeExpression(I, Ops)) {
// This expression tree simplified to something that isn't a tree,
// eliminate it.
- DEBUG(errs() << "Reassoc to scalar: " << *V << '\n');
+ DEBUG(dbgs() << "Reassoc to scalar: " << *V << '\n');
I->replaceAllUsesWith(V);
RemoveDeadBinaryOp(I);
++NumAnnihil;
@@ -1005,7 +1005,7 @@
Ops.insert(Ops.begin(), Tmp);
}
- DEBUG(errs() << "RAOut:\t"; PrintOps(I, Ops); errs() << '\n');
+ DEBUG(dbgs() << "RAOut:\t"; PrintOps(I, Ops); dbgs() << '\n');
if (Ops.size() == 1) {
// This expression tree simplified to something that isn't a tree,
More information about the llvm-commits
mailing list