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/register-configuration.h" | 10 #include "src/register-configuration.h" |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 assigned_slot_ = index; | 688 assigned_slot_ = index; |
689 } | 689 } |
690 int assigned_slot() { | 690 int assigned_slot() { |
691 DCHECK_NE(kUnassignedSlot, assigned_slot_); | 691 DCHECK_NE(kUnassignedSlot, assigned_slot_); |
692 return assigned_slot_; | 692 return assigned_slot_; |
693 } | 693 } |
694 const ZoneVector<TopLevelLiveRange*>& live_ranges() const { | 694 const ZoneVector<TopLevelLiveRange*>& live_ranges() const { |
695 return live_ranges_; | 695 return live_ranges_; |
696 } | 696 } |
697 ZoneVector<TopLevelLiveRange*>& live_ranges() { return live_ranges_; } | 697 ZoneVector<TopLevelLiveRange*>& live_ranges() { return live_ranges_; } |
698 // Currently, only 4 or 8 byte slots are supported in stack frames. | 698 // Spill slots can be 4, 8, or 16 bytes wide. |
699 // TODO(bbudge) Add 16 byte slots for SIMD. | |
700 int byte_width() const { return byte_width_; } | 699 int byte_width() const { return byte_width_; } |
701 void Print() const; | 700 void Print() const; |
702 | 701 |
703 private: | 702 private: |
704 LifetimePosition End() const { return end_position_; } | 703 LifetimePosition End() const { return end_position_; } |
705 bool IsIntersectingWith(SpillRange* other) const; | 704 bool IsIntersectingWith(SpillRange* other) const; |
706 // Merge intervals, making sure the use intervals are sorted | 705 // Merge intervals, making sure the use intervals are sorted |
707 void MergeDisjointIntervals(UseInterval* other); | 706 void MergeDisjointIntervals(UseInterval* other); |
708 | 707 |
709 ZoneVector<TopLevelLiveRange*> live_ranges_; | 708 ZoneVector<TopLevelLiveRange*> live_ranges_; |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 RegisterAllocationData* const data_; | 1182 RegisterAllocationData* const data_; |
1184 | 1183 |
1185 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); | 1184 DISALLOW_COPY_AND_ASSIGN(LiveRangeConnector); |
1186 }; | 1185 }; |
1187 | 1186 |
1188 } // namespace compiler | 1187 } // namespace compiler |
1189 } // namespace internal | 1188 } // namespace internal |
1190 } // namespace v8 | 1189 } // namespace v8 |
1191 | 1190 |
1192 #endif // V8_REGISTER_ALLOCATOR_H_ | 1191 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |