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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 328743003: Update use lists after eliminating redundant phis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 6 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
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 37223)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -7205,9 +7205,9 @@
if (a->is_alive()) {
a->mark_dead();
a->block()->RemovePhi(a);
+ a->UnuseAllInputs();
}
}
-
return true;
}
@@ -7234,9 +7234,7 @@
for (intptr_t i = 0; i < phis_.length(); i++) {
PhiInstr* phi = phis_[i];
if (!phi->HasUses() || EliminateRedundantPhi(phi)) {
- for (intptr_t j = phi->InputCount() - 1; j >= 0; --j) {
- phi->InputAt(j)->RemoveFromUseList();
- }
+ phi->UnuseAllInputs();
phis_[i] = NULL;
}
}
@@ -7246,9 +7244,7 @@
for (intptr_t i = 0; i < phis_.length(); i++) {
PhiInstr* phi = phis_[i];
if ((phi != NULL) && (!phi->HasUses() || !EmitPhi(phi))) {
- for (intptr_t j = phi->InputCount() - 1; j >= 0; --j) {
- phi->InputAt(j)->RemoveFromUseList();
- }
+ phi->UnuseAllInputs();
}
}
}
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698