summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2010-01-05 01:27:24 +0000
committerDavid Greene <greened@obbligato.org>2010-01-05 01:27:24 +0000
commita1fa76cb5443e7b0fe7d36ee1118f80050e746f9 (patch)
treec4429a068b3141f6317466743403c0d2a0bcb383 /lib/Transforms/Scalar
parentef573a3a75557b35dd639bc44d5a3fcbe050cdcf (diff)
downloadllvm-a1fa76cb5443e7b0fe7d36ee1118f80050e746f9.tar.gz
llvm-a1fa76cb5443e7b0fe7d36ee1118f80050e746f9.tar.bz2
llvm-a1fa76cb5443e7b0fe7d36ee1118f80050e746f9.tar.xz
Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92617 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index 71d787a839..564036bba3 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -60,12 +60,12 @@ namespace {
///
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 @@ unsigned Reassociate::getRank(Value *V) {
(!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 @@ void Reassociate::LinearizeExpr(BinaryOperator *I) {
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 @@ void Reassociate::LinearizeExpr(BinaryOperator *I) {
++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 @@ void Reassociate::RewriteExprTree(BinaryOperator *I,
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 @@ void Reassociate::RewriteExprTree(BinaryOperator *I,
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 @@ static Instruction *BreakUpSubtract(Instruction *Sub,
Sub->replaceAllUsesWith(New);
Sub->eraseFromParent();
- DEBUG(errs() << "Negated: " << *New << '\n');
+ DEBUG(dbgs() << "Negated: " << *New << '\n');
return New;
}
@@ -971,7 +971,7 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
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 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
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 @@ Value *Reassociate::ReassociateExpression(BinaryOperator *I) {
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,