Kyrylo Tkachov <ktkac...@nvidia.com> writes:
>> On 3 Mar 2025, at 19:58, Wilco Dijkstra <wilco.dijks...@arm.com> wrote:
>> 
>> 
>> Enable the early scheduler on AArch64 for O3/Ofast.  This means GCC15 
>> benefits
>> from much faster build times with -O2, but avoids the regressions in lbm 
>> which
>> is very sensitive to minor scheduling changes due to long FMA chains.  We can
>> then revisit this for GCC16.
>> 
>
> I’m in favour of this.

Yeah, seems ok to me too.  I suppose we ought to update the documentation too:

  @opindex fschedule-insns
  @item -fschedule-insns
  If supported for the target machine, attempt to reorder instructions to
  eliminate execution stalls due to required data being unavailable.  This
  helps machines that have slow floating point or memory load instructions
  by allowing other instructions to be issued until the result of the load
  or floating-point instruction is required.

  Enabled at levels @option{-O2}, @option{-O3}.

Richard

> So ok for me if no objections within 24h.
> Thanks,
> Kyrill
>
>> gcc:
>>        PR target/118351
>>        * common/config/aarch64/aarch64-common.cc: Enable early scheduling 
>> with
>>        -O3 and higher.
>> 
>> ---
>> 
>> diff --git a/gcc/common/config/aarch64/aarch64-common.cc 
>> b/gcc/common/config/aarch64/aarch64-common.cc
>> index 
>> 3d694f16d1fd84e142254a4880c91a7f053e72aa..3044336923415d9414b6c66e66d872612ead24cd
>>  100644
>> --- a/gcc/common/config/aarch64/aarch64-common.cc
>> +++ b/gcc/common/config/aarch64/aarch64-common.cc
>> @@ -54,8 +54,10 @@ static const struct default_options 
>> aarch_option_optimization_table[] =
>>     { OPT_LEVELS_FAST, OPT_fomit_frame_pointer, NULL, 1 },
>>     /* Enable -fsched-pressure by default when optimizing.  */
>>     { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
>> -    /* Disable early scheduling due to high compile-time overheads.  */
>> +    /* Except for -O3 and higher, disable early scheduling due to high
>> +       compile-time overheads.  */
>>     { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
>> +    { OPT_LEVELS_3_PLUS, OPT_fschedule_insns, NULL, 1 },
>>     /* Enable redundant extension instructions removal at -O2 and higher.  */
>>     { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
>>     { OPT_LEVELS_2_PLUS, OPT_mearly_ra_, NULL, AARCH64_EARLY_RA_ALL },
>> 

Reply via email to