| 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_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/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 LiveRange* GetLiveRange(intptr_t vreg); | 85 LiveRange* GetLiveRange(intptr_t vreg); |
| 86 LiveRange* MakeLiveRangeForTemporary(); | 86 LiveRange* MakeLiveRangeForTemporary(); |
| 87 | 87 |
| 88 // Visit instructions in the postorder and build live ranges for | 88 // Visit instructions in the postorder and build live ranges for |
| 89 // all SSA values. | 89 // all SSA values. |
| 90 void BuildLiveRanges(); | 90 void BuildLiveRanges(); |
| 91 Instruction* ConnectOutgoingPhiMoves(BlockEntryInstr* block); | 91 Instruction* ConnectOutgoingPhiMoves(BlockEntryInstr* block); |
| 92 void ProcessOneInstruction(BlockEntryInstr* block, Instruction* instr); | 92 void ProcessOneInstruction(BlockEntryInstr* block, Instruction* instr); |
| 93 void ConnectIncomingPhiMoves(BlockEntryInstr* block); | 93 void ConnectIncomingPhiMoves(BlockEntryInstr* block); |
| 94 void BlockLocation(Location loc, intptr_t pos); | 94 void BlockLocation(Location loc, intptr_t from, intptr_t to); |
| 95 | 95 |
| 96 // Process live ranges sorted by their start and assign registers | 96 // Process live ranges sorted by their start and assign registers |
| 97 // to them | 97 // to them |
| 98 void AllocateCPURegisters(); | 98 void AllocateCPURegisters(); |
| 99 void AdvanceActiveIntervals(const intptr_t start); | 99 void AdvanceActiveIntervals(const intptr_t start); |
| 100 | 100 |
| 101 // Connect split siblings over non-linear control flow edges. | 101 // Connect split siblings over non-linear control flow edges. |
| 102 void ResolveControlFlow(); | 102 void ResolveControlFlow(); |
| 103 void ConnectSplitSiblings(LiveRange* range, | 103 void ConnectSplitSiblings(LiveRange* range, |
| 104 BlockEntryInstr* source_block, | 104 BlockEntryInstr* source_block, |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 class AllocationFinger : public ValueObject { | 339 class AllocationFinger : public ValueObject { |
| 340 public: | 340 public: |
| 341 AllocationFinger() | 341 AllocationFinger() |
| 342 : first_pending_use_interval_(NULL), | 342 : first_pending_use_interval_(NULL), |
| 343 first_register_use_(NULL), | 343 first_register_use_(NULL), |
| 344 first_register_beneficial_use_(NULL), | 344 first_register_beneficial_use_(NULL), |
| 345 first_hinted_use_(NULL) { | 345 first_hinted_use_(NULL) { |
| 346 } | 346 } |
| 347 | 347 |
| 348 void Initialize(LiveRange* range); | 348 void Initialize(LiveRange* range); |
| 349 void UpdateAfterSplit(intptr_t first_use_after_split_pos); |
| 349 bool Advance(intptr_t start); | 350 bool Advance(intptr_t start); |
| 350 | 351 |
| 351 UseInterval* first_pending_use_interval() const { | 352 UseInterval* first_pending_use_interval() const { |
| 352 return first_pending_use_interval_; | 353 return first_pending_use_interval_; |
| 353 } | 354 } |
| 354 | 355 |
| 355 Location FirstHint(); | 356 Location FirstHint(); |
| 356 UsePosition* FirstRegisterUse(intptr_t after_pos); | 357 UsePosition* FirstRegisterUse(intptr_t after_pos); |
| 357 UsePosition* FirstRegisterBeneficialUse(intptr_t after_pos); | 358 UsePosition* FirstRegisterBeneficialUse(intptr_t after_pos); |
| 358 | 359 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 449 |
| 449 AllocationFinger finger_; | 450 AllocationFinger finger_; |
| 450 | 451 |
| 451 DISALLOW_COPY_AND_ASSIGN(LiveRange); | 452 DISALLOW_COPY_AND_ASSIGN(LiveRange); |
| 452 }; | 453 }; |
| 453 | 454 |
| 454 | 455 |
| 455 } // namespace dart | 456 } // namespace dart |
| 456 | 457 |
| 457 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ | 458 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ |
| OLD | NEW |