| 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 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 class CSEInstructionMap; | 13 class CSEInstructionMap; |
| 14 template <typename T> class GrowableArray; | 14 template <typename T> class GrowableArray; |
| 15 class ParsedFunction; | 15 class ParsedFunction; |
| 16 | 16 |
| 17 class FlowGraphOptimizer : public FlowGraphVisitor { | 17 class FlowGraphOptimizer : public FlowGraphVisitor { |
| 18 public: | 18 public: |
| 19 explicit FlowGraphOptimizer( | 19 FlowGraphOptimizer( |
| 20 FlowGraph* flow_graph, | 20 FlowGraph* flow_graph, |
| 21 bool use_speculative_inlining, | 21 bool use_speculative_inlining, |
| 22 GrowableArray<intptr_t>* inlining_black_list) | 22 GrowableArray<intptr_t>* inlining_black_list) |
| 23 : FlowGraphVisitor(flow_graph->reverse_postorder()), | 23 : FlowGraphVisitor(flow_graph->reverse_postorder()), |
| 24 flow_graph_(flow_graph), | 24 flow_graph_(flow_graph), |
| 25 use_speculative_inlining_(use_speculative_inlining), | 25 use_speculative_inlining_(use_speculative_inlining), |
| 26 inlining_black_list_(inlining_black_list) { | 26 inlining_black_list_(inlining_black_list) { |
| 27 ASSERT(!use_speculative_inlining || (inlining_black_list != NULL)); | 27 ASSERT(!use_speculative_inlining || (inlining_black_list != NULL)); |
| 28 } | 28 } |
| 29 virtual ~FlowGraphOptimizer() {} | 29 virtual ~FlowGraphOptimizer() {} |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 // Optimize spill stores inside try-blocks by identifying values that always | 447 // Optimize spill stores inside try-blocks by identifying values that always |
| 448 // contain a single known constant at catch block entry. | 448 // contain a single known constant at catch block entry. |
| 449 class TryCatchAnalyzer : public AllStatic { | 449 class TryCatchAnalyzer : public AllStatic { |
| 450 public: | 450 public: |
| 451 static void Optimize(FlowGraph* flow_graph); | 451 static void Optimize(FlowGraph* flow_graph); |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 } // namespace dart | 454 } // namespace dart |
| 455 | 455 |
| 456 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 456 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |