| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 ConstantInstr* constant_null() const { | 113 ConstantInstr* constant_null() const { |
| 114 return constant_null_; | 114 return constant_null_; |
| 115 } | 115 } |
| 116 | 116 |
| 117 ConstantInstr* constant_dead() const { | 117 ConstantInstr* constant_dead() const { |
| 118 return constant_dead_; | 118 return constant_dead_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } | 121 intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } |
| 122 | 122 |
| 123 void AllocateSSAIndexes(Definition* def) { |
| 124 ASSERT(def); |
| 125 def->set_ssa_temp_index(alloc_ssa_temp_index()); |
| 126 // Always allocate a second index. This index is unused except |
| 127 // for Definitions with register pair outputs. |
| 128 alloc_ssa_temp_index(); |
| 129 } |
| 130 |
| 123 intptr_t InstructionCount() const; | 131 intptr_t InstructionCount() const; |
| 124 | 132 |
| 125 ConstantInstr* GetConstant(const Object& object); | 133 ConstantInstr* GetConstant(const Object& object); |
| 126 void AddToInitialDefinitions(Definition* defn); | 134 void AddToInitialDefinitions(Definition* defn); |
| 127 | 135 |
| 128 void InsertBefore(Instruction* next, | 136 void InsertBefore(Instruction* next, |
| 129 Instruction* instr, | 137 Instruction* instr, |
| 130 Environment* env, | 138 Environment* env, |
| 131 Definition::UseKind use_kind); | 139 Definition::UseKind use_kind); |
| 132 void InsertAfter(Instruction* prev, | 140 void InsertAfter(Instruction* prev, |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Per block sets of available blocks. Block A is available at the block B if | 391 // Per block sets of available blocks. Block A is available at the block B if |
| 384 // and only if A dominates B and all paths from A to B are free of side | 392 // and only if A dominates B and all paths from A to B are free of side |
| 385 // effects. | 393 // effects. |
| 386 GrowableArray<BitVector*> available_at_; | 394 GrowableArray<BitVector*> available_at_; |
| 387 }; | 395 }; |
| 388 | 396 |
| 389 | 397 |
| 390 } // namespace dart | 398 } // namespace dart |
| 391 | 399 |
| 392 #endif // VM_FLOW_GRAPH_H_ | 400 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |