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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 1419553005: VM: Don't rely on always running constant propagation in the optimizer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 4c7cc958c015a69bb1839daa7f0db359bdad9ef2..84ffb0ebd1c7ecb4db4929e1af1679d66ee0c8ea 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -548,6 +548,10 @@ void InlineExitCollector::ReplaceCall(TargetEntryInstr* callee_entry) {
call_->previous()->AppendInstruction(branch);
call_block->set_last_instruction(branch);
+ // Replace uses of the return value with null to maintain valid
+ // SSA form - even though the rest of the caller is unreachable.
+ call_->ReplaceUsesWith(caller_graph_->constant_null());
+
// Update dominator tree.
call_block->AddDominatedBlock(callee_entry);
call_block->AddDominatedBlock(false_block);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698