| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } | 63 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } |
| 64 | 64 |
| 65 // Operations on the flow graph. | 65 // Operations on the flow graph. |
| 66 void ComputeSSA(); | 66 void ComputeSSA(); |
| 67 void ComputeUseLists(); | 67 void ComputeUseLists(); |
| 68 | 68 |
| 69 // TODO(zerny): Once the SSA is feature complete this should be removed. | 69 // TODO(zerny): Once the SSA is feature complete this should be removed. |
| 70 void Bailout(const char* reason) const; | 70 void Bailout(const char* reason) const; |
| 71 | 71 |
| 72 #ifdef DEBUG |
| 73 // Validation methods for debugging. |
| 74 bool ResetUseLists(); |
| 75 bool ValidateUseLists(); |
| 76 #endif // DEBUG |
| 77 |
| 72 private: | 78 private: |
| 73 void DiscoverBlocks(); | 79 void DiscoverBlocks(); |
| 74 | 80 |
| 75 // SSA transformation methods and fields. | 81 // SSA transformation methods and fields. |
| 76 void ComputeDominators( | 82 void ComputeDominators( |
| 77 GrowableArray<BlockEntryInstr*>* preorder, | 83 GrowableArray<BlockEntryInstr*>* preorder, |
| 78 GrowableArray<intptr_t>* parent, | 84 GrowableArray<intptr_t>* parent, |
| 79 GrowableArray<BitVector*>* dominance_frontier); | 85 GrowableArray<BitVector*>* dominance_frontier); |
| 80 | 86 |
| 81 void CompressPath( | 87 void CompressPath( |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 const intptr_t stack_local_count_; | 119 const intptr_t stack_local_count_; |
| 114 GraphEntryInstr* graph_entry_; | 120 GraphEntryInstr* graph_entry_; |
| 115 GrowableArray<BlockEntryInstr*> preorder_; | 121 GrowableArray<BlockEntryInstr*> preorder_; |
| 116 GrowableArray<BlockEntryInstr*> postorder_; | 122 GrowableArray<BlockEntryInstr*> postorder_; |
| 117 GrowableArray<BlockEntryInstr*> reverse_postorder_; | 123 GrowableArray<BlockEntryInstr*> reverse_postorder_; |
| 118 }; | 124 }; |
| 119 | 125 |
| 120 } // namespace dart | 126 } // namespace dart |
| 121 | 127 |
| 122 #endif // VM_FLOW_GRAPH_H_ | 128 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |