From 8762a6bc2b83dfc11e784772311ad0b8fa5211e2 Mon Sep 17 00:00:00 2001 From: Jakub Staszak Date: Wed, 14 Nov 2012 22:42:17 +0000 Subject: Use reserve() to avoid vector reallocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167991 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterCoalescer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/CodeGen/RegisterCoalescer.cpp') 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 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), -- cgit v1.1