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

Side by Side Diff: frog/leg/ssa/optimize.dart

Issue 9351020: Implement try/catch without finally, and without type checks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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 | « frog/leg/ssa/nodes.dart ('k') | frog/leg/ssa/tracer.dart » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class SsaOptimizerTask extends CompilerTask { 5 class SsaOptimizerTask extends CompilerTask {
6 SsaOptimizerTask(Compiler compiler) : super(compiler); 6 SsaOptimizerTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA optimizer'; 7 String get name() => 'SSA optimizer';
8 8
9 void optimize(WorkItem work, HGraph graph) { 9 void optimize(WorkItem work, HGraph graph) {
10 measure(() { 10 measure(() {
11 if (!work.isBailoutVersion()) { 11 if (!work.isBailoutVersion()) {
12 // TODO(ngeoffray): We should be more fine-grained and still 12 // TODO(ngeoffray): We should be more fine-grained and still
13 // allow type propagation of instructions we know the type. 13 // allow type propagation of instructions we know the type.
14 new SsaTypePropagator(compiler).visitGraph(graph); 14 if (work.allowSpeculativeOptimization) {
15 new SsaTypeGuardBuilder(compiler).visitGraph(graph); 15 new SsaTypePropagator(compiler).visitGraph(graph);
16 new SsaCheckInserter(compiler).visitGraph(graph); 16 new SsaTypeGuardBuilder(compiler).visitGraph(graph);
17 new SsaCheckInserter(compiler).visitGraph(graph);
18 }
17 new SsaConstantFolder(compiler).visitGraph(graph); 19 new SsaConstantFolder(compiler).visitGraph(graph);
18 new SsaRedundantPhiEliminator().visitGraph(graph); 20 new SsaRedundantPhiEliminator().visitGraph(graph);
19 new SsaDeadPhiEliminator().visitGraph(graph); 21 new SsaDeadPhiEliminator().visitGraph(graph);
20 new SsaGlobalValueNumberer(compiler).visitGraph(graph); 22 new SsaGlobalValueNumberer(compiler).visitGraph(graph);
21 new SsaCodeMotion().visitGraph(graph); 23 new SsaCodeMotion().visitGraph(graph);
22 new SsaDeadCodeEliminator().visitGraph(graph); 24 new SsaDeadCodeEliminator().visitGraph(graph);
23 } else { 25 } else {
24 new SsaBailoutBuilder(compiler, work.bailouts).visitGraph(graph); 26 new SsaBailoutBuilder(compiler, work.bailouts).visitGraph(graph);
25 } 27 }
26 }); 28 });
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 } 604 }
603 } 605 }
604 if (!canBeMoved) continue; 606 if (!canBeMoved) continue;
605 607
606 // This is safe because we are running after GVN. 608 // This is safe because we are running after GVN.
607 // TODO(ngeoffray): ensure GVN has been run. 609 // TODO(ngeoffray): ensure GVN has been run.
608 set_.add(current); 610 set_.add(current);
609 } 611 }
610 } 612 }
611 } 613 }
OLDNEW
« no previous file with comments | « frog/leg/ssa/nodes.dart ('k') | frog/leg/ssa/tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698