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

Side by Side Diff: runtime/vm/compiler.cc

Issue 10989077: Run canonicalization again after constant propagation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_compiler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // Unbox doubles. 202 // Unbox doubles.
203 flow_graph->ComputeUseLists(); 203 flow_graph->ComputeUseLists();
204 optimizer.SelectRepresentations(); 204 optimizer.SelectRepresentations();
205 205
206 if (FLAG_constant_propagation || 206 if (FLAG_constant_propagation ||
207 FLAG_common_subexpression_elimination) { 207 FLAG_common_subexpression_elimination) {
208 flow_graph->ComputeUseLists(); 208 flow_graph->ComputeUseLists();
209 } 209 }
210 if (FLAG_constant_propagation) { 210 if (FLAG_constant_propagation) {
211 ConstantPropagator::Optimize(flow_graph); 211 ConstantPropagator::Optimize(flow_graph);
212 // A canonicalization pass to remove e.g. smi checks on smi constants.
213 optimizer.OptimizeComputations();
212 } 214 }
213 if (FLAG_common_subexpression_elimination) { 215 if (FLAG_common_subexpression_elimination) {
214 DominatorBasedCSE::Optimize(flow_graph); 216 DominatorBasedCSE::Optimize(flow_graph);
215 } 217 }
216 if (FLAG_loop_invariant_code_motion && 218 if (FLAG_loop_invariant_code_motion &&
217 (parsed_function.function().deoptimization_counter() < 219 (parsed_function.function().deoptimization_counter() <
218 (FLAG_deoptimization_counter_threshold - 1))) { 220 (FLAG_deoptimization_counter_threshold - 1))) {
219 LICM::Optimize(flow_graph); 221 LICM::Optimize(flow_graph);
220 } 222 }
221 223
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 result = isolate->object_store()->sticky_error(); 586 result = isolate->object_store()->sticky_error();
585 isolate->object_store()->clear_sticky_error(); 587 isolate->object_store()->clear_sticky_error();
586 isolate->set_long_jump_base(base); 588 isolate->set_long_jump_base(base);
587 return result.raw(); 589 return result.raw();
588 } 590 }
589 UNREACHABLE(); 591 UNREACHABLE();
590 return Object::null(); 592 return Object::null();
591 } 593 }
592 594
593 } // namespace dart 595 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | runtime/vm/flow_graph_compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698