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/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 ZoneVector<TopLevelLiveRange*>& fixed_live_ranges() { | 676 ZoneVector<TopLevelLiveRange*>& fixed_live_ranges() { |
677 return fixed_live_ranges_; | 677 return fixed_live_ranges_; |
678 } | 678 } |
679 ZoneVector<TopLevelLiveRange*>& fixed_double_live_ranges() { | 679 ZoneVector<TopLevelLiveRange*>& fixed_double_live_ranges() { |
680 return fixed_double_live_ranges_; | 680 return fixed_double_live_ranges_; |
681 } | 681 } |
682 const ZoneVector<TopLevelLiveRange*>& fixed_double_live_ranges() const { | 682 const ZoneVector<TopLevelLiveRange*>& fixed_double_live_ranges() const { |
683 return fixed_double_live_ranges_; | 683 return fixed_double_live_ranges_; |
684 } | 684 } |
685 ZoneVector<BitVector*>& live_in_sets() { return live_in_sets_; } | 685 ZoneVector<BitVector*>& live_in_sets() { return live_in_sets_; } |
686 ZoneSet<SpillRange*>& spill_ranges() { return spill_ranges_; } | 686 ZoneVector<BitVector*>& live_out_sets() { return live_out_sets_; } |
| 687 ZoneVector<SpillRange*>& spill_ranges() { return spill_ranges_; } |
687 DelayedReferences& delayed_references() { return delayed_references_; } | 688 DelayedReferences& delayed_references() { return delayed_references_; } |
688 InstructionSequence* code() const { return code_; } | 689 InstructionSequence* code() const { return code_; } |
689 // This zone is for datastructures only needed during register allocation | 690 // This zone is for datastructures only needed during register allocation |
690 // phases. | 691 // phases. |
691 Zone* allocation_zone() const { return allocation_zone_; } | 692 Zone* allocation_zone() const { return allocation_zone_; } |
692 // This zone is for InstructionOperands and moves that live beyond register | 693 // This zone is for InstructionOperands and moves that live beyond register |
693 // allocation. | 694 // allocation. |
694 Zone* code_zone() const { return code()->zone(); } | 695 Zone* code_zone() const { return code()->zone(); } |
695 Frame* frame() const { return frame_; } | 696 Frame* frame() const { return frame_; } |
696 const char* debug_name() const { return debug_name_; } | 697 const char* debug_name() const { return debug_name_; } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 private: | 735 private: |
735 int GetNextLiveRangeId(); | 736 int GetNextLiveRangeId(); |
736 | 737 |
737 Zone* const allocation_zone_; | 738 Zone* const allocation_zone_; |
738 Frame* const frame_; | 739 Frame* const frame_; |
739 InstructionSequence* const code_; | 740 InstructionSequence* const code_; |
740 const char* const debug_name_; | 741 const char* const debug_name_; |
741 const RegisterConfiguration* const config_; | 742 const RegisterConfiguration* const config_; |
742 PhiMap phi_map_; | 743 PhiMap phi_map_; |
743 ZoneVector<BitVector*> live_in_sets_; | 744 ZoneVector<BitVector*> live_in_sets_; |
| 745 ZoneVector<BitVector*> live_out_sets_; |
744 ZoneVector<TopLevelLiveRange*> live_ranges_; | 746 ZoneVector<TopLevelLiveRange*> live_ranges_; |
745 ZoneVector<TopLevelLiveRange*> fixed_live_ranges_; | 747 ZoneVector<TopLevelLiveRange*> fixed_live_ranges_; |
746 ZoneVector<TopLevelLiveRange*> fixed_double_live_ranges_; | 748 ZoneVector<TopLevelLiveRange*> fixed_double_live_ranges_; |
747 ZoneSet<SpillRange*> spill_ranges_; | 749 ZoneVector<SpillRange*> spill_ranges_; |
748 DelayedReferences delayed_references_; | 750 DelayedReferences delayed_references_; |
749 BitVector* assigned_registers_; | 751 BitVector* assigned_registers_; |
750 BitVector* assigned_double_registers_; | 752 BitVector* assigned_double_registers_; |
751 int virtual_register_count_; | 753 int virtual_register_count_; |
752 | 754 |
753 DISALLOW_COPY_AND_ASSIGN(RegisterAllocationData); | 755 DISALLOW_COPY_AND_ASSIGN(RegisterAllocationData); |
754 }; | 756 }; |
755 | 757 |
756 | 758 |
757 class ConstraintBuilder final : public ZoneObject { | 759 class ConstraintBuilder final : public ZoneObject { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 RegisterAllocationData* const data_; | 1047 RegisterAllocationData* const data_; |
1046 | 1048 |
1047 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1049 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
1048 }; | 1050 }; |
1049 | 1051 |
1050 } // namespace compiler | 1052 } // namespace compiler |
1051 } // namespace internal | 1053 } // namespace internal |
1052 } // namespace v8 | 1054 } // namespace v8 |
1053 | 1055 |
1054 #endif // V8_REGISTER_ALLOCATOR_H_ | 1056 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |