Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/compiler/register-allocator.h

Issue 2074323002: [Turbofan] Merge SpillRanges by byte_width rather than kind. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve comments. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.
Mircea Trofin 2016/06/30 23:58:29 is this a //TODO ?
bbudge 2016/07/01 00:12:06 It's kind of strange, since byte_width can actuall
698 int byte_width() const { return byte_width_; } 699 int byte_width() const { return byte_width_; }
699 RegisterKind kind() const { return kind_; }
700 void Print() const; 700 void Print() const;
701 701
702 private: 702 private:
703 LifetimePosition End() const { return end_position_; } 703 LifetimePosition End() const { return end_position_; }
704 bool IsIntersectingWith(SpillRange* other) const; 704 bool IsIntersectingWith(SpillRange* other) const;
705 // Merge intervals, making sure the use intervals are sorted 705 // Merge intervals, making sure the use intervals are sorted
706 void MergeDisjointIntervals(UseInterval* other); 706 void MergeDisjointIntervals(UseInterval* other);
707 707
708 ZoneVector<TopLevelLiveRange*> live_ranges_; 708 ZoneVector<TopLevelLiveRange*> live_ranges_;
709 UseInterval* use_interval_; 709 UseInterval* use_interval_;
710 LifetimePosition end_position_; 710 LifetimePosition end_position_;
711 int assigned_slot_; 711 int assigned_slot_;
712 int byte_width_; 712 int byte_width_;
713 RegisterKind kind_;
714 713
715 DISALLOW_COPY_AND_ASSIGN(SpillRange); 714 DISALLOW_COPY_AND_ASSIGN(SpillRange);
716 }; 715 };
717 716
718 717
719 class RegisterAllocationData final : public ZoneObject { 718 class RegisterAllocationData final : public ZoneObject {
720 public: 719 public:
721 class PhiMapValue : public ZoneObject { 720 class PhiMapValue : public ZoneObject {
722 public: 721 public:
723 PhiMapValue(PhiInstruction* phi, const InstructionBlock* block, Zone* zone); 722 PhiMapValue(PhiInstruction* phi, const InstructionBlock* block, Zone* zone);
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698