[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ScheduleDAG.cpp SelectionDAG.cpp

Dan Gohman djg at cray.com
Tue Jun 19 07:14:19 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.312 -> 1.313
ScheduleDAG.cpp updated: 1.125 -> 1.126
SelectionDAG.cpp updated: 1.407 -> 1.408
---
Log message:

Pass a SelectionDAG into SDNode::dump everywhere it's used, in prepration
for needing the DAG node to print pre-legalize extended value types, and
to get better debug messages with target-specific nodes.


---
Diffs of the changes:  (+7 -7)

 DAGCombiner.cpp  |   10 +++++-----
 ScheduleDAG.cpp  |    2 +-
 SelectionDAG.cpp |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.312 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.313
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.312	Thu Jun 14 17:58:02 2007
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Tue Jun 19 09:13:56 2007
@@ -113,7 +113,7 @@
                         bool AddTo = true) {
       assert(N->getNumValues() == NumTo && "Broken CombineTo call!");
       ++NodesCombined;
-      DOUT << "\nReplacing.1 "; DEBUG(N->dump());
+      DOUT << "\nReplacing.1 "; DEBUG(N->dump(&DAG));
       DOUT << "\nWith: "; DEBUG(To[0].Val->dump(&DAG));
       DOUT << " and " << NumTo-1 << " other values\n";
       std::vector<SDNode*> NowDead;
@@ -164,7 +164,7 @@
       
       // Replace the old value with the new one.
       ++NodesCombined;
-      DOUT << "\nReplacing.2 "; DEBUG(TLO.Old.Val->dump());
+      DOUT << "\nReplacing.2 "; DEBUG(TLO.Old.Val->dump(&DAG));
       DOUT << "\nWith: "; DEBUG(TLO.New.Val->dump(&DAG));
       DOUT << '\n';
 
@@ -592,7 +592,7 @@
                RV.Val->getOpcode() != ISD::DELETED_NODE &&
                "Node was deleted but visit returned new node!");
 
-        DOUT << "\nReplacing.3 "; DEBUG(N->dump());
+        DOUT << "\nReplacing.3 "; DEBUG(N->dump(&DAG));
         DOUT << "\nWith: "; DEBUG(RV.Val->dump(&DAG));
         DOUT << '\n';
         std::vector<SDNode*> NowDead;
@@ -3314,7 +3314,7 @@
     Result = DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
   ++PreIndexedNodes;
   ++NodesCombined;
-  DOUT << "\nReplacing.4 "; DEBUG(N->dump());
+  DOUT << "\nReplacing.4 "; DEBUG(N->dump(&DAG));
   DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
   DOUT << '\n';
   std::vector<SDNode*> NowDead;
@@ -3445,7 +3445,7 @@
           : DAG.getIndexedStore(SDOperand(N,0), BasePtr, Offset, AM);
         ++PostIndexedNodes;
         ++NodesCombined;
-        DOUT << "\nReplacing.5 "; DEBUG(N->dump());
+        DOUT << "\nReplacing.5 "; DEBUG(N->dump(&DAG));
         DOUT << "\nWith: "; DEBUG(Result.Val->dump(&DAG));
         DOUT << '\n';
         std::vector<SDNode*> NowDead;


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.125 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.126
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.125	Tue Mar 20 15:43:18 2007
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp	Tue Jun 19 09:13:56 2007
@@ -476,7 +476,7 @@
     switch (Node->getOpcode()) {
     default:
 #ifndef NDEBUG
-      Node->dump();
+      Node->dump(&DAG);
 #endif
       assert(0 && "This target-independent node should have been selected!");
     case ISD::EntryToken: // fall thru


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.407 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.408
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.407	Thu Jun 14 17:58:02 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Tue Jun 19 09:13:56 2007
@@ -512,7 +512,7 @@
   // not subject to CSE.
   if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag &&
       !N->isTargetOpcode()) {
-    N->dump();
+    N->dump(this);
     cerr << "\n";
     assert(0 && "Node is not in map!");
   }






More information about the llvm-commits mailing list