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

Unified Diff: runtime/vm/compiler.cc

Issue 10949020: Reapply "Initial implementation of sparse conditional constant propagation." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase to HEAD. Created 8 years, 3 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/lib/integers.cc ('k') | runtime/vm/flow_graph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index a8fff537219b110e7836dfbf0d3db1a4a2efeea6..d430e0a01acb0bf358bcdab06ba63367db2420e4 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -35,6 +35,8 @@ DEFINE_FLAG(bool, disassemble, false, "Disassemble dart code.");
DEFINE_FLAG(bool, disassemble_optimized, false, "Disassemble optimized code.");
DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler.");
DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations.");
+DEFINE_FLAG(bool, cp, true,
Ivan Posva 2012/09/19 22:20:18 This is a perfect example of a bad flag name. I am
+ "Do conditional constant propagation/unreachable code elimination.");
DEFINE_FLAG(bool, cse, true, "Do common subexpression elimination.");
Ivan Posva 2012/09/19 22:20:18 ditto
DEFINE_FLAG(bool, licm, true, "Do loop invariant code motion.");
Ivan Posva 2012/09/19 22:20:18 ditto
DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
@@ -195,13 +197,10 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
flow_graph->ComputeUseLists();
optimizer.SelectRepresentations();
- if (FLAG_cse) {
- flow_graph->ComputeUseLists();
- DominatorBasedCSE::Optimize(flow_graph);
- }
- if (FLAG_licm) {
- LICM::Optimize(flow_graph);
- }
+ if (FLAG_cp || FLAG_cse) flow_graph->ComputeUseLists();
+ if (FLAG_cp) ConstantPropagator::Optimize(flow_graph);
+ if (FLAG_cse) DominatorBasedCSE::Optimize(flow_graph);
+ if (FLAG_licm) LICM::Optimize(flow_graph);
// Perform register allocation on the SSA graph.
FlowGraphAllocator allocator(*flow_graph);
« no previous file with comments | « runtime/lib/integers.cc ('k') | runtime/vm/flow_graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698