OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_REGISTER_ALLOCATOR_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_H_ |
6 #define V8_REGISTER_ALLOCATOR_H_ | 6 #define V8_REGISTER_ALLOCATOR_H_ |
7 | 7 |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "src/zone-containers.h" | 9 #include "src/zone-containers.h" |
10 | 10 |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 bool UnhandledIsSorted(); | 450 bool UnhandledIsSorted(); |
451 void ActiveToHandled(LiveRange* range); | 451 void ActiveToHandled(LiveRange* range); |
452 void ActiveToInactive(LiveRange* range); | 452 void ActiveToInactive(LiveRange* range); |
453 void InactiveToHandled(LiveRange* range); | 453 void InactiveToHandled(LiveRange* range); |
454 void InactiveToActive(LiveRange* range); | 454 void InactiveToActive(LiveRange* range); |
455 | 455 |
456 // Helper methods for allocating registers. | 456 // Helper methods for allocating registers. |
457 bool TryAllocateFreeReg(LiveRange* range); | 457 bool TryAllocateFreeReg(LiveRange* range); |
458 void AllocateBlockedReg(LiveRange* range); | 458 void AllocateBlockedReg(LiveRange* range); |
459 SpillRange* AssignSpillRangeToLiveRange(LiveRange* range); | 459 SpillRange* AssignSpillRangeToLiveRange(LiveRange* range); |
| 460 void FreeSpillSlot(LiveRange* range); |
| 461 InstructionOperand* TryReuseSpillSlot(LiveRange* range); |
460 | 462 |
461 // Live range splitting helpers. | 463 // Live range splitting helpers. |
462 | 464 |
463 // Split the given range at the given position. | 465 // Split the given range at the given position. |
464 // If range starts at or after the given position then the | 466 // If range starts at or after the given position then the |
465 // original range is returned. | 467 // original range is returned. |
466 // Otherwise returns the live range that starts at pos and contains | 468 // Otherwise returns the live range that starts at pos and contains |
467 // all uses from the original range that follow pos. Uses at pos will | 469 // all uses from the original range that follow pos. Uses at pos will |
468 // still be owned by the original range after splitting. | 470 // still be owned by the original range after splitting. |
469 LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos); | 471 LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 #endif | 571 #endif |
570 | 572 |
571 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); | 573 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); |
572 }; | 574 }; |
573 | 575 |
574 } | 576 } |
575 } | 577 } |
576 } // namespace v8::internal::compiler | 578 } // namespace v8::internal::compiler |
577 | 579 |
578 #endif // V8_REGISTER_ALLOCATOR_H_ | 580 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |