| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); | 102 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 103 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); | 103 bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind); |
| 104 | 104 |
| 105 bool TryInlineInstanceGetter(InstanceCallInstr* call); | 105 bool TryInlineInstanceGetter(InstanceCallInstr* call); |
| 106 bool TryInlineInstanceSetter(InstanceCallInstr* call, | 106 bool TryInlineInstanceSetter(InstanceCallInstr* call, |
| 107 const ICData& unary_ic_data); | 107 const ICData& unary_ic_data); |
| 108 | 108 |
| 109 bool TryInlineInstanceMethod(InstanceCallInstr* call); | 109 bool TryInlineInstanceMethod(InstanceCallInstr* call); |
| 110 bool TryInlineFloat32x4Constructor(StaticCallInstr* call, | 110 bool TryInlineFloat32x4Constructor(StaticCallInstr* call, |
| 111 MethodRecognizer::Kind recognized_kind); | 111 MethodRecognizer::Kind recognized_kind); |
| 112 bool TryInlineUint32x4Constructor(StaticCallInstr* call, | 112 bool TryInlineInt32x4Constructor(StaticCallInstr* call, |
| 113 MethodRecognizer::Kind recognized_kind); | 113 MethodRecognizer::Kind recognized_kind); |
| 114 bool TryInlineFloat32x4Method(InstanceCallInstr* call, | 114 bool TryInlineFloat32x4Method(InstanceCallInstr* call, |
| 115 MethodRecognizer::Kind recognized_kind); | 115 MethodRecognizer::Kind recognized_kind); |
| 116 bool TryInlineUint32x4Method(InstanceCallInstr* call, | 116 bool TryInlineInt32x4Method(InstanceCallInstr* call, |
| 117 MethodRecognizer::Kind recognized_kind); | 117 MethodRecognizer::Kind recognized_kind); |
| 118 void ReplaceWithInstanceOf(InstanceCallInstr* instr); | 118 void ReplaceWithInstanceOf(InstanceCallInstr* instr); |
| 119 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 119 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
| 120 | 120 |
| 121 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, | 121 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, |
| 122 intptr_t cid); | 122 intptr_t cid); |
| 123 | 123 |
| 124 bool InlineByteArrayViewLoad(Instruction* call, | 124 bool InlineByteArrayViewLoad(Instruction* call, |
| 125 Definition* receiver, | 125 Definition* receiver, |
| 126 intptr_t array_cid, | 126 intptr_t array_cid, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 Representation to, | 179 Representation to, |
| 180 Value* use, | 180 Value* use, |
| 181 Instruction* insert_before, | 181 Instruction* insert_before, |
| 182 Instruction* deopt_target); | 182 Instruction* deopt_target); |
| 183 | 183 |
| 184 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; | 184 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; |
| 185 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; | 185 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; |
| 186 | 186 |
| 187 bool InlineFloat32x4Getter(InstanceCallInstr* call, | 187 bool InlineFloat32x4Getter(InstanceCallInstr* call, |
| 188 MethodRecognizer::Kind getter); | 188 MethodRecognizer::Kind getter); |
| 189 bool InlineUint32x4Getter(InstanceCallInstr* call, | 189 bool InlineInt32x4Getter(InstanceCallInstr* call, |
| 190 MethodRecognizer::Kind getter); | 190 MethodRecognizer::Kind getter); |
| 191 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, | 191 bool InlineFloat32x4BinaryOp(InstanceCallInstr* call, |
| 192 Token::Kind op_kind); | 192 Token::Kind op_kind); |
| 193 bool InlineUint32x4BinaryOp(InstanceCallInstr* call, | 193 bool InlineInt32x4BinaryOp(InstanceCallInstr* call, |
| 194 Token::Kind op_kind); | 194 Token::Kind op_kind); |
| 195 void InlineImplicitInstanceGetter(InstanceCallInstr* call); | 195 void InlineImplicitInstanceGetter(InstanceCallInstr* call); |
| 196 | 196 |
| 197 RawBool* InstanceOfAsBool(const ICData& ic_data, | 197 RawBool* InstanceOfAsBool(const ICData& ic_data, |
| 198 const AbstractType& type) const; | 198 const AbstractType& type) const; |
| 199 | 199 |
| 200 void ReplaceWithMathCFunction(InstanceCallInstr* call, | 200 void ReplaceWithMathCFunction(InstanceCallInstr* call, |
| 201 MethodRecognizer::Kind recognized_kind); | 201 MethodRecognizer::Kind recognized_kind); |
| 202 | 202 |
| 203 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, | 203 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // Optimize spill stores inside try-blocks by identifying values that always | 381 // Optimize spill stores inside try-blocks by identifying values that always |
| 382 // contain a single known constant at catch block entry. | 382 // contain a single known constant at catch block entry. |
| 383 class TryCatchAnalyzer : public AllStatic { | 383 class TryCatchAnalyzer : public AllStatic { |
| 384 public: | 384 public: |
| 385 static void Optimize(FlowGraph* flow_graph); | 385 static void Optimize(FlowGraph* flow_graph); |
| 386 }; | 386 }; |
| 387 | 387 |
| 388 } // namespace dart | 388 } // namespace dart |
| 389 | 389 |
| 390 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 390 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |