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

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

Issue 11234002: Enable redundancy elimination for array loads. (Closed) Base URL: http://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_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.h » ('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 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (FLAG_constant_propagation || 208 if (FLAG_constant_propagation ||
209 FLAG_common_subexpression_elimination) { 209 FLAG_common_subexpression_elimination) {
210 flow_graph->ComputeUseLists(); 210 flow_graph->ComputeUseLists();
211 } 211 }
212 if (FLAG_constant_propagation) { 212 if (FLAG_constant_propagation) {
213 ConstantPropagator::Optimize(flow_graph); 213 ConstantPropagator::Optimize(flow_graph);
214 // A canonicalization pass to remove e.g. smi checks on smi constants. 214 // A canonicalization pass to remove e.g. smi checks on smi constants.
215 optimizer.OptimizeComputations(); 215 optimizer.OptimizeComputations();
216 } 216 }
217 if (FLAG_common_subexpression_elimination) { 217 if (FLAG_common_subexpression_elimination) {
218 DominatorBasedCSE::Optimize(flow_graph); 218 if (DominatorBasedCSE::Optimize(flow_graph)) {
219 // Do another round of CSE to take seconary effects into account.
srdjan 2012/10/19 14:45:50 s/seconary/secondary/
srdjan 2012/10/19 14:45:50 Can you give a brief example of secondary effects
Florian Schneider 2012/10/22 10:31:55 Done.
Florian Schneider 2012/10/22 10:31:55 Done.
220 // TODO(fschneider): Change to a one-pass optimization pass.
221 DominatorBasedCSE::Optimize(flow_graph);
222 }
219 } 223 }
220 if (FLAG_loop_invariant_code_motion && 224 if (FLAG_loop_invariant_code_motion &&
221 (parsed_function.function().deoptimization_counter() < 225 (parsed_function.function().deoptimization_counter() <
222 (FLAG_deoptimization_counter_threshold - 1))) { 226 (FLAG_deoptimization_counter_threshold - 1))) {
223 LICM::Optimize(flow_graph); 227 LICM::Optimize(flow_graph);
224 } 228 }
225 229
226 if (FLAG_range_analysis) { 230 if (FLAG_range_analysis) {
227 // We have to perform range analysis after LICM because it 231 // We have to perform range analysis after LICM because it
228 // optimistically moves CheckSmi through phis into loop preheaders 232 // optimistically moves CheckSmi through phis into loop preheaders
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 result = isolate->object_store()->sticky_error(); 593 result = isolate->object_store()->sticky_error();
590 isolate->object_store()->clear_sticky_error(); 594 isolate->object_store()->clear_sticky_error();
591 isolate->set_long_jump_base(base); 595 isolate->set_long_jump_base(base);
592 return result.raw(); 596 return result.raw();
593 } 597 }
594 UNREACHABLE(); 598 UNREACHABLE();
595 return Object::null(); 599 return Object::null();
596 } 600 }
597 601
598 } // namespace dart 602 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698