[llvm-commits] [llvm] r58759 - /llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
Dan Gohman
gohman at apple.com
Wed Nov 5 09:13:57 PST 2008
Author: djg
Date: Wed Nov 5 11:13:57 2008
New Revision: 58759
URL: http://llvm.org/viewvc/llvm-project?rev=58759&view=rev
Log:
Update some comments to reflect the new code.
Modified:
llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
Modified: llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h?rev=58759&r1=58758&r2=58759&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h (original)
+++ llvm/trunk/include/llvm/CodeGen/DAGISelHeader.h Wed Nov 5 11:13:57 2008
@@ -50,7 +50,10 @@
explicit ISelUpdater(SelectionDAG::allnodes_iterator &isp)
: ISelPosition(isp) {}
- /// NodeDeleted - remove node from the selection queue.
+ /// NodeDeleted - Handle nodes deleted from the graph. If the
+ /// node being deleted is the current ISelPosition node, update
+ /// ISelPosition.
+ ///
virtual void NodeDeleted(SDNode *N, SDNode *E) {
if (ISelPosition == SelectionDAG::allnodes_iterator(N))
++ISelPosition;
@@ -100,8 +103,10 @@
HandleSDNode Dummy(CurDAG->getRoot());
ISelPosition = next(SelectionDAG::allnodes_iterator(CurDAG->getRoot().getNode()));
- // Select pending nodes from the instruction selection queue
- // until no more nodes are left for selection.
+ // The AllNodes list is now topological-sorted. Visit the
+ // nodes by starting at the end of the list (the root of the
+ // graph) and preceding back toward the beginning (the entry
+ // node).
while (ISelPosition != CurDAG->allnodes_begin()) {
SDNode *Node = --ISelPosition;
#if 0
More information about the llvm-commits
mailing list