This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64] Tweak aarch64_classify_address interface


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]