Chromium Code Reviews| Index: src/compiler/register-allocator.cc |
| diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc |
| index 119e11f031c372f8a49732dc8940975b33d180c4..146ab4a72716bc94a46e8b05f196a1ffa1f10386 100644 |
| --- a/src/compiler/register-allocator.cc |
| +++ b/src/compiler/register-allocator.cc |
| @@ -1222,12 +1222,11 @@ std::ostream& operator<<(std::ostream& os, |
| return os; |
| } |
| - |
| SpillRange::SpillRange(TopLevelLiveRange* parent, Zone* zone) |
| : live_ranges_(zone), |
| assigned_slot_(kUnassignedSlot), |
| - byte_width_(GetByteWidth(parent->representation())), |
| - kind_(parent->kind()) { |
| + representation_(parent->representation()), |
| + byte_width_(GetByteWidth(parent->representation())) { |
| // Spill ranges are created for top level, non-splintered ranges. This is so |
| // that, when merging decisions are made, we consider the full extent of the |
| // virtual register, and avoid clobbering it. |
| @@ -1254,12 +1253,6 @@ SpillRange::SpillRange(TopLevelLiveRange* parent, Zone* zone) |
| parent->SetSpillRange(this); |
| } |
| - |
| -int SpillRange::ByteWidth() const { |
| - return GetByteWidth(live_ranges_[0]->representation()); |
| -} |
| - |
| - |
| bool SpillRange::IsIntersectingWith(SpillRange* other) const { |
| if (this->use_interval_ == nullptr || other->use_interval_ == nullptr || |
| this->End() <= other->use_interval_->start() || |
| @@ -1272,8 +1265,8 @@ bool SpillRange::IsIntersectingWith(SpillRange* other) const { |
| bool SpillRange::TryMerge(SpillRange* other) { |
| if (HasSlot() || other->HasSlot()) return false; |
| - // TODO(dcarney): byte widths should be compared here not kinds. |
| - if (live_ranges_[0]->kind() != other->live_ranges_[0]->kind() || |
| + if (live_ranges_[0]->representation() != |
| + other->live_ranges_[0]->representation() || |
|
bbudge
2016/06/18 23:33:22
It occurs to me that this will now prevent non-FP
|
| IsIntersectingWith(other)) { |
| return false; |
| } |
| @@ -3167,7 +3160,7 @@ void OperandAssigner::AssignSpillSlots() { |
| if (range == nullptr || range->IsEmpty()) continue; |
| // Allocate a new operand referring to the spill slot. |
| if (!range->HasSlot()) { |
| - int byte_width = range->ByteWidth(); |
| + int byte_width = range->byte_width(); |
| int index = data()->frame()->AllocateSpillSlot(byte_width); |
| range->set_assigned_slot(index); |
| } |