This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: var-tracking and s390's LM(G)
- From: Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, jakub at redhat dot com, gcc-patches at gcc dot gnu dot org, Andreas dot Krebbel at de dot ibm dot com
- Date: Thu, 06 Feb 2014 14:48:19 +0000
- Subject: Re: var-tracking and s390's LM(G)
- Authentication-results: sourceware.org; auth=none
- References: <201402052230 dot s15MUR30016660 at d06av02 dot portsmouth dot uk dot ibm dot com> <52F2E969 dot 1080300 at redhat dot com> <87a9e4a7ks dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <52F3902A dot 4000306 at redhat dot com>
Richard Henderson <rth@redhat.com> writes:
> On 02/06/2014 01:55 AM, Richard Sandiford wrote:
>> OK, I agree that's not 4.9 material. What about the other change
>> of replacing:
>>
>> REF_CFA_DEF_CFA (plus (stack_pointer_rtx) (const_int 160/96))
>>
>> with:
>>
>> REF_CFA_ADJUST_CFA (set (stack_pointer_rtx)
>> (plus (current_cfa_base) (const_int offset)))
>>
>> ? That works on its own, but having both a REG_CFA_ADJUST_CFA that assigns
>> to stack_pointer_rtx and a REG_CFA_RESTORE for stack_pointer_rtx feels like
>> a double assignment.
>
> It does seem like it. I suppose it would be easy to suppress the RESTORE of
> the stack pointer, without changing the save at all.
But if having a restore in the presence of a save doesn't matter, why do
we have restores for the other registers? If the idea is that we never
care what the CFI state is after the LM(G) then why not omit all of them?
Or do you mean that REG_CFA_ADJUST_CFA would act as a REG_CFA_RESTORE too,
if there had been a previous save?
Thanks,
Richard