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_FLOW_GRAPH_OPTIMIZER_H_ | 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_ |
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ | 6 #define VM_FLOW_GRAPH_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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); | 82 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
83 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind); | 83 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind); |
84 | 84 |
85 bool TryInlineInstanceGetter(InstanceCallInstr* call); | 85 bool TryInlineInstanceGetter(InstanceCallInstr* call); |
86 bool TryInlineInstanceSetter(InstanceCallInstr* call, | 86 bool TryInlineInstanceSetter(InstanceCallInstr* call, |
87 const ICData& unary_ic_data); | 87 const ICData& unary_ic_data); |
88 | 88 |
89 bool TryInlineInstanceMethod(InstanceCallInstr* call); | 89 bool TryInlineInstanceMethod(InstanceCallInstr* call); |
90 bool TryInlineFloat32x4Method(InstanceCallInstr* call, | 90 bool TryInlineFloat32x4Method(InstanceCallInstr* call, |
91 MethodRecognizer::Kind recognized_kind); | 91 MethodRecognizer::Kind recognized_kind); |
| 92 bool TryInlineUint32x4Method(InstanceCallInstr* call, |
| 93 MethodRecognizer::Kind recognized_kind); |
92 void ReplaceWithInstanceOf(InstanceCallInstr* instr); | 94 void ReplaceWithInstanceOf(InstanceCallInstr* instr); |
93 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 95 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
94 | 96 |
95 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, | 97 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, |
96 intptr_t cid); | 98 intptr_t cid); |
97 | 99 |
98 bool BuildByteArrayViewLoad(InstanceCallInstr* call, | 100 bool BuildByteArrayViewLoad(InstanceCallInstr* call, |
99 intptr_t receiver_cid, | 101 intptr_t receiver_cid, |
100 intptr_t view_cid); | 102 intptr_t view_cid); |
101 bool BuildByteArrayViewStore(InstanceCallInstr* call, | 103 bool BuildByteArrayViewStore(InstanceCallInstr* call, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 Representation to, | 137 Representation to, |
136 Value* use, | 138 Value* use, |
137 Instruction* insert_before, | 139 Instruction* insert_before, |
138 Instruction* deopt_target); | 140 Instruction* deopt_target); |
139 | 141 |
140 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; | 142 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; |
141 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; | 143 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; |
142 | 144 |
143 bool InlineFloat32x4Getter(InstanceCallInstr* call, | 145 bool InlineFloat32x4Getter(InstanceCallInstr* call, |
144 MethodRecognizer::Kind getter); | 146 MethodRecognizer::Kind getter); |
| 147 bool InlineUint32x4Getter(InstanceCallInstr* call, |
| 148 MethodRecognizer::Kind getter); |
145 | 149 |
146 void InlineImplicitInstanceGetter(InstanceCallInstr* call); | 150 void InlineImplicitInstanceGetter(InstanceCallInstr* call); |
147 void InlineArrayLengthGetter(InstanceCallInstr* call, | 151 void InlineArrayLengthGetter(InstanceCallInstr* call, |
148 intptr_t length_offset, | 152 intptr_t length_offset, |
149 bool is_immutable, | 153 bool is_immutable, |
150 MethodRecognizer::Kind kind); | 154 MethodRecognizer::Kind kind); |
151 void InlineGrowableArrayCapacityGetter(InstanceCallInstr* call); | 155 void InlineGrowableArrayCapacityGetter(InstanceCallInstr* call); |
152 void InlineStringLengthGetter(InstanceCallInstr* call); | 156 void InlineStringLengthGetter(InstanceCallInstr* call); |
153 void InlineStringIsEmptyGetter(InstanceCallInstr* call); | 157 void InlineStringIsEmptyGetter(InstanceCallInstr* call); |
154 | 158 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Optimize spill stores inside try-blocks by identifying values that always | 355 // Optimize spill stores inside try-blocks by identifying values that always |
352 // contain a single known constant at catch block entry. | 356 // contain a single known constant at catch block entry. |
353 class TryCatchAnalyzer : public AllStatic { | 357 class TryCatchAnalyzer : public AllStatic { |
354 public: | 358 public: |
355 static void Optimize(FlowGraph* flow_graph); | 359 static void Optimize(FlowGraph* flow_graph); |
356 }; | 360 }; |
357 | 361 |
358 } // namespace dart | 362 } // namespace dart |
359 | 363 |
360 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 364 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
OLD | NEW |