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

Unified Diff: vm/compiler.cc

Issue 10830275: Optimize expressions of the form (expr === true) when expr has boolean type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: ready for review 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 | « no previous file | vm/flow_graph_optimizer.h » ('j') | vm/intermediate_language.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/compiler.cc
===================================================================
--- vm/compiler.cc (revision 10497)
+++ vm/compiler.cc (working copy)
@@ -178,6 +178,9 @@
FlowGraphTypePropagator propagator(parsed_function, block_order);
propagator.PropagateTypes();
+ // Do optimizations that depend on the propagated type information.
+ optimizer.OptimizeComputations();
+
if (use_ssa) {
// Perform register allocation on the SSA graph.
FlowGraphAllocator allocator(block_order, &graph_builder);
@@ -387,8 +390,7 @@
}
if (FLAG_disassemble) {
DisassembleCode(function, optimized);
- }
- if (FLAG_disassemble_optimized && optimized) {
+ } else if (FLAG_disassemble_optimized && optimized) {
// Print unoptimized code along with the optimized code.
DisassembleCode(function, false);
DisassembleCode(function, true);
« no previous file with comments | « no previous file | vm/flow_graph_optimizer.h » ('j') | vm/intermediate_language.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698