[PATCH 4/6] Port prefetch configuration from aarch32 to aarch64

Maxim Kuvyrkov maxim.kuvyrkov@linaro.org
Fri Jun 9 15:56:00 GMT 2017


> On Jun 9, 2017, at 1:04 PM, James Greenhalgh <james.greenhalgh@arm.com> wrote:
>>> 
...
>>> I disagree with having to write all these things out, but I do agree
>>> that we should be self-consistent within the port.
>> 
>> I'm re-writing the patch with approach that James suggested, and instead of
>> AARCH64_PREFETCH_NOT_BENEFICIAL there will be "&generic_prefetch_tune", so
>> not much copy-paste of parameters.
>> 
>>> 
>>> The purpose of introducing the macros in the ARM port was to avoid the
>>> common problem of merging adding new parameters with adding new ports.
>>> C initializers for these tables assign values sequentially  with
>>> zero-padding at the end, so failing to merge such changes carefully
>>> leads to real bugs in the compiler (even if just performance bugs).
>>> 
>>> I notice that the last entry in the current tune params table is an int,
>>> rather than something that is type-checked (like the penultimate entry -
>>> an enum).  Having the final entry be type checked at least ensures that
>>> the right number of elements exist, even if the order is not strictly
>>> checked.
>> 
>> If you prefer, I can move "&generic_prefetch_tune" to the bottom of "struct
>> tune_params", thus enabling type checking on struct pointer.
> 
> For the zero-cost/small-benefit tradefoff it gives, I'd say "why not".
> 
> With that change in place and the obvious rebase needed for patch 6/6 in
> place, both this (4/6) and patch 6/6 are OK.

Thanks, James.

I'm going to commit this once bootstrap / regtest finish on aarch64-linux-gnu.

--
Maxim Kuvyrkov
www.linaro.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Port-prefetch-configuration-from-aarch32-to-aarch64-.patch
Type: application/octet-stream
Size: 10227 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170609/e2a9ffbf/attachment.obj>


More information about the Gcc-patches mailing list