aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-05 17:13:57 +0000
committerDan Gohman <gohman@apple.com>2008-11-05 17:13:57 +0000
commit695ea6e57e638a517e7e2d3c020d9934afcd414a (patch)
tree03f89ecb927981f82cc57d082713020b657d6fa9
parent617303ac7179153f3487233ba7f91747cef624ae (diff)
Update some comments to reflect the new code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58759 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/DAGISelHeader.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h
index 783c567a52..a46c9831ed 100644
--- a/include/llvm/CodeGen/DAGISelHeader.h
+++ b/include/llvm/CodeGen/DAGISelHeader.h
@@ -50,7 +50,10 @@ public:
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 @@ void SelectRoot(SelectionDAG &DAG) {
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