| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); | 104 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 105 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); | 105 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 106 | 106 |
| 107 bool TryInlineInstanceGetter(InstanceCallInstr* call); | 107 bool TryInlineInstanceGetter(InstanceCallInstr* call); |
| 108 bool TryInlineInstanceSetter(InstanceCallInstr* call, | 108 bool TryInlineInstanceSetter(InstanceCallInstr* call, |
| 109 const ICData& unary_ic_data); | 109 const ICData& unary_ic_data); |
| 110 | 110 |
| 111 bool TryInlineInstanceMethod(InstanceCallInstr* call); | 111 bool TryInlineInstanceMethod(InstanceCallInstr* call); |
| 112 bool TryInlineFloat32x4Constructor(StaticCallInstr* call, | 112 bool TryInlineFloat32x4Constructor(StaticCallInstr* call, |
| 113 MethodRecognizer::Kind recognized_kind); | 113 MethodRecognizer::Kind recognized_kind); |
| 114 bool TryInlineFloat64x2Constructor(StaticCallInstr* call, |
| 115 MethodRecognizer::Kind recognized_kind); |
| 114 bool TryInlineInt32x4Constructor(StaticCallInstr* call, | 116 bool TryInlineInt32x4Constructor(StaticCallInstr* call, |
| 115 MethodRecognizer::Kind recognized_kind); | 117 MethodRecognizer::Kind recognized_kind); |
| 116 bool TryInlineFloat32x4Method(InstanceCallInstr* call, | 118 bool TryInlineFloat32x4Method(InstanceCallInstr* call, |
| 117 MethodRecognizer::Kind recognized_kind); | 119 MethodRecognizer::Kind recognized_kind); |
| 120 bool TryInlineFloat64x2Method(InstanceCallInstr* call, |
| 121 MethodRecognizer::Kind recognized_kind); |
| 118 bool TryInlineInt32x4Method(InstanceCallInstr* call, | 122 bool TryInlineInt32x4Method(InstanceCallInstr* call, |
| 119 MethodRecognizer::Kind recognized_kind); | 123 MethodRecognizer::Kind recognized_kind); |
| 120 void ReplaceWithInstanceOf(InstanceCallInstr* instr); | 124 void ReplaceWithInstanceOf(InstanceCallInstr* instr); |
| 121 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 125 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
| 122 | 126 |
| 123 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); | 127 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); |
| 124 | 128 |
| 125 Definition* PrepareInlineStringIndexOp(Instruction* call, | 129 Definition* PrepareInlineStringIndexOp(Instruction* call, |
| 126 intptr_t cid, | 130 intptr_t cid, |
| 127 Definition* str, | 131 Definition* str, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 void InsertConversion(Representation from, | 205 void InsertConversion(Representation from, |
| 202 Representation to, | 206 Representation to, |
| 203 Value* use, | 207 Value* use, |
| 204 bool is_environment_use); | 208 bool is_environment_use); |
| 205 | 209 |
| 206 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; | 210 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; |
| 207 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; | 211 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; |
| 208 | 212 |
| 209 bool InlineFloat32x4Getter(InstanceCallInstr* call, | 213 bool InlineFloat32x4Getter(InstanceCallInstr* call, |
| 210 MethodRecognizer::Kind getter); | 214 MethodRecognizer::Kind getter); |
| 215 bool InlineFloat64x2Getter(InstanceCallInstr* call, |
| 216 MethodRecognizer::Kind getter); |
| 211 bool InlineInt32x4Getter(InstanceCallInstr* call, | 217 bool InlineInt32x4Getter(InstanceCallInstr* call, |
| 212 MethodRecognizer::Kind getter); | 218 MethodRecognizer::Kind getter); |
| 213 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, | 219 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, |
| 214 Token::Kind op_kind); | 220 Token::Kind op_kind); |
| 215 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, | 221 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, |
| 216 Token::Kind op_kind); | 222 Token::Kind op_kind); |
| 223 bool InlineFloat64x2BinaryOp(InstanceCallInstr* call, |
| 224 Token::Kind op_kind); |
| 217 void InlineImplicitInstanceGetter(InstanceCallInstr* call); | 225 void InlineImplicitInstanceGetter(InstanceCallInstr* call); |
| 218 | 226 |
| 219 RawBool* InstanceOfAsBool(const ICData& ic_data, | 227 RawBool* InstanceOfAsBool(const ICData& ic_data, |
| 220 const AbstractType& type) const; | 228 const AbstractType& type) const; |
| 221 | 229 |
| 222 void ReplaceWithMathCFunction(InstanceCallInstr* call, | 230 void ReplaceWithMathCFunction(InstanceCallInstr* call, |
| 223 MethodRecognizer::Kind recognized_kind); | 231 MethodRecognizer::Kind recognized_kind); |
| 224 | 232 |
| 225 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, | 233 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, |
| 226 Definition* left_instr, | 234 Definition* left_instr, |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // Optimize spill stores inside try-blocks by identifying values that always | 417 // Optimize spill stores inside try-blocks by identifying values that always |
| 410 // contain a single known constant at catch block entry. | 418 // contain a single known constant at catch block entry. |
| 411 class TryCatchAnalyzer : public AllStatic { | 419 class TryCatchAnalyzer : public AllStatic { |
| 412 public: | 420 public: |
| 413 static void Optimize(FlowGraph* flow_graph); | 421 static void Optimize(FlowGraph* flow_graph); |
| 414 }; | 422 }; |
| 415 | 423 |
| 416 } // namespace dart | 424 } // namespace dart |
| 417 | 425 |
| 418 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 426 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |