diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-22 17:17:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-22 17:17:27 +0000 |
commit | 71cbd42b987cdb8d39da86cf98647224a2fc5f04 (patch) | |
tree | 4e783cef53c911941ef2feb357959ab2d79b90cf /llvm/lib/Transforms/Scalar/Reassociate.cpp | |
parent | afc86e9a358cd6f94ae46394c69a048015ae74ef (diff) | |
download | bcm5719-llvm-71cbd42b987cdb8d39da86cf98647224a2fc5f04.tar.gz bcm5719-llvm-71cbd42b987cdb8d39da86cf98647224a2fc5f04.zip |
Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
llvm-svn: 2713
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index f669262ee66..fcbf8b38c94 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -27,9 +27,6 @@ #include "Support/PostOrderIterator.h" #include "Support/StatisticReporter.h" -//#define DEBUG_REASSOC(x) std::cerr << x -#define DEBUG_REASSOC(x) - static Statistic<> NumLinear ("reassociate\t- Number of insts linearized"); static Statistic<> NumChanged("reassociate\t- Number of insts reassociated"); static Statistic<> NumSwapped("reassociate\t- Number of insts with operands swapped"); @@ -125,7 +122,7 @@ bool Reassociate::ReassociateExpr(BinaryOperator *I) { std::swap(LHSRank, RHSRank); Changed = true; ++NumSwapped; - DEBUG_REASSOC("Transposed: " << I << " Result BB: " << I->getParent()); + DEBUG(std::cerr << "Transposed: " << I << " Result BB: " << I->getParent()); } // If the LHS is the same operator as the current one is, and if we are the @@ -147,7 +144,8 @@ bool Reassociate::ReassociateExpr(BinaryOperator *I) { I->setOperand(1, LHSI); ++NumChanged; - DEBUG_REASSOC("Reassociated: " << I << " Result BB: " <<I->getParent()); + DEBUG(std::cerr << "Reassociated: " << I << " Result BB: " + << I->getParent()); // Since we modified the RHS instruction, make sure that we recheck it. ReassociateExpr(LHSI); @@ -238,7 +236,7 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) { I = Tmp; ++NumLinear; Changed = true; - DEBUG_REASSOC("Linearized: " << I << " Result BB: " << BB); + DEBUG(std::cerr << "Linearized: " << I << " Result BB: " << BB); } // Make sure that this expression is correctly reassociated with respect @@ -269,7 +267,7 @@ bool Reassociate::ReassociateBB(BasicBlock *BB) { New->setOperand(1, NegateValue(NegatedValue, BB, BI)); --BI; Changed = true; - DEBUG_REASSOC("Negated: " << New << " Result BB: " << BB); + DEBUG(std::cerr << "Negated: " << New << " Result BB: " << BB); } } |