OSDN Git Service

[optimizing compiler] Compute live spill size
authorMark Mendell <mark.p.mendell@intel.com>
Tue, 13 Jan 2015 14:20:58 +0000 (09:20 -0500)
committerMark Mendell <mark.p.mendell@intel.com>
Thu, 15 Jan 2015 16:21:37 +0000 (11:21 -0500)
commitf85a9ca9859ad843dc03d3a2b600afbaf2e9bbdd
treea802042fa7a3a8cb820916d558e630596daaa9b4
parent8fccea249b1a6f1469eeea42c2b2cca06ce1c70d
[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>
compiler/optimizing/code_generator.cc
compiler/optimizing/code_generator.h
compiler/optimizing/code_generator_arm.h
compiler/optimizing/code_generator_arm64.h
compiler/optimizing/code_generator_x86.h
compiler/optimizing/code_generator_x86_64.h
compiler/optimizing/register_allocator.cc
compiler/optimizing/register_allocator.h