summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit1270acc1ceeeb2dfc2561665bede20296fae39e6 (patch)
treeac7240b8b2ff10e069b8159ac718592305f199b7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentcf8fd0c0db4d627d179be4b79cebbb64ba31c9eb (diff)
downloadbcm5719-llvm-1270acc1ceeeb2dfc2561665bede20296fae39e6.tar.gz
bcm5719-llvm-1270acc1ceeeb2dfc2561665bede20296fae39e6.zip
Print out nodes sorted by their address to make it easier to find them in a list.
llvm-svn: 19421
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index ce882e6f6e5..2bd17395015 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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";
}
OpenPOWER on IntegriCloud