Add --param max-unswitch-depth
authorRichard Biener <rguenther@suse.de>
Thu, 1 Dec 2022 15:14:14 +0000 (16:14 +0100)
committerRichard Biener <rguenther@suse.de>
Fri, 2 Dec 2022 07:04:11 +0000 (08:04 +0100)
commit5b50850c3c6f2eceb8012dcc8d3cd5ddd94fac6c
treea4fda0ea5379aad9eb7fea8143025b8175df1cee
parenta710f3ce7474792c098ac6fe4dc6a366cdbb4fb4
Add --param max-unswitch-depth

The following adds a --param to limit the depth of unswitched loop
nests.  One can use --param max-unswitch-depth=1 to disable unswitching
of outer loops (the innermost loop will then be unswitched).

PR tree-optimization/107946
* params.opt (-param=max-unswitch-depth=): New.
* doc/invoke.texi (--param=max-unswitch-depth): Document.
* tree-ssa-loop-unswitch.cc (init_loop_unswitch_info): Honor
--param=max-unswitch-depth
gcc/doc/invoke.texi
gcc/params.opt
gcc/tree-ssa-loop-unswitch.cc