summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-15 18:18:54 +0000
committerDan Gohman <gohman@apple.com>2008-07-15 18:18:54 +0000
commit1d093846b54240f2710905b8d6a214bd2dbb9bc9 (patch)
tree0f306835489c7f885034779ee9e5d6b9cd460aeb /llvm/lib/CodeGen/SelectionDAG
parent28762a5e49757e7983b281e4eb7b33e1d3883b98 (diff)
downloadbcm5719-llvm-1d093846b54240f2710905b8d6a214bd2dbb9bc9.tar.gz
bcm5719-llvm-1d093846b54240f2710905b8d6a214bd2dbb9bc9.zip
Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,
just use the AllNodes order, which is at least relatively stable across runs. llvm-svn: 53632
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index cc1acf47db7..4c951ff118d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -4973,16 +4973,12 @@ static void DumpNodes(const SDNode *N, unsigned indent, const SelectionDAG *G) {
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);
OpenPOWER on IntegriCloud