summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-08 23:32:44 +0000
committerChris Lattner <sabre@nondot.org>2005-11-08 23:32:44 +0000
commitc4d6050db6c4793751ac63ea67971687dcbaab74 (patch)
treeeb4e906094ddda21c39aa2e878fb7a53792986cb /llvm/lib/CodeGen
parent88fa11c3d545eccdba9239cf0a455bbe435cff0e (diff)
downloadbcm5719-llvm-c4d6050db6c4793751ac63ea67971687dcbaab74.tar.gz
bcm5719-llvm-c4d6050db6c4793751ac63ea67971687dcbaab74.zip
Allocate the right amount of memory for this vector up front.
llvm-svn: 24252
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e17a9080cc3..eb057548391 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -409,6 +409,7 @@ void SelectionDAGLegalize::LegalizeDAG() {
// node is only legalized after all of its operands are legalized.
std::map<SDNode*, unsigned> Visited;
std::vector<SDNode*> Order;
+ Order.reserve(DAG.allnodes_end()-DAG.allnodes_begin());
// Compute ordering from all of the leaves in the graphs, those (like the
// entry node) that have no operands.
OpenPOWER on IntegriCloud