projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9115508
)
Use reserve() to avoid vector reallocation.
author
Jakub Staszak
<kubastaszak@gmail.com>
Wed, 14 Nov 2012 22:42:17 +0000
(22:42 +0000)
committer
Jakub Staszak
<kubastaszak@gmail.com>
Wed, 14 Nov 2012 22:42:17 +0000
(22:42 +0000)
llvm-svn: 167991
llvm/lib/CodeGen/RegisterCoalescer.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/CodeGen/RegisterCoalescer.cpp
b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index
7e662e5
..
df67975
100644
(file)
--- 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),