summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-09-07 00:15:36 +0000
committerNate Begeman <natebegeman@mac.com>2005-09-07 00:15:36 +0000
commit007c6506991c8634ce7c4186ce308d4f58ef80d7 (patch)
tree48431bc7b75b9fa282a26247cb5b02f2d2573171 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentc59a1dbce2e820f1ecd02cd4f32b1badd735c722 (diff)
downloadbcm5719-llvm-007c6506991c8634ce7c4186ce308d4f58ef80d7.tar.gz
bcm5719-llvm-007c6506991c8634ce7c4186ce308d4f58ef80d7.zip
Add an option to the DAG Combiner to enable it for beta runs, and turn on
that option for PowerPC's beta. llvm-svn: 23253
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 52110a1206c..d2501d81dd2 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -37,6 +37,7 @@
#define DEBUG_TYPE "dagcombine"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/SelectionDAG.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Target/TargetLowering.h"
#include <cmath>
@@ -76,8 +77,8 @@ namespace {
// Visitation implementation - Implement dag node combining for different
// node types. The semantics are as follows:
// Return Value:
- // null - No change was made
- // otherwise - Node N should be replaced by the returned node.
+ // SDOperand.Val == 0 - No change was made
+ // otherwise - N should be replaced by the returned Operand.
//
SDOperand visitTokenFactor(SDNode *N);
SDOperand visitADD(SDNode *N);
@@ -266,9 +267,9 @@ void DAGCombiner::Run(bool RunningAfterLegalize) {
// CombineTo was used. Since CombineTo takes care of the worklist
// mechanics for us, we have no work to do in this case.
if (RV.Val != N) {
- std::cerr << "\nReplacing "; N->dump();
- std::cerr << "\nWith: "; RV.Val->dump();
- std::cerr << '\n';
+ DEBUG(std::cerr << "\nReplacing "; N->dump();
+ std::cerr << "\nWith: "; RV.Val->dump();
+ std::cerr << '\n');
DAG.ReplaceAllUsesWith(SDOperand(N, 0), RV);
// Push the new node and any users onto the worklist
OpenPOWER on IntegriCloud