| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 CSEInstructionMap* map); | 287 CSEInstructionMap* map); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 | 290 |
| 291 class DeadStoreElimination : public AllStatic { | 291 class DeadStoreElimination : public AllStatic { |
| 292 public: | 292 public: |
| 293 static void Optimize(FlowGraph* graph); | 293 static void Optimize(FlowGraph* graph); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 | 296 |
| 297 class DeadCodeElimination : public AllStatic { |
| 298 public: |
| 299 static void EliminateDeadPhis(FlowGraph* graph); |
| 300 }; |
| 301 |
| 302 |
| 297 // Sparse conditional constant propagation and unreachable code elimination. | 303 // Sparse conditional constant propagation and unreachable code elimination. |
| 298 // Assumes that use lists are computed and preserves them. | 304 // Assumes that use lists are computed and preserves them. |
| 299 class ConstantPropagator : public FlowGraphVisitor { | 305 class ConstantPropagator : public FlowGraphVisitor { |
| 300 public: | 306 public: |
| 301 ConstantPropagator(FlowGraph* graph, | 307 ConstantPropagator(FlowGraph* graph, |
| 302 const GrowableArray<BlockEntryInstr*>& ignored); | 308 const GrowableArray<BlockEntryInstr*>& ignored); |
| 303 | 309 |
| 304 static void Optimize(FlowGraph* graph); | 310 static void Optimize(FlowGraph* graph); |
| 305 | 311 |
| 306 // (1) Visit branches to optimize away unreachable blocks discovered by range | 312 // (1) Visit branches to optimize away unreachable blocks discovered by range |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // Optimize spill stores inside try-blocks by identifying values that always | 441 // Optimize spill stores inside try-blocks by identifying values that always |
| 436 // contain a single known constant at catch block entry. | 442 // contain a single known constant at catch block entry. |
| 437 class TryCatchAnalyzer : public AllStatic { | 443 class TryCatchAnalyzer : public AllStatic { |
| 438 public: | 444 public: |
| 439 static void Optimize(FlowGraph* flow_graph); | 445 static void Optimize(FlowGraph* flow_graph); |
| 440 }; | 446 }; |
| 441 | 447 |
| 442 } // namespace dart | 448 } // namespace dart |
| 443 | 449 |
| 444 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 450 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |