summaryrefslogtreecommitdiffstats
path: root/llvm
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
commitcdd79f2b94d7b08ed758db198dc840fc6228399f (patch)
tree14aad6c80e0474f0445ef553114955e9f394f87d /llvm
parent82cd9c513ea1ee22cde3b7f51b698b39a7587053 (diff)
downloadbcm5719-llvm-cdd79f2b94d7b08ed758db198dc840fc6228399f.tar.gz
bcm5719-llvm-cdd79f2b94d7b08ed758db198dc840fc6228399f.zip
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. llvm-svn: 29478
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAG.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index b7dda01a0a1..b053a3c25aa 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud