This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64] Tweak aarch64_classify_address interface
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Richard Sandiford <richard dot sandiford at linaro dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>, <nd at arm dot com>
- Date: Wed, 30 Aug 2017 18:00:57 +0100
- Subject: Re: [AArch64] Tweak aarch64_classify_address interface
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com;
- Nodisclaimer: True
- References: <8760dgc5wc.fsf@linaro.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Tue, Aug 22, 2017 at 10:23:47AM +0100, Richard Sandiford wrote:
> Previously aarch64_classify_address used an rtx code to distinguish
> LDP/STP addresses from normal addresses; the code was PARALLEL
> to select LDP/STP and anything else to select normal addresses.
> This patch replaces that parameter with a dedicated enum.
>
> The SVE port will add another enum value that didn't map naturally
> to an rtx code.
>
> Tested on aarch64-linux-gnu. OK to install?
I can't say I really like this new interface, I'd prefer two wrappers
aarch64_legitimate_address_p , aarch64_legitimate_ldp_address_p (or similar)
around your new interface, and for most code to simply call the wrapper.
Or an overloaded call that filled in ADDR_QUERY_M automatically, to save
that spreading through the backend.
Thanks,
James
>
>
> 2017-08-22 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): New enum.
> (aarch64_legitimate_address_p): Use it instead of an rtx code.
> * config/aarch64/aarch64.c (aarch64_classify_address): Likewise.
> (aarch64_legitimate_address_p): Likewise.
> (aarch64_address_valid_for_prefetch_p): Update calls accordingly.
> (aarch64_legitimate_address_hook_p): Likewise.
> (aarch64_print_operand_address): Likewise.
> (aarch64_address_cost): Likewise.
> * config/aarch64/aarch64-simd.md (mov<mode>): Likewise.
> * config/aarch64/constraints.md (Uad): Likewise.
> * config/aarch64/predicates.md (aarch64_mem_pair_operand): Likewise.