| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Flow graph orders. | 71 // Flow graph orders. |
| 72 const GrowableArray<BlockEntryInstr*>& preorder() const { | 72 const GrowableArray<BlockEntryInstr*>& preorder() const { |
| 73 return preorder_; | 73 return preorder_; |
| 74 } | 74 } |
| 75 const GrowableArray<BlockEntryInstr*>& postorder() const { | 75 const GrowableArray<BlockEntryInstr*>& postorder() const { |
| 76 return postorder_; | 76 return postorder_; |
| 77 } | 77 } |
| 78 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { | 78 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { |
| 79 return reverse_postorder_; | 79 return reverse_postorder_; |
| 80 } | 80 } |
| 81 GrowableArray<BlockEntryInstr*>* codegen_block_order(bool is_optimized) { | 81 GrowableArray<BlockEntryInstr*>* codegen_block_order(bool is_optimized); |
| 82 return is_optimized ? &optimized_block_order_ : &reverse_postorder_; | |
| 83 } | |
| 84 | 82 |
| 85 // Iterators. | 83 // Iterators. |
| 86 BlockIterator reverse_postorder_iterator() const { | 84 BlockIterator reverse_postorder_iterator() const { |
| 87 return BlockIterator(reverse_postorder()); | 85 return BlockIterator(reverse_postorder()); |
| 88 } | 86 } |
| 89 BlockIterator postorder_iterator() const { | 87 BlockIterator postorder_iterator() const { |
| 90 return BlockIterator(postorder()); | 88 return BlockIterator(postorder()); |
| 91 } | 89 } |
| 92 | 90 |
| 93 intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; } | 91 intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; } |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 // Per block sets of available blocks. Block A is available at the block B if | 358 // Per block sets of available blocks. Block A is available at the block B if |
| 361 // and only if A dominates B and all paths from A to B are free of side | 359 // and only if A dominates B and all paths from A to B are free of side |
| 362 // effects. | 360 // effects. |
| 363 GrowableArray<BitVector*> available_at_; | 361 GrowableArray<BitVector*> available_at_; |
| 364 }; | 362 }; |
| 365 | 363 |
| 366 | 364 |
| 367 } // namespace dart | 365 } // namespace dart |
| 368 | 366 |
| 369 #endif // VM_FLOW_GRAPH_H_ | 367 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |