| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 void RenameRecursive( | 160 void RenameRecursive( |
| 161 BlockEntryInstr* block_entry, | 161 BlockEntryInstr* block_entry, |
| 162 GrowableArray<Definition*>* env, | 162 GrowableArray<Definition*>* env, |
| 163 GrowableArray<PhiInstr*>* live_phis); | 163 GrowableArray<PhiInstr*>* live_phis); |
| 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, |
| 168 const GrowableArray<BitVector*>& dom_frontier); | 168 const GrowableArray<BitVector*>& dom_frontier); |
| 169 | 169 |
| 170 void MarkLivePhis(GrowableArray<PhiInstr*>* live_phis); | 170 void RemoveDeadPhis(GrowableArray<PhiInstr*>* live_phis); |
| 171 | 171 |
| 172 void ReplacePredecessor(BlockEntryInstr* old_block, | 172 void ReplacePredecessor(BlockEntryInstr* old_block, |
| 173 BlockEntryInstr* new_block); | 173 BlockEntryInstr* new_block); |
| 174 | 174 |
| 175 // DiscoverBlocks computes parent_ and assigned_vars_ which are then used | 175 // DiscoverBlocks computes parent_ and assigned_vars_ which are then used |
| 176 // if/when computing SSA. | 176 // if/when computing SSA. |
| 177 GrowableArray<intptr_t> parent_; | 177 GrowableArray<intptr_t> parent_; |
| 178 GrowableArray<BitVector*> assigned_vars_; | 178 GrowableArray<BitVector*> assigned_vars_; |
| 179 | 179 |
| 180 intptr_t current_ssa_temp_index_; | 180 intptr_t current_ssa_temp_index_; |
| 181 intptr_t max_block_id_; | 181 intptr_t max_block_id_; |
| 182 | 182 |
| 183 // Flow graph fields. | 183 // Flow graph fields. |
| 184 const ParsedFunction& parsed_function_; | 184 const ParsedFunction& parsed_function_; |
| 185 const intptr_t num_copied_params_; | 185 const intptr_t num_copied_params_; |
| 186 const intptr_t num_non_copied_params_; | 186 const intptr_t num_non_copied_params_; |
| 187 const intptr_t num_stack_locals_; | 187 const intptr_t num_stack_locals_; |
| 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 bool invalid_dominator_tree_; | 192 bool invalid_dominator_tree_; |
| 193 ConstantInstr* constant_null_; | 193 ConstantInstr* constant_null_; |
| 194 }; | 194 }; |
| 195 | 195 |
| 196 } // namespace dart | 196 } // namespace dart |
| 197 | 197 |
| 198 #endif // VM_FLOW_GRAPH_H_ | 198 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |