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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 17101028: Refactor load forwarding pass to use a Place abstraction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months 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 | « runtime/vm/intermediate_language.h ('k') | tests/language/load_to_load_forwarding_vm_test.dart » ('j') | 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 87e5407ce22e6968396bfe23f4293e389e4d84c9..8f48cbe94e77ee0ba41b9850597ecbbe73a3498d 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -937,6 +937,16 @@ void JoinEntryInstr::InsertPhi(PhiInstr* phi) {
phis_->Add(phi);
}
+void JoinEntryInstr::RemovePhi(PhiInstr* phi) {
+ ASSERT(phis_ != NULL);
+ for (intptr_t index = 0; index < phis_->length(); ++index) {
+ if (phi == (*phis_)[index]) {
+ (*phis_)[index] = phis_->Last();
+ phis_->RemoveLast();
+ return;
+ }
+ }
+}
void JoinEntryInstr::RemoveDeadPhis(Definition* replacement) {
if (phis_ == NULL) return;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | tests/language/load_to_load_forwarding_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698