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.
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 },