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 | ab0139cb907423ef6d7928ab293451bf60d6117a (patch) | |
tree | 1ebd79c16f8bebd9b63e85b8e75d347be345de17 /llvm/lib | |
parent | 91155087e905b4004beb2865512d3c86a24f9112 (diff) | |
download | bcm5719-llvm-ab0139cb907423ef6d7928ab293451bf60d6117a.tar.gz bcm5719-llvm-ab0139cb907423ef6d7928ab293451bf60d6117a.zip |
Use reserve() to avoid vector reallocation.
llvm-svn: 167991
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 7e662e5385b..df679752860 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/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), |