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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // Remove environments from the instructions which do not deoptimize. | 57 // Remove environments from the instructions which do not deoptimize. |
58 void EliminateEnvironments(); | 58 void EliminateEnvironments(); |
59 | 59 |
60 virtual void VisitStaticCall(StaticCallInstr* instr); | 60 virtual void VisitStaticCall(StaticCallInstr* instr); |
61 virtual void VisitInstanceCall(InstanceCallInstr* instr); | 61 virtual void VisitInstanceCall(InstanceCallInstr* instr); |
62 virtual void VisitStoreInstanceField(StoreInstanceFieldInstr* instr); | 62 virtual void VisitStoreInstanceField(StoreInstanceFieldInstr* instr); |
63 | 63 |
64 void InsertBefore(Instruction* next, | 64 void InsertBefore(Instruction* next, |
65 Instruction* instr, | 65 Instruction* instr, |
66 Environment* env, | 66 Environment* env, |
67 Definition::UseKind use_kind) { | 67 FlowGraph::UseKind use_kind) { |
68 flow_graph_->InsertBefore(next, instr, env, use_kind); | 68 flow_graph_->InsertBefore(next, instr, env, use_kind); |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 // Attempt to build ICData for call using propagated class-ids. | 72 // Attempt to build ICData for call using propagated class-ids. |
73 bool TryCreateICData(InstanceCallInstr* call); | 73 bool TryCreateICData(InstanceCallInstr* call); |
74 | 74 |
75 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); | 75 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); |
76 | 76 |
77 bool TryReplaceWithStoreIndexed(InstanceCallInstr* call); | 77 bool TryReplaceWithStoreIndexed(InstanceCallInstr* call); |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 // Optimize spill stores inside try-blocks by identifying values that always | 441 // Optimize spill stores inside try-blocks by identifying values that always |
442 // contain a single known constant at catch block entry. | 442 // contain a single known constant at catch block entry. |
443 class TryCatchAnalyzer : public AllStatic { | 443 class TryCatchAnalyzer : public AllStatic { |
444 public: | 444 public: |
445 static void Optimize(FlowGraph* flow_graph); | 445 static void Optimize(FlowGraph* flow_graph); |
446 }; | 446 }; |
447 | 447 |
448 } // namespace dart | 448 } // namespace dart |
449 | 449 |
450 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 450 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
OLD | NEW |