| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 UseKind use_kind); | 147 UseKind use_kind); |
| 148 Instruction* AppendTo(Instruction* prev, | 148 Instruction* AppendTo(Instruction* prev, |
| 149 Instruction* instr, | 149 Instruction* instr, |
| 150 Environment* env, | 150 Environment* env, |
| 151 UseKind use_kind); | 151 UseKind use_kind); |
| 152 | 152 |
| 153 // Operations on the flow graph. | 153 // Operations on the flow graph. |
| 154 void ComputeSSA(intptr_t next_virtual_register_number, | 154 void ComputeSSA(intptr_t next_virtual_register_number, |
| 155 ZoneGrowableArray<Definition*>* inlining_parameters); | 155 ZoneGrowableArray<Definition*>* inlining_parameters); |
| 156 | 156 |
| 157 // TODO(zerny): Once the SSA is feature complete this should be removed. | |
| 158 void Bailout(const char* reason) const; | |
| 159 | |
| 160 #ifdef DEBUG | |
| 161 // Verification methods for debugging. | 157 // Verification methods for debugging. |
| 162 bool VerifyUseLists(); | 158 bool VerifyUseLists(); |
| 163 #endif // DEBUG | |
| 164 | 159 |
| 165 void DiscoverBlocks(); | 160 void DiscoverBlocks(); |
| 166 | 161 |
| 167 // Compute information about effects occuring in different blocks and | 162 // Compute information about effects occuring in different blocks and |
| 168 // discover side-effect free paths. | 163 // discover side-effect free paths. |
| 169 void ComputeBlockEffects(); | 164 void ComputeBlockEffects(); |
| 170 BlockEffects* block_effects() const { return block_effects_; } | 165 BlockEffects* block_effects() const { return block_effects_; } |
| 171 | 166 |
| 172 // Remove the redefinition instructions inserted to inhibit code motion. | 167 // Remove the redefinition instructions inserted to inhibit code motion. |
| 173 void RemoveRedefinitions(); | 168 void RemoveRedefinitions(); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 // Per block sets of available blocks. Block A is available at the block B if | 403 // Per block sets of available blocks. Block A is available at the block B if |
| 409 // and only if A dominates B and all paths from A to B are free of side | 404 // and only if A dominates B and all paths from A to B are free of side |
| 410 // effects. | 405 // effects. |
| 411 GrowableArray<BitVector*> available_at_; | 406 GrowableArray<BitVector*> available_at_; |
| 412 }; | 407 }; |
| 413 | 408 |
| 414 | 409 |
| 415 } // namespace dart | 410 } // namespace dart |
| 416 | 411 |
| 417 #endif // VM_FLOW_GRAPH_H_ | 412 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |