On 06/05/2026 14:00, Tamar Christina wrote:
> This turns on the GPR narrowing pass for all AArch64 targets.
In principle this sounds good, although maybe it should go in after
Soumya's fix for PR124895 to minimize noise for folks that are testing
the trunk.
>
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
>
> Any objections?
>
> 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)
Doesn't this render the tuning flag obsolete? Presumably we could remove
the flag entirely and instead just adjust the default to 1 for
-mnarrow-gp-writes in aarch64.opt (simplifying the logic in
pass_narrow_gp_writes::gate accordingly)?
Or would you prefer to keep it so that the pass can be turned off for
particular cores if required / to minimize churn in case a reversion is
needed?
Thanks,
Alex
>
> /* Enables dispatch scheduling. */
> AARCH64_EXTRA_TUNING_OPTION ("dispatch_sched", DISPATCH_SCHED)
>
>
> --
> 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)
>