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 #ifndef VM_AOT_OPTIMIZER_H_ | 5 #ifndef VM_AOT_OPTIMIZER_H_ |
6 #define VM_AOT_OPTIMIZER_H_ | 6 #define VM_AOT_OPTIMIZER_H_ |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 void ApplyICData(); | 39 void ApplyICData(); |
40 | 40 |
41 // Use propagated class ids to optimize, replace or eliminate instructions. | 41 // Use propagated class ids to optimize, replace or eliminate instructions. |
42 void ApplyClassIds(); | 42 void ApplyClassIds(); |
43 | 43 |
44 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the | 44 // Optimize (a << b) & c pattern: if c is a positive Smi or zero, then the |
45 // shift can be a truncating Smi shift-left and result is always Smi. | 45 // shift can be a truncating Smi shift-left and result is always Smi. |
46 // Merge instructions (only per basic-block). | 46 // Merge instructions (only per basic-block). |
47 void TryOptimizePatterns(); | 47 void TryOptimizePatterns(); |
48 | 48 |
| 49 void ReplaceArrayBoundChecks(); |
| 50 |
49 virtual void VisitStaticCall(StaticCallInstr* instr); | 51 virtual void VisitStaticCall(StaticCallInstr* instr); |
50 virtual void VisitInstanceCall(InstanceCallInstr* instr); | 52 virtual void VisitInstanceCall(InstanceCallInstr* instr); |
51 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr); | 53 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr); |
52 | 54 |
53 void InsertBefore(Instruction* next, | 55 void InsertBefore(Instruction* next, |
54 Instruction* instr, | 56 Instruction* instr, |
55 Environment* env, | 57 Environment* env, |
56 FlowGraph::UseKind use_kind) { | 58 FlowGraph::UseKind use_kind) { |
57 flow_graph_->InsertBefore(next, instr, env, use_kind); | 59 flow_graph_->InsertBefore(next, instr, env, use_kind); |
58 } | 60 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 174 |
173 GrowableArray<intptr_t>* inlining_black_list_; | 175 GrowableArray<intptr_t>* inlining_black_list_; |
174 | 176 |
175 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); | 177 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); |
176 }; | 178 }; |
177 | 179 |
178 | 180 |
179 } // namespace dart | 181 } // namespace dart |
180 | 182 |
181 #endif // VM_AOT_OPTIMIZER_H_ | 183 #endif // VM_AOT_OPTIMIZER_H_ |
OLD | NEW |