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

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

Issue 14021016: Track side-effect free paths in the graph to allow CSE and LICM for instructions that depend on som… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | no next file with comments »
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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 propagator.Propagate(); 238 propagator.Propagate();
239 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 239 DEBUG_ASSERT(flow_graph->VerifyUseLists());
240 } 240 }
241 241
242 // Unbox doubles. Performed after constant propagation to minimize 242 // Unbox doubles. Performed after constant propagation to minimize
243 // interference from phis merging double values and tagged 243 // interference from phis merging double values and tagged
244 // values comming from dead paths. 244 // values comming from dead paths.
245 optimizer.SelectRepresentations(); 245 optimizer.SelectRepresentations();
246 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 246 DEBUG_ASSERT(flow_graph->VerifyUseLists());
247 247
248 if (FLAG_common_subexpression_elimination ||
249 FLAG_loop_invariant_code_motion) {
250 flow_graph->ComputeBlockEffects();
251 }
252
248 if (FLAG_common_subexpression_elimination) { 253 if (FLAG_common_subexpression_elimination) {
249 if (DominatorBasedCSE::Optimize(flow_graph)) { 254 if (DominatorBasedCSE::Optimize(flow_graph)) {
250 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 255 DEBUG_ASSERT(flow_graph->VerifyUseLists());
251 // Do another round of CSE to take secondary effects into account: 256 // Do another round of CSE to take secondary effects into account:
252 // e.g. when eliminating dependent loads (a.x[0] + a.x[0]) 257 // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
253 // TODO(fschneider): Change to a one-pass optimization pass. 258 // TODO(fschneider): Change to a one-pass optimization pass.
254 DominatorBasedCSE::Optimize(flow_graph); 259 DominatorBasedCSE::Optimize(flow_graph);
255 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 260 DEBUG_ASSERT(flow_graph->VerifyUseLists());
256 } 261 }
257 } 262 }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 Object::Handle(isolate->object_store()->sticky_error()); 699 Object::Handle(isolate->object_store()->sticky_error());
695 isolate->object_store()->clear_sticky_error(); 700 isolate->object_store()->clear_sticky_error();
696 isolate->set_long_jump_base(base); 701 isolate->set_long_jump_base(base);
697 return result.raw(); 702 return result.raw();
698 } 703 }
699 UNREACHABLE(); 704 UNREACHABLE();
700 return Object::null(); 705 return Object::null();
701 } 706 }
702 707
703 } // namespace dart 708 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698