| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 bool IsBlockBoundary(LifetimePosition pos); | 557 bool IsBlockBoundary(LifetimePosition pos); |
| 558 | 558 |
| 559 // Helper methods for resolving control flow. | 559 // Helper methods for resolving control flow. |
| 560 void ResolveControlFlow(const InstructionBlock* block, | 560 void ResolveControlFlow(const InstructionBlock* block, |
| 561 InstructionOperand* cur_op, | 561 InstructionOperand* cur_op, |
| 562 const InstructionBlock* pred, | 562 const InstructionBlock* pred, |
| 563 InstructionOperand* pred_op); | 563 InstructionOperand* pred_op); |
| 564 | 564 |
| 565 void SetLiveRangeAssignedRegister(LiveRange* range, int reg); | 565 void SetLiveRangeAssignedRegister(LiveRange* range, int reg); |
| 566 | 566 |
| 567 // Return parallel move that should be used to connect ranges split at the | |
| 568 // given position. | |
| 569 ParallelMove* GetConnectingParallelMove(LifetimePosition pos); | |
| 570 | |
| 571 // Return the block which contains give lifetime position. | 567 // Return the block which contains give lifetime position. |
| 572 const InstructionBlock* GetInstructionBlock(LifetimePosition pos); | 568 const InstructionBlock* GetInstructionBlock(LifetimePosition pos); |
| 573 | 569 |
| 574 // Helper methods for the fixed registers. | 570 // Helper methods for the fixed registers. |
| 575 int RegisterCount() const; | 571 int RegisterCount() const; |
| 576 static int FixedLiveRangeID(int index) { return -index - 1; } | 572 static int FixedLiveRangeID(int index) { return -index - 1; } |
| 577 int FixedDoubleLiveRangeID(int index); | 573 int FixedDoubleLiveRangeID(int index); |
| 578 LiveRange* FixedLiveRangeFor(int index); | 574 LiveRange* FixedLiveRangeFor(int index); |
| 579 LiveRange* FixedDoubleLiveRangeFor(int index); | 575 LiveRange* FixedDoubleLiveRangeFor(int index); |
| 580 LiveRange* LiveRangeFor(int index); | 576 LiveRange* LiveRangeFor(int index); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 #endif | 641 #endif |
| 646 | 642 |
| 647 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); | 643 DISALLOW_COPY_AND_ASSIGN(RegisterAllocator); |
| 648 }; | 644 }; |
| 649 | 645 |
| 650 } // namespace compiler | 646 } // namespace compiler |
| 651 } // namespace internal | 647 } // namespace internal |
| 652 } // namespace v8 | 648 } // namespace v8 |
| 653 | 649 |
| 654 #endif // V8_REGISTER_ALLOCATOR_H_ | 650 #endif // V8_REGISTER_ALLOCATOR_H_ |
| OLD | NEW |