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 | |
51 virtual void VisitStaticCall(StaticCallInstr* instr); | 49 virtual void VisitStaticCall(StaticCallInstr* instr); |
52 virtual void VisitInstanceCall(InstanceCallInstr* instr); | 50 virtual void VisitInstanceCall(InstanceCallInstr* instr); |
53 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr); | 51 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr); |
54 | 52 |
55 void InsertBefore(Instruction* next, | 53 void InsertBefore(Instruction* next, |
56 Instruction* instr, | 54 Instruction* instr, |
57 Environment* env, | 55 Environment* env, |
58 FlowGraph::UseKind use_kind) { | 56 FlowGraph::UseKind use_kind) { |
59 flow_graph_->InsertBefore(next, instr, env, use_kind); | 57 flow_graph_->InsertBefore(next, instr, env, use_kind); |
60 } | 58 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 172 |
175 GrowableArray<intptr_t>* inlining_black_list_; | 173 GrowableArray<intptr_t>* inlining_black_list_; |
176 | 174 |
177 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); | 175 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); |
178 }; | 176 }; |
179 | 177 |
180 | 178 |
181 } // namespace dart | 179 } // namespace dart |
182 | 180 |
183 #endif // VM_AOT_OPTIMIZER_H_ | 181 #endif // VM_AOT_OPTIMIZER_H_ |
OLD | NEW |