| 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_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/parser.h" | 9 #include "vm/parser.h" |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { | 51 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { |
| 52 return reverse_postorder_; | 52 return reverse_postorder_; |
| 53 } | 53 } |
| 54 | 54 |
| 55 intptr_t max_virtual_register_number() const { | 55 intptr_t max_virtual_register_number() const { |
| 56 return current_ssa_temp_index(); | 56 return current_ssa_temp_index(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Operations on the flow graph. | 59 // Operations on the flow graph. |
| 60 void ComputeSSA(); | 60 void ComputeSSA(); |
| 61 void ComputeUseLists(); |
| 61 | 62 |
| 62 // TODO(zerny): Once the SSA is feature complete this should be removed. | 63 // TODO(zerny): Once the SSA is feature complete this should be removed. |
| 63 void Bailout(const char* reason) const; | 64 void Bailout(const char* reason) const; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 void DiscoverBlocks(); | 67 void DiscoverBlocks(); |
| 67 | 68 |
| 68 // SSA transformation methods and fields. | 69 // SSA transformation methods and fields. |
| 69 void ComputeDominators( | 70 void ComputeDominators( |
| 70 GrowableArray<BlockEntryInstr*>* preorder, | 71 GrowableArray<BlockEntryInstr*>* preorder, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const intptr_t stack_local_count_; | 108 const intptr_t stack_local_count_; |
| 108 GraphEntryInstr* graph_entry_; | 109 GraphEntryInstr* graph_entry_; |
| 109 GrowableArray<BlockEntryInstr*> preorder_; | 110 GrowableArray<BlockEntryInstr*> preorder_; |
| 110 GrowableArray<BlockEntryInstr*> postorder_; | 111 GrowableArray<BlockEntryInstr*> postorder_; |
| 111 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 112 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace dart | 115 } // namespace dart |
| 115 | 116 |
| 116 #endif // VM_FLOW_GRAPH_H_ | 117 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |