diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6023ccabe78c3d4c509b4c9c9bae1f9c552301a6..525a8f013d819f7847f37dd68596d5a8374ac8c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-12-24 Jiufu Guo <guojiufu@linux.ibm.com> + + * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable + -fweb and -frename-registers with -funroll-loops + 2019-12-22 Gerald Pfeifer <gerald@pfeifer.com> * doc/invoke.texi (-flto): Use "compile time" as a noun. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9dd09b95902e31317dc94d9bc96937a81d5cf9bc..5ee426cb1da271abb7cd0298b8d9d78c7fe2c468 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4538,12 +4538,19 @@ rs6000_option_override_internal (bool global_init_p) param_sched_pressure_algorithm, SCHED_PRESSURE_MODEL); - /* Explicit -funroll-loops turns -munroll-only-small-loops off. */ - if (((global_options_set.x_flag_unroll_loops && flag_unroll_loops) + /* Explicit -funroll-loops turns -munroll-only-small-loops off, and + turns -fweb and -frename-registers on. */ + if ((global_options_set.x_flag_unroll_loops && flag_unroll_loops) || (global_options_set.x_flag_unroll_all_loops && flag_unroll_all_loops)) - && !global_options_set.x_unroll_only_small_loops) - unroll_only_small_loops = 0; + { + if (!global_options_set.x_unroll_only_small_loops) + unroll_only_small_loops = 0; + if (!global_options_set.x_flag_rename_registers) + flag_rename_registers = 1; + if (!global_options_set.x_flag_web) + flag_web = 1; + } /* If using typedef char *va_list, signal that __builtin_va_start (&ap, 0) can be optimized to