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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11505002: Improve redundant load elimination (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 8 years 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
« runtime/vm/flow_graph_optimizer.cc ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 3fd0394bfb05cba44683eb24e9c5c63250497c33..74d49d7f5f4a484ab0cd796a2dfb8dde86ab3299 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -867,6 +867,16 @@ void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
}
+void JoinEntryInstr::InsertPhi(PhiInstr* phi) {
+ // Lazily initialize the array of phis.
+ if (phis_ == NULL) {
+ phis_ = new ZoneGrowableArray<PhiInstr*>(1);
+ }
+ phis_->Add(phi);
+ phi_count_++;
+}
+
+
void JoinEntryInstr::RemoveDeadPhis() {
if (phis_ == NULL) return;
« runtime/vm/flow_graph_optimizer.cc ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698