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 23 matching lines...) Expand all Loading... |
34 // Merge instructions (only per basic-block). | 34 // Merge instructions (only per basic-block). |
35 void TryOptimizePatterns(); | 35 void TryOptimizePatterns(); |
36 | 36 |
37 // Returns true if any instructions were canonicalized away. | 37 // Returns true if any instructions were canonicalized away. |
38 bool Canonicalize(); | 38 bool Canonicalize(); |
39 | 39 |
40 void EliminateDeadPhis(); | 40 void EliminateDeadPhis(); |
41 | 41 |
42 void SelectRepresentations(); | 42 void SelectRepresentations(); |
43 | 43 |
44 void InferSmiRanges(); | 44 void InferIntRanges(); |
45 | 45 |
46 void AnalyzeTryCatch(); | 46 void AnalyzeTryCatch(); |
47 | 47 |
48 bool TryInlineRecognizedMethod(intptr_t receiver_cid, | 48 bool TryInlineRecognizedMethod(intptr_t receiver_cid, |
49 const Function& target, | 49 const Function& target, |
50 Instruction* call, | 50 Instruction* call, |
51 Definition* receiver, | 51 Definition* receiver, |
52 intptr_t token_pos, | 52 intptr_t token_pos, |
53 const ICData& ic_data, | 53 const ICData& ic_data, |
54 TargetEntryInstr** entry, | 54 TargetEntryInstr** entry, |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // Optimize spill stores inside try-blocks by identifying values that always | 452 // Optimize spill stores inside try-blocks by identifying values that always |
453 // contain a single known constant at catch block entry. | 453 // contain a single known constant at catch block entry. |
454 class TryCatchAnalyzer : public AllStatic { | 454 class TryCatchAnalyzer : public AllStatic { |
455 public: | 455 public: |
456 static void Optimize(FlowGraph* flow_graph); | 456 static void Optimize(FlowGraph* flow_graph); |
457 }; | 457 }; |
458 | 458 |
459 } // namespace dart | 459 } // namespace dart |
460 | 460 |
461 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 461 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
OLD | NEW |