| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 RawBool* InstanceOfAsBool(const ICData& ic_data, | 198 RawBool* InstanceOfAsBool(const ICData& ic_data, |
| 199 const AbstractType& type) const; | 199 const AbstractType& type) const; |
| 200 | 200 |
| 201 void ReplaceWithMathCFunction(InstanceCallInstr* call, | 201 void ReplaceWithMathCFunction(InstanceCallInstr* call, |
| 202 MethodRecognizer::Kind recognized_kind); | 202 MethodRecognizer::Kind recognized_kind); |
| 203 | 203 |
| 204 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, | 204 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, |
| 205 Definition* left_instr, | 205 Definition* left_instr, |
| 206 Definition* right_instr); | 206 Definition* right_instr); |
| 207 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates); | 207 void TryMergeTruncDivMod(GrowableArray<BinarySmiOpInstr*>* merge_candidates); |
| 208 void TryMergeMathUnary(GrowableArray<MathUnaryInstr*>* merge_candidates); |
| 209 |
| 210 void AppendLoadIndexedForMerged(Definition* instr, intptr_t ix, intptr_t cid); |
| 208 | 211 |
| 209 FlowGraph* flow_graph_; | 212 FlowGraph* flow_graph_; |
| 210 | 213 |
| 211 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); | 214 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); |
| 212 }; | 215 }; |
| 213 | 216 |
| 214 | 217 |
| 215 // Loop invariant code motion. | 218 // Loop invariant code motion. |
| 216 class LICM : public ValueObject { | 219 class LICM : public ValueObject { |
| 217 public: | 220 public: |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Optimize spill stores inside try-blocks by identifying values that always | 386 // Optimize spill stores inside try-blocks by identifying values that always |
| 384 // contain a single known constant at catch block entry. | 387 // contain a single known constant at catch block entry. |
| 385 class TryCatchAnalyzer : public AllStatic { | 388 class TryCatchAnalyzer : public AllStatic { |
| 386 public: | 389 public: |
| 387 static void Optimize(FlowGraph* flow_graph); | 390 static void Optimize(FlowGraph* flow_graph); |
| 388 }; | 391 }; |
| 389 | 392 |
| 390 } // namespace dart | 393 } // namespace dart |
| 391 | 394 |
| 392 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 395 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |