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 RUNTIME_VM_AOT_OPTIMIZER_H_ | 5 #ifndef RUNTIME_VM_AOT_OPTIMIZER_H_ |
6 #define RUNTIME_VM_AOT_OPTIMIZER_H_ | 6 #define RUNTIME_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 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 class CSEInstructionMap; | 13 class CSEInstructionMap; |
14 template <typename T> class GrowableArray; | 14 template <typename T> |
| 15 class GrowableArray; |
15 class ParsedFunction; | 16 class ParsedFunction; |
16 class Precompiler; | 17 class Precompiler; |
17 class RawBool; | 18 class RawBool; |
18 | 19 |
19 class AotOptimizer : public FlowGraphVisitor { | 20 class AotOptimizer : public FlowGraphVisitor { |
20 public: | 21 public: |
21 AotOptimizer(Precompiler* precompiler, | 22 AotOptimizer(Precompiler* precompiler, |
22 FlowGraph* flow_graph, | 23 FlowGraph* flow_graph, |
23 bool use_speculative_inlining, | 24 bool use_speculative_inlining, |
24 GrowableArray<intptr_t>* inlining_black_list); | 25 GrowableArray<intptr_t>* inlining_black_list); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void AddReceiverCheck(InstanceCallInstr* call); | 104 void AddReceiverCheck(InstanceCallInstr* call); |
104 | 105 |
105 void ReplaceCall(Definition* call, Definition* replacement); | 106 void ReplaceCall(Definition* call, Definition* replacement); |
106 | 107 |
107 bool RecognizeRuntimeTypeGetter(InstanceCallInstr* call); | 108 bool RecognizeRuntimeTypeGetter(InstanceCallInstr* call); |
108 bool TryReplaceWithHaveSameRuntimeType(InstanceCallInstr* call); | 109 bool TryReplaceWithHaveSameRuntimeType(InstanceCallInstr* call); |
109 | 110 |
110 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call, | 111 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call, |
111 RawFunction::Kind kind) const; | 112 RawFunction::Kind kind) const; |
112 | 113 |
113 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, | 114 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
114 Token::Kind op_kind); | 115 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
115 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, | 116 bool InlineFloat64x2BinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
116 Token::Kind op_kind); | |
117 bool InlineFloat64x2BinaryOp(InstanceCallInstr* call, | |
118 Token::Kind op_kind); | |
119 bool InlineImplicitInstanceGetter(InstanceCallInstr* call); | 117 bool InlineImplicitInstanceGetter(InstanceCallInstr* call); |
120 | 118 |
121 RawBool* InstanceOfAsBool(const ICData& ic_data, | 119 RawBool* InstanceOfAsBool(const ICData& ic_data, |
122 const AbstractType& type, | 120 const AbstractType& type, |
123 ZoneGrowableArray<intptr_t>* results) const; | 121 ZoneGrowableArray<intptr_t>* results) const; |
124 | 122 |
125 void ReplaceWithMathCFunction(InstanceCallInstr* call, | 123 void ReplaceWithMathCFunction(InstanceCallInstr* call, |
126 MethodRecognizer::Kind recognized_kind); | 124 MethodRecognizer::Kind recognized_kind); |
127 | 125 |
128 bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind); | 126 bool TryStringLengthOneEquality(InstanceCallInstr* call, Token::Kind op_kind); |
(...skipping 17 matching lines...) Expand all Loading... |
146 | 144 |
147 bool has_unique_no_such_method_; | 145 bool has_unique_no_such_method_; |
148 | 146 |
149 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); | 147 DISALLOW_COPY_AND_ASSIGN(AotOptimizer); |
150 }; | 148 }; |
151 | 149 |
152 | 150 |
153 } // namespace dart | 151 } // namespace dart |
154 | 152 |
155 #endif // RUNTIME_VM_AOT_OPTIMIZER_H_ | 153 #endif // RUNTIME_VM_AOT_OPTIMIZER_H_ |
OLD | NEW |