[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Jan 9 12:26:50 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAG.cpp updated: 1.16 -> 1.17
---
Log message:
Print out nodes sorted by their address to make it easier to find them in a list.
---
Diffs of the changes: (+5 -2)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.16 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.17
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.16 Sun Jan 9 14:09:57 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Jan 9 14:26:36 2005
@@ -922,9 +922,12 @@
void SelectionDAG::dump() const {
std::cerr << "SelectionDAG has " << AllNodes.size() << " nodes:";
- for (unsigned i = 0, e = AllNodes.size(); i != e; ++i) {
+ std::vector<SDNode*> Nodes(AllNodes);
+ std::sort(Nodes.begin(), Nodes.end());
+
+ for (unsigned i = 0, e = Nodes.size(); i != e; ++i) {
std::cerr << "\n ";
- AllNodes[i]->dump();
+ Nodes[i]->dump();
}
std::cerr << "\n\n";
}
More information about the llvm-commits
mailing list