aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-08-01 08:20:41 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-08-01 08:20:41 +0000
commite6f35d8a5cc92d776cf460200e2b815e8c301b14 (patch)
treee1794f42cf59c7c39c893a43f716dd597ba8ed03 /include
parentdb3cc3d7d663a8dc2063d1bb581851e5e66f269d (diff)
downloadexternal_llvm-e6f35d8a5cc92d776cf460200e2b815e8c301b14.zip
external_llvm-e6f35d8a5cc92d776cf460200e2b815e8c301b14.tar.gz
external_llvm-e6f35d8a5cc92d776cf460200e2b815e8c301b14.tar.bz2
Added AssignTopologicalOrder() to assign each node an unique id based on their topological order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index 91d2800..b7dda01 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -422,10 +422,15 @@ public:
/// have no referrers.
void DeleteNode(SDNode *N);
- /// AssignNodeIds - Assign a unique node id for each node in the DAG. It
- /// returns the maximum id.
+ /// AssignNodeIds - Assign a unique node id for each node in the DAG based on
+ /// their allnodes order. It returns the maximum id.
unsigned AssignNodeIds();
+ /// AssignTopologicalOrder - Assign a unique node id for each node in the DAG
+ /// based on their topological order. It returns a vector of the SDNodes* in
+ /// assigned order.
+ std::vector<SDNode*> AssignTopologicalOrder();
+
void dump() const;
/// InsertISelMapEntry - A helper function to insert a key / element pair