]> git.ipfire.org Git - thirdparty/gcc.git/commit
Introduce flag_cunroll_grow_size for cunroll and avoid enable it at -O2
authorguojiufu <guojiufu@linux.ibm.com>
Thu, 28 May 2020 05:42:23 +0000 (13:42 +0800)
committerguojiufu <guojiufu@linux.ibm.com>
Fri, 19 Jun 2020 06:55:07 +0000 (14:55 +0800)
commit60bd3f20baebeeddd60f8a2b85927e7da7c6016e
treecb4223f8981cc7f70b4b1e9c29668d7c283174c2
parenteb13d29d0cda9771873befdb9e1fb22729b7b686
Introduce flag_cunroll_grow_size for cunroll and avoid enable it at -O2

Currently GIMPLE complete unroller(cunroll) is checking
flag_unroll_loops and flag_peel_loops to see if allow size growth.
Beside affects curnoll, flag_unroll_loops also controls RTL unroler.
To have more freedom to control cunroll and RTL unroller, this patch
introduces flag_cunroll_grow_size.  With this patch, we can control
cunroll and RTL unroller indepently. And enable flag_cunroll_grow_size
only if -funroll-loops or -fpeel-loops or -O3 is specified explicitly.

gcc/ChangeLog
2020-06-19  Jiufu Guo  <guojiufu@linux.ibm.com>

PR target/95018
* common.opt (flag_cunroll_grow_size): New flag.
* toplev.c (process_options): Set flag_cunroll_grow_size.
* tree-ssa-loop-ivcanon.c (pass_complete_unroll::execute):
Use flag_cunroll_grow_size.
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Override flag_cunroll_grow_size.
gcc/common.opt
gcc/config/rs6000/rs6000.c
gcc/toplev.c
gcc/tree-ssa-loop-ivcanon.c