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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 BitVector* interference_set); | 106 BitVector* interference_set); |
107 void ProcessEnvironmentUses(BlockEntryInstr* block, Instruction* current); | 107 void ProcessEnvironmentUses(BlockEntryInstr* block, Instruction* current); |
108 void ProcessMaterializationUses(BlockEntryInstr* block, | 108 void ProcessMaterializationUses(BlockEntryInstr* block, |
109 const intptr_t block_start_pos, | 109 const intptr_t block_start_pos, |
110 const intptr_t use_pos, | 110 const intptr_t use_pos, |
111 MaterializeObjectInstr* mat); | 111 MaterializeObjectInstr* mat); |
112 void ProcessOneInput(BlockEntryInstr* block, | 112 void ProcessOneInput(BlockEntryInstr* block, |
113 intptr_t pos, | 113 intptr_t pos, |
114 Location* in_ref, | 114 Location* in_ref, |
115 Value* input, | 115 Value* input, |
116 intptr_t vreg); | 116 intptr_t vreg, |
117 RegisterSet* live_registers); | |
117 void ProcessOneOutput(BlockEntryInstr* block, | 118 void ProcessOneOutput(BlockEntryInstr* block, |
118 Instruction* current, | 119 Instruction* current, |
119 intptr_t pos, | 120 intptr_t pos, |
120 Location* out, | 121 Location* out, |
121 Definition* def, | 122 Definition* def, |
122 intptr_t vreg, | 123 intptr_t vreg, |
123 bool output_same_as_first_input, | 124 bool output_same_as_first_input, |
124 Location* in_ref, | 125 Location* in_ref, |
125 Definition* input, | 126 Definition* input, |
126 intptr_t input_vreg, | 127 intptr_t input_vreg, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
310 | 311 |
311 // List of used spill slots. Contains positions after which spill slots | 312 // List of used spill slots. Contains positions after which spill slots |
312 // become free and can be reused for allocation. | 313 // become free and can be reused for allocation. |
313 GrowableArray<intptr_t> spill_slots_; | 314 GrowableArray<intptr_t> spill_slots_; |
314 | 315 |
315 // For every used spill slot contains a flag determines whether it is | 316 // For every used spill slot contains a flag determines whether it is |
316 // QuadSpillSlot to ensure that indexes of quad and double spill slots | 317 // QuadSpillSlot to ensure that indexes of quad and double spill slots |
317 // are disjoint. | 318 // are disjoint. |
318 GrowableArray<bool> quad_spill_slots_; | 319 GrowableArray<bool> quad_spill_slots_; |
319 | 320 |
321 // Track whether a spill slot is expected to hold a tagged or untagged value. | |
322 // This is used to keep tagged and untagged spill slots disjoint. | |
srdjan
2014/05/21 17:12:49
Add a comment why we keep them disjoint
Cutch
2014/05/22 06:08:58
Done.
| |
323 GrowableArray<bool> untagged_spill_slots_; | |
324 | |
320 intptr_t cpu_spill_slot_count_; | 325 intptr_t cpu_spill_slot_count_; |
321 | 326 |
322 DISALLOW_COPY_AND_ASSIGN(FlowGraphAllocator); | 327 DISALLOW_COPY_AND_ASSIGN(FlowGraphAllocator); |
323 }; | 328 }; |
324 | 329 |
325 | 330 |
326 // Additional information about a block that is not contained in a | 331 // Additional information about a block that is not contained in a |
327 // block entry. | 332 // block entry. |
328 class BlockInfo : public ZoneAllocated { | 333 class BlockInfo : public ZoneAllocated { |
329 public: | 334 public: |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
491 void UpdateAfterSplit(intptr_t first_use_after_split_pos); | 496 void UpdateAfterSplit(intptr_t first_use_after_split_pos); |
492 bool Advance(intptr_t start); | 497 bool Advance(intptr_t start); |
493 | 498 |
494 UseInterval* first_pending_use_interval() const { | 499 UseInterval* first_pending_use_interval() const { |
495 return first_pending_use_interval_; | 500 return first_pending_use_interval_; |
496 } | 501 } |
497 | 502 |
498 Location FirstHint(); | 503 Location FirstHint(); |
499 UsePosition* FirstRegisterUse(intptr_t after_pos); | 504 UsePosition* FirstRegisterUse(intptr_t after_pos); |
500 UsePosition* FirstRegisterBeneficialUse(intptr_t after_pos); | 505 UsePosition* FirstRegisterBeneficialUse(intptr_t after_pos); |
506 UsePosition* FirstInterferingUse(intptr_t after_pos); | |
501 | 507 |
502 private: | 508 private: |
503 UseInterval* first_pending_use_interval_; | 509 UseInterval* first_pending_use_interval_; |
504 UsePosition* first_register_use_; | 510 UsePosition* first_register_use_; |
505 UsePosition* first_register_beneficial_use_; | 511 UsePosition* first_register_beneficial_use_; |
506 UsePosition* first_hinted_use_; | 512 UsePosition* first_hinted_use_; |
507 | 513 |
508 DISALLOW_COPY_AND_ASSIGN(AllocationFinger); | 514 DISALLOW_COPY_AND_ASSIGN(AllocationFinger); |
509 }; | 515 }; |
510 | 516 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
663 | 669 |
664 AllocationFinger finger_; | 670 AllocationFinger finger_; |
665 | 671 |
666 DISALLOW_COPY_AND_ASSIGN(LiveRange); | 672 DISALLOW_COPY_AND_ASSIGN(LiveRange); |
667 }; | 673 }; |
668 | 674 |
669 | 675 |
670 } // namespace dart | 676 } // namespace dart |
671 | 677 |
672 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ | 678 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ |
OLD | NEW |