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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 12079096: Make use lists into doubly-linked lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/flow_graph.cc ('k') | runtime/vm/intermediate_language.h » ('j') | 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 17923)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -2229,29 +2229,19 @@
Instruction* dom,
Definition* other) {
Value* next_use = NULL;
- Value* prev_use = NULL;
for (Value* use = def->input_use_list();
use != NULL;
use = next_use) {
next_use = use->next_use();
// Skip dead phis.
- if (use->instruction()->IsPhi() &&
- !use->instruction()->AsPhi()->is_alive()) {
- prev_use = use;
- continue;
- }
+ PhiInstr* phi = use->instruction()->AsPhi();
+ if ((phi != NULL) && !phi->is_alive()) continue;
if (IsDominatedUse(dom, use)) {
- if (prev_use != NULL) {
- prev_use->set_next_use(next_use);
- } else {
- def->set_input_use_list(next_use);
- }
+ use->RemoveFromInputUseList();
use->set_definition(other);
use->AddToInputUseList();
- } else {
- prev_use = use;
}
}
}
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698