Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: src/IceInst.cpp

Issue 760973002: Subzero: Improve malloc/free behavior. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceGlobalContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
« no previous file with comments | « src/IceGlobalContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698