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

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
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index ea356b3855c1a15f8f7976c31952d4ba4a1455d3..4f8c749dbcd83f9a486e5f9babbca7449cb1df29 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -2229,29 +2229,19 @@ void RangeAnalysis::RenameDominatedUses(Definition* def,
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();
Kevin Millikin (Google) 2013/01/31 12:44:54 In another change, I will create a single operatio
use->set_definition(other);
use->AddToInputUseList();
- } else {
- prev_use = use;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698