| OLD | NEW |
| 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 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 5 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 6 import '../common/names.dart' show Selectors; | 6 import '../common/names.dart' show Selectors; |
| 7 import '../common/tasks.dart' show CompilerTask; | 7 import '../common/tasks.dart' show CompilerTask; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // interceptors are often in the way of LICM'able instructions. | 81 // interceptors are often in the way of LICM'able instructions. |
| 82 new SsaDeadCodeEliminator(closedWorld, this), | 82 new SsaDeadCodeEliminator(closedWorld, this), |
| 83 new SsaGlobalValueNumberer(), | 83 new SsaGlobalValueNumberer(), |
| 84 // After GVN, some instructions might need their type to be | 84 // After GVN, some instructions might need their type to be |
| 85 // updated because they now have different inputs. | 85 // updated because they now have different inputs. |
| 86 new SsaTypePropagator(compiler, closedWorld), | 86 new SsaTypePropagator(compiler, closedWorld), |
| 87 codeMotion = new SsaCodeMotion(), | 87 codeMotion = new SsaCodeMotion(), |
| 88 new SsaLoadElimination(compiler, closedWorld), | 88 new SsaLoadElimination(compiler, closedWorld), |
| 89 new SsaRedundantPhiEliminator(), | 89 new SsaRedundantPhiEliminator(), |
| 90 new SsaDeadPhiEliminator(), | 90 new SsaDeadPhiEliminator(), |
| 91 // After GVN and load elimination the same value may be used in code | |
| 92 // controlled by a test on the value, so redo 'conversion insertion' to | |
| 93 // learn from the refined type. | |
| 94 new SsaTypeConversionInserter(closedWorld), | |
| 95 new SsaTypePropagator(compiler, closedWorld), | 91 new SsaTypePropagator(compiler, closedWorld), |
| 96 new SsaValueRangeAnalyzer(backend.helpers, closedWorld, this), | 92 new SsaValueRangeAnalyzer(backend.helpers, closedWorld, this), |
| 97 // Previous optimizations may have generated new | 93 // Previous optimizations may have generated new |
| 98 // opportunities for instruction simplification. | 94 // opportunities for instruction simplification. |
| 99 new SsaInstructionSimplifier(backend, closedWorld, this, registry), | 95 new SsaInstructionSimplifier(backend, closedWorld, this, registry), |
| 100 new SsaCheckInserter( | 96 new SsaCheckInserter( |
| 101 trustPrimitives, backend, closedWorld, boundsChecked), | 97 trustPrimitives, backend, closedWorld, boundsChecked), |
| 102 ]; | 98 ]; |
| 103 phases.forEach(runPhase); | 99 phases.forEach(runPhase); |
| 104 | 100 |
| (...skipping 2659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2764 | 2760 |
| 2765 keyedValues.forEach((receiver, values) { | 2761 keyedValues.forEach((receiver, values) { |
| 2766 result.keyedValues[receiver] = | 2762 result.keyedValues[receiver] = |
| 2767 new Map<HInstruction, HInstruction>.from(values); | 2763 new Map<HInstruction, HInstruction>.from(values); |
| 2768 }); | 2764 }); |
| 2769 | 2765 |
| 2770 result.nonEscapingReceivers.addAll(nonEscapingReceivers); | 2766 result.nonEscapingReceivers.addAll(nonEscapingReceivers); |
| 2771 return result; | 2767 return result; |
| 2772 } | 2768 } |
| 2773 } | 2769 } |
| OLD | NEW |