diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-08-07 22:13:29 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-08-07 22:13:29 +0000 |
commit | 99157a00a6cadfd733cf02b947e2b7c7ed27246b (patch) | |
tree | b165474b7e32fe5a9c204622c9111ac55691be6b /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 3b97acdbdb179cf592f62a3491d82f5e234a863c (diff) |
Clear TopOrder before assigning topological order. Some clean ups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 0a6c43e626..8db55c9bfd 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -474,6 +474,7 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) { if (!Erased && N->getValueType(N->getNumValues()-1) != MVT::Flag && !N->isTargetOpcode()) { N->dump(); + std::cerr << "\n"; assert(0 && "Node is not in map!"); } #endif @@ -2497,7 +2498,7 @@ SDNode *SelectionDAG::getTargetNode(unsigned Opcode, MVT::ValueType VT1, return getNode(ISD::BUILTIN_OP_END+Opcode, ResultTys, Ops).Val; } -// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. +/// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead. /// This can cause recursive merging of nodes in the DAG. /// /// This version assumes From/To have a single result value. @@ -2711,6 +2712,7 @@ unsigned SelectionDAG::AssignTopologicalOrder(std::vector<SDNode*> &TopOrder) { Sources.push_back(N); } + TopOrder.clear(); while (!Sources.empty()) { SDNode *N = Sources.back(); Sources.pop_back(); |