From 31d76b42ef5165351499da3f8ee0ac147428c5ed Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 9 Jun 2014 15:02:22 +0100 Subject: Plug code generator into liveness analysis. Also implement spill slot support. Change-Id: If5e28811e9fbbf3842a258772c633318a2f4fafc --- compiler/optimizing/register_allocator.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/optimizing/register_allocator.h') diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h index e575b9678d..3393a04d77 100644 --- a/compiler/optimizing/register_allocator.h +++ b/compiler/optimizing/register_allocator.h @@ -55,6 +55,7 @@ class RegisterAllocator { // Helper method for validation. Used by unit testing. static bool ValidateIntervals(const GrowableArray& intervals, + size_t number_of_spill_slots, const CodeGenerator& codegen, ArenaAllocator* allocator, bool processing_core_registers, @@ -75,6 +76,9 @@ class RegisterAllocator { // Returns whether `reg` is blocked by the code generator. bool IsBlocked(int reg) const; + // Allocate a spill slot for the given interval. + void AllocateSpillSlotFor(LiveInterval* interval); + // Helper methods. void AllocateRegistersInternal(const SsaLivenessAnalysis& liveness); bool ValidateInternal(const SsaLivenessAnalysis& liveness, bool log_fatal_on_failure) const; @@ -98,6 +102,9 @@ class RegisterAllocator { // That is, they have a lifetime hole that spans the start of the new interval. GrowableArray inactive_; + // The spill slots allocated for live intervals. + GrowableArray spill_slots_; + // True if processing core registers. False if processing floating // point registers. bool processing_core_registers_; -- cgit v1.2.3-59-g8ed1b