diff options
author | 2015-01-13 09:20:58 -0500 | |
---|---|---|
committer | 2015-01-15 11:21:37 -0500 | |
commit | f85a9ca9859ad843dc03d3a2b600afbaf2e9bbdd (patch) | |
tree | a802042fa7a3a8cb820916d558e630596daaa9b4 /compiler/optimizing/register_allocator.h | |
parent | 8fccea249b1a6f1469eeea42c2b2cca06ce1c70d (diff) |
[optimizing compiler] Compute live spill size
The current stack frame calculation assumes that each live register to
be saved/restored has the word size of the machine. This fails for X86,
where a double in an XMM register takes up 8 bytes. Change the
calculation to keep track of the number of core registers and number of
fp registers to handle this distinction.
This is slightly pessimal, as the registers may not be active at the
same time, but the only way to handle this would be to allocate both
classes of registers simultaneously, or remember all the active
intervals, matching them up and compute the size of each safepoint
interval.
Change-Id: If7860aa319b625c214775347728cdf49a56946eb
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler/optimizing/register_allocator.h')
-rw-r--r-- | compiler/optimizing/register_allocator.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/register_allocator.h b/compiler/optimizing/register_allocator.h index c152a8bf67..70841b8e1f 100644 --- a/compiler/optimizing/register_allocator.h +++ b/compiler/optimizing/register_allocator.h @@ -190,8 +190,11 @@ class RegisterAllocator { // Slots reserved for out arguments. size_t reserved_out_slots_; - // The maximum live registers at safepoints. - size_t maximum_number_of_live_registers_; + // The maximum live core registers at safepoints. + size_t maximum_number_of_live_core_registers_; + + // The maximum live FP registers at safepoints. + size_t maximum_number_of_live_fp_registers_; ART_FRIEND_TEST(RegisterAllocatorTest, FreeUntil); |