Modest speedup which seems to help steens quite a bit on large graphs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-02-10 18:47:23 +00:00
parent ed14f8283a
commit a954b5eb3a

View File

@ -906,7 +906,8 @@ void DSGraph::removeTriviallyDeadNodes() {
if ((Node->NodeType & ~DSNode::DEAD) == 0 && Node->hasNoReferrers()) {
// This node is dead!
delete Node; // Free memory...
Nodes.erase(Nodes.begin()+i--); // Remove from node list...
Nodes[i--] = Nodes.back();
Nodes.pop_back(); // Remove from node list...
}
}
}