| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_H_ | 5 #ifndef VM_FLOW_GRAPH_H_ |
| 6 #define VM_FLOW_GRAPH_H_ | 6 #define VM_FLOW_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 Instruction* instr, | 116 Instruction* instr, |
| 117 Environment* env, | 117 Environment* env, |
| 118 Definition::UseKind use_kind); | 118 Definition::UseKind use_kind); |
| 119 void InsertAfter(Instruction* prev, | 119 void InsertAfter(Instruction* prev, |
| 120 Instruction* instr, | 120 Instruction* instr, |
| 121 Environment* env, | 121 Environment* env, |
| 122 Definition::UseKind use_kind); | 122 Definition::UseKind use_kind); |
| 123 | 123 |
| 124 // Operations on the flow graph. | 124 // Operations on the flow graph. |
| 125 void ComputeSSA(intptr_t next_virtual_register_number, | 125 void ComputeSSA(intptr_t next_virtual_register_number, |
| 126 GrowableArray<Definition*>* inlining_parameters); | 126 ZoneGrowableArray<Definition*>* inlining_parameters); |
| 127 | 127 |
| 128 // Finds natural loops in the flow graph and attaches a list of loop | 128 // Finds natural loops in the flow graph and attaches a list of loop |
| 129 // body blocks for each loop header. | 129 // body blocks for each loop header. |
| 130 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers); | 130 void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers); |
| 131 | 131 |
| 132 // TODO(zerny): Once the SSA is feature complete this should be removed. | 132 // TODO(zerny): Once the SSA is feature complete this should be removed. |
| 133 void Bailout(const char* reason) const; | 133 void Bailout(const char* reason) const; |
| 134 | 134 |
| 135 #ifdef DEBUG | 135 #ifdef DEBUG |
| 136 // Verification methods for debugging. | 136 // Verification methods for debugging. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 147 // SSA transformation methods and fields. | 147 // SSA transformation methods and fields. |
| 148 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); | 148 void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier); |
| 149 | 149 |
| 150 void CompressPath( | 150 void CompressPath( |
| 151 intptr_t start_index, | 151 intptr_t start_index, |
| 152 intptr_t current_index, | 152 intptr_t current_index, |
| 153 GrowableArray<intptr_t>* parent, | 153 GrowableArray<intptr_t>* parent, |
| 154 GrowableArray<intptr_t>* label); | 154 GrowableArray<intptr_t>* label); |
| 155 | 155 |
| 156 void Rename(GrowableArray<PhiInstr*>* live_phis, | 156 void Rename(GrowableArray<PhiInstr*>* live_phis, |
| 157 GrowableArray<Definition*>* inlining_parameters); | 157 ZoneGrowableArray<Definition*>* inlining_parameters); |
| 158 void RenameRecursive( | 158 void RenameRecursive( |
| 159 BlockEntryInstr* block_entry, | 159 BlockEntryInstr* block_entry, |
| 160 GrowableArray<Definition*>* env, | 160 GrowableArray<Definition*>* env, |
| 161 GrowableArray<PhiInstr*>* live_phis); | 161 GrowableArray<PhiInstr*>* live_phis); |
| 162 | 162 |
| 163 void AttachEnvironment(Instruction* instr, GrowableArray<Definition*>* env); | 163 void AttachEnvironment(Instruction* instr, GrowableArray<Definition*>* env); |
| 164 | 164 |
| 165 void InsertPhis( | 165 void InsertPhis( |
| 166 const GrowableArray<BlockEntryInstr*>& preorder, | 166 const GrowableArray<BlockEntryInstr*>& preorder, |
| 167 const GrowableArray<BitVector*>& assigned_vars, | 167 const GrowableArray<BitVector*>& assigned_vars, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 188 GraphEntryInstr* graph_entry_; | 188 GraphEntryInstr* graph_entry_; |
| 189 GrowableArray<BlockEntryInstr*> preorder_; | 189 GrowableArray<BlockEntryInstr*> preorder_; |
| 190 GrowableArray<BlockEntryInstr*> postorder_; | 190 GrowableArray<BlockEntryInstr*> postorder_; |
| 191 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 191 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 192 ConstantInstr* constant_null_; | 192 ConstantInstr* constant_null_; |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace dart | 195 } // namespace dart |
| 196 | 196 |
| 197 #endif // VM_FLOW_GRAPH_H_ | 197 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |