aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-09 20:26:36 +0000
committerChris Lattner <sabre@nondot.org>2005-01-09 20:26:36 +0000
commit49d24716a4398fc249d2b5ac993ff97a421f0635 (patch)
tree891d070f3cd684a10d7d1d02d658a04ca7eb4ace /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentbd9f0eefb230083de2ed009bb0be6c9386a6c04b (diff)
Print out nodes sorted by their address to make it easier to find them in a list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index ce882e6f6e..2bd1739501 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -922,9 +922,12 @@ void SDNode::dump() const {
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";
}