[llvm-commits] [llvm] r53632 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Dan Gohman gohman at apple.com
Tue Jul 15 11:18:54 PDT 2008


Author: djg
Date: Tue Jul 15 13:18:54 2008
New Revision: 53632

URL: http://llvm.org/viewvc/llvm-project?rev=53632&view=rev
Log:
Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,
just use the AllNodes order, which is at least relatively stable
across runs.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=53632&r1=53631&r2=53632&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Jul 15 13:18:54 2008
@@ -4973,16 +4973,12 @@
 
 void SelectionDAG::dump() const {
   cerr << "SelectionDAG has " << AllNodes.size() << " nodes:";
-  std::vector<const SDNode*> Nodes;
-  for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end();
-       I != E; ++I)
-    Nodes.push_back(I);
   
-  std::sort(Nodes.begin(), Nodes.end());
-
-  for (unsigned i = 0, e = Nodes.size(); i != e; ++i) {
-    if (!Nodes[i]->hasOneUse() && Nodes[i] != getRoot().Val)
-      DumpNodes(Nodes[i], 2, this);
+  for (allnodes_const_iterator I = allnodes_begin(), E = allnodes_end();
+       I != E; ++I) {
+    const SDNode *N = I;
+    if (!N->hasOneUse() && N != getRoot().Val)
+      DumpNodes(N, 2, this);
   }
 
   if (getRoot().Val) DumpNodes(getRoot().Val, 2, this);





More information about the llvm-commits mailing list