| 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_ALLOCATOR_H_ | 5 #ifndef VM_FLOW_GRAPH_ALLOCATOR_H_ |
| 6 #define VM_FLOW_GRAPH_ALLOCATOR_H_ | 6 #define VM_FLOW_GRAPH_ALLOCATOR_H_ |
| 7 | 7 |
| 8 #include "vm/flow_graph.h" | 8 #include "vm/flow_graph.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Discover structural (reducible) loops nesting structure. | 94 // Discover structural (reducible) loops nesting structure. |
| 95 // It will be used later in SplitBetween heuristic that selects an | 95 // It will be used later in SplitBetween heuristic that selects an |
| 96 // optimal splitting position. | 96 // optimal splitting position. |
| 97 void DiscoverLoops(); | 97 void DiscoverLoops(); |
| 98 | 98 |
| 99 LiveRange* MakeLiveRangeForTemporary(); | 99 LiveRange* MakeLiveRangeForTemporary(); |
| 100 | 100 |
| 101 // Visit instructions in the postorder and build live ranges for | 101 // Visit instructions in the postorder and build live ranges for |
| 102 // all SSA values. | 102 // all SSA values. |
| 103 void BuildLiveRanges(); | 103 void BuildLiveRanges(); |
| 104 |
| 104 Instruction* ConnectOutgoingPhiMoves(BlockEntryInstr* block, | 105 Instruction* ConnectOutgoingPhiMoves(BlockEntryInstr* block, |
| 105 BitVector* interference_set); | 106 BitVector* interference_set); |
| 106 void ProcessEnvironmentUses(BlockEntryInstr* block, Instruction* current); | 107 void ProcessEnvironmentUses(BlockEntryInstr* block, Instruction* current); |
| 107 void ProcessMaterializationUses(BlockEntryInstr* block, | 108 void ProcessMaterializationUses(BlockEntryInstr* block, |
| 108 const intptr_t block_start_pos, | 109 const intptr_t block_start_pos, |
| 109 const intptr_t use_pos, | 110 const intptr_t use_pos, |
| 110 MaterializeObjectInstr* mat); | 111 MaterializeObjectInstr* mat); |
| 111 void ProcessOneInstruction(BlockEntryInstr* block, | 112 void ProcessOneInstruction(BlockEntryInstr* block, |
| 112 Instruction* instr, | 113 Instruction* instr, |
| 113 BitVector* interference_set); | 114 BitVector* interference_set); |
| 114 void ConnectIncomingPhiMoves(BlockEntryInstr* block); | 115 void ProcessInitialDefinition(Definition* defn, |
| 116 LiveRange* range, |
| 117 BlockEntryInstr* block); |
| 118 void ConnectIncomingPhiMoves(JoinEntryInstr* join); |
| 115 void BlockLocation(Location loc, intptr_t from, intptr_t to); | 119 void BlockLocation(Location loc, intptr_t from, intptr_t to); |
| 116 void BlockRegisterLocation(Location loc, | 120 void BlockRegisterLocation(Location loc, |
| 117 intptr_t from, | 121 intptr_t from, |
| 118 intptr_t to, | 122 intptr_t to, |
| 119 bool* blocked_registers, | 123 bool* blocked_registers, |
| 120 LiveRange** blocking_ranges); | 124 LiveRange** blocking_ranges); |
| 121 | 125 |
| 122 intptr_t NumberOfRegisters() const { return number_of_registers_; } | 126 intptr_t NumberOfRegisters() const { return number_of_registers_; } |
| 123 | 127 |
| 124 // Find all safepoints that are covered by this live range. | 128 // Find all safepoints that are covered by this live range. |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 | 646 |
| 643 AllocationFinger finger_; | 647 AllocationFinger finger_; |
| 644 | 648 |
| 645 DISALLOW_COPY_AND_ASSIGN(LiveRange); | 649 DISALLOW_COPY_AND_ASSIGN(LiveRange); |
| 646 }; | 650 }; |
| 647 | 651 |
| 648 | 652 |
| 649 } // namespace dart | 653 } // namespace dart |
| 650 | 654 |
| 651 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ | 655 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ |
| OLD | NEW |