| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Loop invariant code motion. | 195 // Loop invariant code motion. |
| 196 class LICM : public ValueObject { | 196 class LICM : public ValueObject { |
| 197 public: | 197 public: |
| 198 explicit LICM(FlowGraph* flow_graph); | 198 explicit LICM(FlowGraph* flow_graph); |
| 199 | 199 |
| 200 void Optimize(); | 200 void Optimize(); |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 FlowGraph* flow_graph() const { return flow_graph_; } | 203 FlowGraph* flow_graph() const { return flow_graph_; } |
| 204 | 204 |
| 205 bool MayHoist(Instruction* instr, BlockEntryInstr* pre_header); | |
| 206 | |
| 207 void Hoist(ForwardInstructionIterator* it, | 205 void Hoist(ForwardInstructionIterator* it, |
| 208 BlockEntryInstr* pre_header, | 206 BlockEntryInstr* pre_header, |
| 209 Instruction* current); | 207 Instruction* current); |
| 210 | 208 |
| 211 void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it, | 209 void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it, |
| 212 BlockEntryInstr* header, | 210 BlockEntryInstr* header, |
| 213 BlockEntryInstr* pre_header, | 211 BlockEntryInstr* pre_header, |
| 214 CheckSmiInstr* current); | 212 CheckSmiInstr* current); |
| 215 | 213 |
| 216 FlowGraph* const flow_graph_; | 214 FlowGraph* const flow_graph_; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // Optimize spill stores inside try-blocks by identifying values that always | 363 // Optimize spill stores inside try-blocks by identifying values that always |
| 366 // contain a single known constant at catch block entry. | 364 // contain a single known constant at catch block entry. |
| 367 class TryCatchAnalyzer : public AllStatic { | 365 class TryCatchAnalyzer : public AllStatic { |
| 368 public: | 366 public: |
| 369 static void Optimize(FlowGraph* flow_graph); | 367 static void Optimize(FlowGraph* flow_graph); |
| 370 }; | 368 }; |
| 371 | 369 |
| 372 } // namespace dart | 370 } // namespace dart |
| 373 | 371 |
| 374 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 372 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |