Index: src/IceInst.cpp |
diff --git a/src/IceInst.cpp b/src/IceInst.cpp |
index 89c57e8a95571924000cc6783747da2bfc6263d1..e1b5f436d9381816e9179899e775ea6a048a61fa 100644 |
--- a/src/IceInst.cpp |
+++ b/src/IceInst.cpp |
@@ -250,6 +250,7 @@ InstBr::InstBr(Cfg *Func, CfgNode *Target) |
NodeList InstBr::getTerminatorEdges() const { |
NodeList OutEdges; |
+ OutEdges.reserve(TargetTrue ? 2 : 1); |
OutEdges.push_back(TargetFalse); |
if (TargetTrue) |
OutEdges.push_back(TargetTrue); |
@@ -409,6 +410,7 @@ void InstSwitch::addBranch(SizeT CaseIndex, uint64_t Value, CfgNode *Label) { |
NodeList InstSwitch::getTerminatorEdges() const { |
NodeList OutEdges; |
+ OutEdges.reserve(NumCases + 1); |
OutEdges.push_back(LabelDefault); |
for (SizeT I = 0; I < NumCases; ++I) { |
OutEdges.push_back(Labels[I]); |