Hi! When looking at the hash table memset -> loop patch, I was looking at when -ftree-loop-distribute-patterns is enabled and noticed since r271595 / PR88440 it is actually enabled at -O2+ rather than -O3+. This patch moves it to the proper section, so that OPT_LEVELS_2_PLUS are together, and updates invoke.texi to match that change.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2019-12-11 Jakub Jelinek <ja...@redhat.com> * opts.c (default_options_table): Move -ftree-loop-distribute-patterns entry from -O3 or later section to -O2 or later section. * doc/invoke.texi (-ftree-loop-distribute-patterns): Mention the option is enabled by default at -O2+ rather than just at -O3. --- gcc/opts.c.jj 2019-12-09 00:21:31.694097994 +0100 +++ gcc/opts.c 2019-12-11 17:03:12.623708255 +0100 @@ -508,6 +508,7 @@ static const struct default_options defa { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, { OPT_LEVELS_2_PLUS, OPT_fvect_cost_model_, NULL, VECT_COST_MODEL_CHEAP }, { OPT_LEVELS_2_PLUS, OPT_finline_functions, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, /* -O2 and above optimizations, but not -Os or -Og. */ { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_falign_functions, NULL, 1 }, @@ -533,7 +534,6 @@ static const struct default_options defa { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_fsplit_loops, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_fsplit_paths, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribution, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_ftree_loop_vectorize, NULL, 1 }, { OPT_LEVELS_3_PLUS, OPT_ftree_partial_pre, NULL, 1 }, --- gcc/doc/invoke.texi.jj 2019-12-10 22:03:21.382798370 +0100 +++ gcc/doc/invoke.texi 2019-12-11 17:03:50.828122335 +0100 @@ -9782,8 +9782,8 @@ It is also enabled by @option{-fprofile- @item -ftree-loop-distribute-patterns @opindex ftree-loop-distribute-patterns Perform loop distribution of patterns that can be code generated with -calls to a library. This flag is enabled by default at @option{-O3}, and -by @option{-fprofile-use} and @option{-fauto-profile}. +calls to a library. This flag is enabled by default at @option{-O2} and +higher, and by @option{-fprofile-use} and @option{-fauto-profile}. This pass distributes the initialization loops and generates a call to memset zero. For example, the loop Jakub