diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-11-14 22:42:17 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-11-14 22:42:17 +0000 |
commit | 8762a6bc2b83dfc11e784772311ad0b8fa5211e2 (patch) | |
tree | 8bbbd990ea8442a332df165d649c27ad0b14bb52 | |
parent | 0e52f46e485b6c53dddcf50e6da36f508f87a69c (diff) | |
download | external_llvm-8762a6bc2b83dfc11e784772311ad0b8fa5211e2.zip external_llvm-8762a6bc2b83dfc11e784772311ad0b8fa5211e2.tar.gz external_llvm-8762a6bc2b83dfc11e784772311ad0b8fa5211e2.tar.bz2 |
Use reserve() to avoid vector reallocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167991 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/RegisterCoalescer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index 7e662e5..df67975 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -2068,6 +2068,7 @@ void RegisterCoalescer::joinAllIntervals() { assert(WorkList.empty() && LocalWorkList.empty() && "Old data still around."); std::vector<MBBPriorityInfo> MBBs; + MBBs.reserve(MF->size()); for (MachineFunction::iterator I = MF->begin(), E = MF->end();I != E;++I){ MachineBasicBlock *MBB = I; MBBs.push_back(MBBPriorityInfo(MBB, Loops->getLoopDepth(MBB), |