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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 10855101: RemoveFromGraph on definitions asserts empty use lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Corrected invariants of def-use chains. Created 8 years, 4 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_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index b24028dc0a904457a6096e86baf3dc4adb390599..f65dc45f7b1c0430bfb1aa59e30b0bbe0abe8d1b 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -146,7 +146,14 @@ static bool HasOnlyTwoDouble(const ICData& ic_data) {
static void RemovePushArguments(InstanceCallComp* comp) {
// Remove original push arguments.
for (intptr_t i = 0; i < comp->ArgumentCount(); ++i) {
- comp->ArgumentAt(i)->RemoveFromGraph();
+ PushArgumentInstr* push = comp->ArgumentAt(i);
+ // TODO(zerny): Currently the register allocator replaces unused pushes with
+ // their definitions. To do so here, we need first to link uses to their
+ // instructions and input index. Here push->ReplaceUsesWith requires that
+ // push->value() is a UseVal.
+ // (See FlowGraphAllocator::EliminateEnvironmentUses).
+ push->set_use_list(NULL);
+ push->RemoveFromGraph();
}
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698