Index: src/compiler/register-allocator.h |
diff --git a/src/compiler/register-allocator.h b/src/compiler/register-allocator.h |
index caac610b4d38c28018320dd92646c0e118e17b40..a7a1f0073bd333f479f8f95c0d04470481c0822e 100644 |
--- a/src/compiler/register-allocator.h |
+++ b/src/compiler/register-allocator.h |
@@ -562,6 +562,10 @@ class TopLevelLiveRange final : public LiveRange { |
void UpdateSpillRangePostMerge(TopLevelLiveRange* merged); |
int vreg() const { return vreg_; } |
+#if DEBUG |
+ int debug_virt_reg() const; |
+#endif |
+ |
int GetNextChildId() { |
return IsSplinter() ? splintered_from()->GetNextChildId() |
: ++last_child_id_; |
@@ -909,8 +913,16 @@ class RegisterAllocator : public ZoneObject { |
return allocatable_register_codes_[allocatable_index]; |
} |
+ // TODO(mtrofin): explain why splitting in gap START is always OK. |
+ LifetimePosition GetSplitPositionForInstruction(const LiveRange* range, |
+ int instruction_index); |
+ |
Zone* allocation_zone() const { return data()->allocation_zone(); } |
+ // Find the optimal split for ranges defined by a memory operand, e.g. |
+ // constants or function parameters passed on the stack. |
+ void SplitAndSpillRangesDefinedByMemoryOperand(); |
+ |
// Split the given range at the given position. |
// If range starts at or after the given position then the |
// original range is returned. |
@@ -919,6 +931,11 @@ class RegisterAllocator : public ZoneObject { |
// still be owned by the original range after splitting. |
LiveRange* SplitRangeAt(LiveRange* range, LifetimePosition pos); |
+ bool CanProcessRange(LiveRange* range) const { |
+ return range != nullptr && !range->IsEmpty() && range->kind() == mode(); |
+ } |
+ |
+ |
// Split the given range in a position from the interval [start, end]. |
LiveRange* SplitBetween(LiveRange* range, LifetimePosition start, |
LifetimePosition end); |