On Thu, Jul 16, 2015 at 11:21:25AM +0100, Jiong Wang wrote:
> 
> Jeff Law writes:
> 
> > On 06/23/2015 02:29 AM, Ramana Radhakrishnan wrote:
> >
> >>> If you try disabling the REG_EQUAL note generation [*], you'll probably 
> >>> find a
> >>> performance regression on arm32 (and probably on aarch64 as well?
> >>> we only
> >>
> >> IMHO disabling the REG_EQUAL note generation is the wrong way to go about 
> >> this.
> > Agreed.
> >
> >> Irrespective of combine, as a first step we should fix the predicates
> >> and the call expanders to prevent this sort of replacement in the
> >> backends. Tightening the predicates in the call patterns will achieve
> >> the same for you and then we can investigate the use of GOT_PREL. My
> >> recollection of this is that you need to work out when it's more
> >> beneficial to use GOT_PREL over GOT but it's been a while since I
> >> looked in that area.
> > Also agreed.  This is primarily a backend issue with the call patterns.
> >
> > This is similar to the situation on the PA with the 32bit SOM runtime 
> > where direct and indirect calls have different calling conventions. 
> > Those different calling conventions combined with the early loading of 
> > the parameter registers in effect restricts us from being able to 
> > transform an indirect call into a direct call (combine) or vice-versa (cse).
> >
> > The way we handled this was to split the calls into two patterns, one 
> > for direct one for indirect and tightening their predicates appropriately.
> >
> > Jeff
> 
> Attachment is the patch which repair -fno-plt support for AArch64.
> 
> aarch64_is_noplt_call_p will only be true if:
> 
>   * gcc is generating position independent code.
>   * function symbol has declaration.
>   * either -fno-plt or "(no_plt)" attribute specified.
>   * it's a external function.
>   
> OK for trunk?

OK.

Thanks,
James

> 
> 2015-07-16  Jiong Wang  <jiong.w...@arm.com>
> 
> gcc/
>   * config/aarch64/aarch64-protos.h (aarch64_is_noplt_call_p): New
>   declaration.
>   * config/aarch64/aarch64.c (aarch64_is_noplt_call_p): New function.
>   * config/aarch64/aarch64.md (call_value_symbol): Check noplt
>   scenarios.
>   (call_symbol): Ditto.
> 
> gcc/testsuite/
>   * gcc.target/aarch64/noplt_1.c: New testcase.
>   * gcc.target/aarch64/noplt_2.c: Ditto.
> 

((Though do check the ChangeLog formatting when you commit :-).))

Reply via email to