[aarch64-port-dev ] RFR: 8075930: AARCH64: Use FP Register in C2

Andrew Haley aph at redhat.com
Tue Apr 21 15:11:04 UTC 2015


On 04/21/2015 10:20 AM, Edward Nevill wrote:

> If everyone is happy with this patch could someone push it please,

I'm a bit concerned about deoptimization.

Here is a call to uncommon_trap before your patch:

308   	strw  R0, [sp, #0]	# spill
30c + 	strw  R24, [sp, #4]	# spill
310   	call,static 0x000003ffa807f080 	// ==>  wrapper for: uncommon_trap(reason='unstable_if' action='reinterpret')
        # Pressure::poo @ bci:482  L[0]=_ L[1]=_ L[2]=_ L[3]=_ L[4]=_ L[5]=_ L[6]=_ L[7]=_ L[8]=_ L[9]=_ L[10]=_ L[11]=_ L[12]=_ L[13]=_ L[14]=_ L[15]=_ L[16]=_ L[17]=_ L[18]=_ L[19]=_ L[20]=_ L[21]=_ L[22]=_ L[23]=sp + #0 STK[0]=sp + #4

and after:

300   	movw  R29, R0	# shuffle
304 + 	strw  R25, [sp, #0]	# spill
308   	call,static 0x000003ffa807f080 	// ==>  wrapper for: uncommon_trap(reason='unstable_if' action='reinterpret')
        # Pressure::poo @ bci:482  L[0]=_ L[1]=_ L[2]=_ L[3]=_ L[4]=_ L[5]=_ L[6]=_ L[7]=_ L[8]=_ L[9]=_ L[10]=_ L[11]=_ L[12]=_ L[13]=_ L[14]=_ L[15]=_ L[16]=_ L[17]=_ L[18]=_ L[19]=_ L[20]=_ L[21]=_ L[22]=_ L[23]=R29 STK[0]=sp + #0

R29 (i.e. rfp) is marked Save-On-Entry.  It is the only allocatable
general-purpose register which is.  I'm a bit worried that
deoptimization might not restore this register correctly if it hasn't
been spilled.  Maybe we should mark R29 as SOC.

On the other hand, if it does work it will be a nice performance
improvement: there will be one less spill to the stack at most calls.
But AFAIK deoptimization expects everything to be saved in the stack
frame.

Vladimir, is that right?

Andrew.


More information about the hotspot-dev mailing list