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

Unified Diff: runtime/vm/compiler.cc

Issue 143263010: Implement simple dead store elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 35904)
+++ runtime/vm/compiler.cc (working copy)
@@ -438,12 +438,8 @@
}
}
- // Optimize (a << b) & c patterns, merge operations.
- // Run after CSE in order to have more opportunity to merge
- // instructions that have same inputs.
- optimizer.TryOptimizePatterns();
- DEBUG_ASSERT(flow_graph->VerifyUseLists());
-
+ // Run loop-invariant code motion right after load elimination since it
+ // depends on the numbering of loads from the previous load-elimination.
if (FLAG_loop_invariant_code_motion) {
LICM licm(flow_graph);
licm.Optimize();
@@ -451,6 +447,14 @@
}
flow_graph->RemoveRedefinitions();
+ // Optimize (a << b) & c patterns, merge operations.
+ // Run after CSE in order to have more opportunity to merge
+ // instructions that have same inputs.
+ optimizer.TryOptimizePatterns();
+ DEBUG_ASSERT(flow_graph->VerifyUseLists());
+
+ DeadStoreElimination::Optimize(flow_graph);
+
if (FLAG_range_analysis) {
// Propagate types after store-load-forwarding. Some phis may have
// become smi phis that can be processed by range analysis.
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698