diff options
author | Dan Gohman <gohman@apple.com> | 2008-07-27 20:43:25 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-07-27 20:43:25 +0000 |
commit | 91e5dcb68054d2e481863528ba15b69b6821b50b (patch) | |
tree | eb84d6d611149cc8dc14bf877d22e71c09ce4cf2 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 108c58aef4bd9f70af87c513e557c43cc373c262 (diff) | |
download | bcm5719-llvm-91e5dcb68054d2e481863528ba15b69b6821b50b.tar.gz bcm5719-llvm-91e5dcb68054d2e481863528ba15b69b6821b50b.zip |
Tidy SDNode::use_iterator, and complete the transition to have it
parallel its analogue, Value::value_use_iterator. The operator* method
now returns the user, rather than the use.
llvm-svn: 54127
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index fcfe0fef83e..dfc74f3d03e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -299,9 +299,7 @@ static void ComputeTopDownOrdering(SelectionDAG &DAG, // Now that we have N in, add anything that uses it if all of their operands // are now done. - for (SDNode::use_iterator UI = N->use_begin(), E = N->use_end(); - UI != E; ++UI) - Worklist.push_back(UI->getUser()); + Worklist.insert(Worklist.end(), N->use_begin(), N->use_end()); } assert(Order.size() == Visited.size() && @@ -373,7 +371,7 @@ static SDNode *FindCallEndFromCallStart(SDNode *Node) { E = Node->use_end(); UI != E; ++UI) { // Make sure to only follow users of our token chain. - SDNode *User = UI->getUser(); + SDNode *User = *UI; for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) if (User->getOperand(i) == TheChain) if (SDNode *Result = FindCallEndFromCallStart(User)) |