On 04/17/2016 08:59 PM, Jeff Law wrote:
invoke.texi has an independent list (probably incomplete! ;( of all the things that -O2 enables. Make sure to add -frename-registers to that list and this is Ok for the trunk (gcc-7).
This is what I committed. Bernd Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 235441) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,10 @@ +2016-04-26 Bernd Schmidt <bschm...@redhat.com> + + PR rtl-optimization/57193 + * opts.c (default_options_table): Add OPT_frename_registers at -O2 + and above. + * doc/invoke.texi (-frename-registers, -O2): Update documentation. + 2016-04-26 Bin Cheng <bin.ch...@arm.com> * tree-if-conv.c (any_pred_load_store): New static variable. Index: gcc/opts.c =================================================================== --- gcc/opts.c (revision 235441) +++ gcc/opts.c (working copy) @@ -498,6 +498,7 @@ static const struct default_options defa { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_freorder_blocks_algorithm_, NULL, REORDER_BLOCKS_ALGORITHM_STC }, + { OPT_LEVELS_2_PLUS, OPT_frename_registers, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_ftree_pre, NULL, 1 }, Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 235441) +++ gcc/doc/invoke.texi (working copy) @@ -6255,6 +6255,7 @@ also turns on the following optimization -foptimize-strlen @gol -fpartial-inlining @gol -fpeephole2 @gol +-frename-registers @gol -freorder-blocks-algorithm=stc @gol -freorder-blocks-and-partition -freorder-functions @gol -frerun-cse-after-loop @gol @@ -8562,7 +8563,8 @@ debug information format adopted by the make debugging impossible, since variables no longer stay in a ``home register''. -Enabled by default with @option{-funroll-loops} and @option{-fpeel-loops}. +Enabled by default with @option{-funroll-loops} and @option{-fpeel-loops}, +and also enabled at levels @option{-O2} and @option{-O3}. @item -fschedule-fusion @opindex fschedule-fusion