AssignTopologicalOrder now returns the vector of SDNode* by reference to
authorEvan Cheng <evan.cheng@apple.com>
Wed, 2 Aug 2006 21:58:44 +0000 (21:58 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 2 Aug 2006 21:58:44 +0000 (21:58 +0000)
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

include/llvm/CodeGen/SelectionDAG.h

index b7dda01a0a1eba1c8f2296014527486f29005c56..b053a3c25aa8a2e7c8b7c40e8aea679525132f15 100644 (file)
@@ -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;