Do not reserve space for the ColdEdges and NormalEdges vectors.

Discussion and rationale at
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130520/175698.html

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Diego Novillo 2013-05-24 17:00:22 +00:00
parent bfe3212dd8
commit fe808927ac

View File

@ -222,9 +222,7 @@ bool BranchProbabilityInfo::calcColdCallHeuristics(BasicBlock *BB) {
// Determine which successors are post-dominated by a cold block. // Determine which successors are post-dominated by a cold block.
SmallVector<unsigned, 4> ColdEdges; SmallVector<unsigned, 4> ColdEdges;
ColdEdges.reserve(TI->getNumSuccessors());
SmallVector<unsigned, 4> NormalEdges; SmallVector<unsigned, 4> NormalEdges;
NormalEdges.reserve(TI->getNumSuccessors());
for (succ_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I) for (succ_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I)
if (PostDominatedByColdCall.count(*I)) if (PostDominatedByColdCall.count(*I))
ColdEdges.push_back(I.getSuccessorIndex()); ColdEdges.push_back(I.getSuccessorIndex());