diff options
author | Richard Biener <rguenther@suse.de> | 2021-07-02 13:48:07 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-07-06 11:56:47 +0200 |
commit | 9f489a5731f12b8e6b49994e8f61acb5d26f508e (patch) | |
tree | b0ca01e2c53647b46722ca04c9676238130468a0 /gcc/tree-ssa-loop-im.c | |
parent | b019b28ebd65462a092c96d95e9e356c8bb39b78 (diff) | |
download | gcc-9f489a5731f12b8e6b49994e8f61acb5d26f508e.zip gcc-9f489a5731f12b8e6b49994e8f61acb5d26f508e.tar.gz gcc-9f489a5731f12b8e6b49994e8f61acb5d26f508e.tar.bz2 |
add -fmove-loop-stores option to control GIMPLE loop store-motion
This adds the -fmove-loop-stores option, mainly as a way to disable
the store-motion part of GIMPLE invariant motion (-ftree-loop-im)
which is enabled by default. It might be sensible to turn off
-fmove-loop-stores at -O1 since it can result in compile-time
as well as memory usage issues but this patch tries to preserve
existing behavior besides introducing the new option with the
exception of -Og where I've disabled it.
Controlling store-motion has been made easy by earlier refactoring
for the invariant motion only use after loop interchange.
2021-07-02 Richard Biener <rguenther@suse.de>
* doc/invoke.texi (fmove-loop-stores): Document.
* common.opt (fmove-loop-stores): New option.
* opts.c (default_options_table): Enable -fmove-loop-stores
at -O1 but not -Og.
* tree-ssa-loop-im.c (pass_lim::execute): Pass
flag_move_loop_stores instead of true to
loop_invariant_motion_in_fun.
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index e7a3050..9ac390b 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -3258,7 +3258,7 @@ pass_lim::execute (function *fun) if (number_of_loops (fun) <= 1) return 0; - unsigned int todo = loop_invariant_motion_in_fun (fun, true); + unsigned int todo = loop_invariant_motion_in_fun (fun, flag_move_loop_stores); if (!in_loop_pipeline) loop_optimizer_finalize (); |