aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-08-02 21:58:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-08-02 21:58:44 +0000
commit09fd736058ec3f69b856ae3ad65177bc31904a8c (patch)
tree8d6932d4442562892b16969211bc1b08800894ba
parentabe0e3e6410ca3f192b6a656cbcd042b05d0a68b (diff)
AssignTopologicalOrder now returns the vector of SDNode* by reference to
avoid the expensive operation of copying a vector. It also returns a maximum id by value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29478 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index b7dda01a0a..b053a3c25a 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -427,9 +427,9 @@ public:
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();
+ /// based on their topological order. It returns the maximum id and a vector
+ /// of the SDNodes* in assigned order by reference.
+ unsigned AssignTopologicalOrder(std::vector<SDNode*> &TopOrder);
void dump() const;