On 11/17/2017 09:03 AM, Richard Sandiford wrote:
> This patch:
> 
> - tweaks the handling of legitimize_address_displacement
>   so that it gets called before rather than after the address has
>   been expanded.  This means that we're no longer at the mercy
>   of LRA being able to interpret the expanded instructions.
> 
> - passes the original offset to legitimize_address_displacement.
> 
> - adds SVE support to the AArch64 implementation of
>   legitimize_address_displacement.
> 
> Tested on aarch64-linux-gnu (with and without SVE), x86_64-linux-gnu
> and powerpc64le-linux-gnu.  OK to install?
> 
> Richard
> 
> 
> 2017-11-17  Richard Sandiford  <richard.sandif...@linaro.org>
>           Alan Hayward  <alan.hayw...@arm.com>
>           David Sherwood  <david.sherw...@arm.com>
> 
> gcc/
>       * target.def (legitimize_address_displacement): Take the original
>       offset as a poly_int.
>       * targhooks.h (default_legitimize_address_displacement): Update
>       accordingly.
>       * targhooks.c (default_legitimize_address_displacement): Likewise.
>       * doc/tm.texi: Regenerate.
>       * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
>       as an argument, moving assert of ad->disp == ad->disp_term to...
>       (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
>       Try calling targetm.legitimize_address_displacement before expanding
>       the address rather than afterwards, and adjust for the new interface.
>       * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
>       Match the new hook interface.  Handle SVE addresses.
>       * config/sh/sh.c (sh_legitimize_address_displacement): Make the
>       new hook interface.
It depends on poly, so it can't go in yet.  But if/when poly is
approved, the target independent bits are fine as are the sh changes.
I'll let the aarch64 maintainers chime in on those bits.

Jeff

Reply via email to