summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-20 12:18:32 +0000
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-20 12:18:32 +0000
commit92a2a7165ad476db5cd7220bc4c0a74add997ae3 (patch)
tree6e07e23b33a8db22031caaaa3e7c9e1df95f4a16 /gcc/opts.c
parent67dfc6a256af191af721e001c9ac41f289ac565a (diff)
downloadgcc-92a2a7165ad476db5cd7220bc4c0a74add997ae3.tar.gz
loop splitting
(approved at https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00648.html ) * common.opt (-fsplit-loops): New flag. * passes.def (pass_loop_split): Add. * opts.c (default_options_table): Add OPT_fsplit_loops entry at -O3. (enable_fdo_optimizations): Add loop splitting. * timevar.def (TV_LOOP_SPLIT): Add. * tree-pass.h (make_pass_loop_split): Declare. * tree-ssa-loop-manip.h (rewrite_into_loop_closed_ssa_1): Declare. * tree-ssa-loop-unswitch.c: Include tree-ssa-loop-manip.h, * tree-ssa-loop-split.c: New file. * Makefile.in (OBJS): Add tree-ssa-loop-split.o. * doc/invoke.texi (fsplit-loops): Document. * doc/passes.texi (Loop optimization): Add paragraph about loop splitting. testsuite/ * gcc.dg/loop-split.c: New test. * gcc.dg/tree-ssa/ifc-9.c: Update. * gcc.dg/tree-ssa/ifc-10.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 90e6186e711..5f447500a9f 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -530,6 +530,7 @@ static const struct default_options default_options_table[] =
regardless of them being declared inline. */
{ OPT_LEVELS_3_PLUS_AND_SIZE, OPT_finline_functions, NULL, 1 },
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_finline_functions_called_once, NULL, 1 },
+ { OPT_LEVELS_3_PLUS, OPT_fsplit_loops, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_funswitch_loops, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_fgcse_after_reload, NULL, 1 },
{ OPT_LEVELS_3_PLUS, OPT_ftree_loop_vectorize, NULL, 1 },
@@ -1427,6 +1428,8 @@ enable_fdo_optimizations (struct gcc_options *opts,
opts->x_flag_ipa_bit_cp = value;
if (!opts_set->x_flag_predictive_commoning)
opts->x_flag_predictive_commoning = value;
+ if (!opts_set->x_flag_split_loops)
+ opts->x_flag_split_loops = value;
if (!opts_set->x_flag_unswitch_loops)
opts->x_flag_unswitch_loops = value;
if (!opts_set->x_flag_gcse_after_reload)