Andrew Pinski <[email protected]> writes:
> On Wed, May 6, 2026 at 6:01 AM Tamar Christina <[email protected]>
> wrote:
>>
>> This turns on the GPR narrowing pass for all AArch64 targets.
>>
>> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
>>
>> Any objections?
>
> Just FYI, there was a reason compile time jump (16.5%) with this patch
> with `-O2 -g` on the testcase from PR 69609 as graphed at
> https://lnt.opensuse.org/db_default/v4/CPP/graph?plot.0=685.630.8 .
>
> Note I have not looked to see what caused the previous increases back
> in August and September of last year yet either.
Just to confirm what I said in the other thread: this isn't the pass's
fault. It seems to be an issue with rtl-ssa. (Specifically post-RA
rtl-ssa; pre-RA seems ok.)
I only see it on native aarch64, rather than x86_64-x-aarch64.
And it seems to be due to poor cache behaviour, rather than excess work.
I'll try to look deeper soon.
Thanks,
Richard
>
> Thanks,
> Andrea
>
>>
>> Thanks,
>> Tamar
>>
>> gcc/ChangeLog:
>>
>> * config/aarch64/aarch64-tuning-flags.def
>> (AARCH64_EXTRA_TUNE_BASE): Add AARCH64_EXTRA_TUNE_NARROW_GP_WRITES.
>>
>> ---
>> diff --git a/gcc/config/aarch64/aarch64-tuning-flags.def
>> b/gcc/config/aarch64/aarch64-tuning-flags.def
>> index
>> 882daa4b4312039f96dcde1295179be3ab3da0d0..058dadecccaac458e30a6585b558581a7bef6f54
>> 100644
>> --- a/gcc/config/aarch64/aarch64-tuning-flags.def
>> +++ b/gcc/config/aarch64/aarch64-tuning-flags.def
>> @@ -67,7 +67,8 @@ AARCH64_EXTRA_TUNING_OPTION ("cheap_fpmr_write",
>> CHEAP_FPMR_WRITE)
>>
>> /* Baseline tuning settings suitable for all modern cores. */
>> #define AARCH64_EXTRA_TUNE_BASE (AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND \
>> - | AARCH64_EXTRA_TUNE_FULLY_PIPELINED_FMA)
>> + | AARCH64_EXTRA_TUNE_FULLY_PIPELINED_FMA \
>> + | AARCH64_EXTRA_TUNE_NARROW_GP_WRITES)
>>
>> /* Enables dispatch scheduling. */
>> AARCH64_EXTRA_TUNING_OPTION ("dispatch_sched", DISPATCH_SCHED)
>>
>>
>> --