Index: frog/leg/ssa/optimize.dart |
=================================================================== |
--- frog/leg/ssa/optimize.dart (revision 4024) |
+++ frog/leg/ssa/optimize.dart (working copy) |
@@ -11,9 +11,11 @@ |
if (!work.isBailoutVersion()) { |
// TODO(ngeoffray): We should be more fine-grained and still |
// allow type propagation of instructions we know the type. |
- new SsaTypePropagator(compiler).visitGraph(graph); |
- new SsaTypeGuardBuilder(compiler).visitGraph(graph); |
- new SsaCheckInserter(compiler).visitGraph(graph); |
+ if (work.allowSpeculativeOptimization) { |
+ new SsaTypePropagator(compiler).visitGraph(graph); |
+ new SsaTypeGuardBuilder(compiler).visitGraph(graph); |
+ new SsaCheckInserter(compiler).visitGraph(graph); |
+ } |
new SsaConstantFolder(compiler).visitGraph(graph); |
new SsaRedundantPhiEliminator().visitGraph(graph); |
new SsaDeadPhiEliminator().visitGraph(graph); |