summaryrefslogtreecommitdiff
path: root/lib
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
commit90a7b8fba69503c950aa598fac2edc77123b6bf0 (patch)
treed6551de9c2dd95543384dce39cfef4bd6a810379 /lib
parent2b4f7bbd498c44517a6716192244bd88b7af7529 (diff)
downloadllvm-90a7b8fba69503c950aa598fac2edc77123b6bf0.tar.gz
llvm-90a7b8fba69503c950aa598fac2edc77123b6bf0.tar.bz2
llvm-90a7b8fba69503c950aa598fac2edc77123b6bf0.tar.xz
Don't sort SDNodes by their addresses in SelectionDAG::dump. Instead,
just use the AllNodes order, which is at least relatively stable across runs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index cc1acf47db..4c951ff118 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/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);