@@ -34,14 +34,9 @@ static const struct default_options rs6000_option_optimization_table[] =
{ OPT_LEVELS_ALL, OPT_fsplit_wide_types_early, NULL, 1 },
/* Enable -fsched-pressure for first pass instruction scheduling. */
{ OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
- /* Enable -munroll-only-small-loops with -funroll-loops to unroll small
- loops at -O2 and above by default. */
- { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_funroll_loops, NULL, 1 },
- { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_munroll_only_small_loops, NULL, 1 },
-
- /* -frename-registers leads to non-optimal codegen and performance
- on rs6000, turn it off by default. */
- { OPT_LEVELS_ALL, OPT_frename_registers, NULL, 0 },
+ /* Enable -frtl-unroll-loops and -fweb at -O2 and above by default. */
+ { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_frtl_unroll_loops, NULL, 1 },
+ { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_fweb, NULL, 1 },
/* Double growth factor to counter reduced min jump length. */
{ OPT_LEVELS_ALL, OPT__param_max_grow_copy_bb_insns_, NULL, 16 },
@@ -4557,17 +4557,16 @@ rs6000_option_override_internal (bool global_init_p)
param_sched_pressure_algorithm,
SCHED_PRESSURE_MODEL);
- /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
- turns -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))
- {
- 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 -f[no-]unroll-loops is specified explicitly, turn [off/]on
+ -frtl-unroll-loops. */
+ if (global_options_set.x_flag_unroll_loops
+ && !global_options_set.x_flag_rtl_unroll_loops)
+ flag_rtl_unroll_loops = flag_unroll_loops;
+
+ /* If flag_unroll_loops is effect, not _only_ small loops, but
+ large loops are unrolled if possible. */
+ if (!global_options_set.x_unroll_only_small_loops)
+ unroll_only_small_loops = flag_unroll_loops ? 0 : 1;
/* If using typedef char *va_list, signal that
__builtin_va_start (&ap, 0) can be optimized to