aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJiufu Guo <guojiufu@linux.ibm.com>2019-12-24 13:27:33 +0000
committerJiufu Guo <guojiufu@gcc.gnu.org>2019-12-24 13:27:33 +0000
commitb57fab18604861a733f9bd7b8bc6b1e1bcd0f9b3 (patch)
treecd28fb2667fc0f3af395522f97ab11435a664f4b /gcc
parentf2a879930992085ca4e4f6b0cdd8d4debc6f4a47 (diff)
downloadgcc-b57fab18604861a733f9bd7b8bc6b1e1bcd0f9b3.zip
gcc-b57fab18604861a733f9bd7b8bc6b1e1bcd0f9b3.tar.gz
gcc-b57fab18604861a733f9bd7b8bc6b1e1bcd0f9b3.tar.bz2
rs6000: re-enable web and rnreg with -funroll-loops
Previously, limited unrolling was enabled at O2 for powerpc in r278034. At that time, -fweb and -frename-registers were not enabled together with -funroll-loops even for -O3. After that, we notice there are some performance degradations on SPEC2006fp which caused by without web and rnreg. This patch enable -fweb and -frename-registers for -funroll-loops to align original behavior before r278034. gcc/ 2019-12-23 Jiufu Guo <guojiufu@linux.ibm.com> * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable -fweb and -frename-registers with -funroll-loops From-SVN: r279725
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c15
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6023cca..525a8f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-24 Jiufu Guo <guojiufu@linux.ibm.com>
+
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable
+ -fweb and -frename-registers with -funroll-loops
+
2019-12-22 Gerald Pfeifer <gerald@pfeifer.com>
* doc/invoke.texi (-flto): Use "compile time" as a noun.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 9dd09b9..5ee426c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4538,12 +4538,19 @@ rs6000_option_override_internal (bool global_init_p)
param_sched_pressure_algorithm,
SCHED_PRESSURE_MODEL);
- /* Explicit -funroll-loops turns -munroll-only-small-loops off. */
- if (((global_options_set.x_flag_unroll_loops && flag_unroll_loops)
+ /* Explicit -funroll-loops turns -munroll-only-small-loops off, and
+ turns -fweb and -frename-registers on. */
+ if ((global_options_set.x_flag_unroll_loops && flag_unroll_loops)
|| (global_options_set.x_flag_unroll_all_loops
&& flag_unroll_all_loops))
- && !global_options_set.x_unroll_only_small_loops)
- unroll_only_small_loops = 0;
+ {
+ if (!global_options_set.x_unroll_only_small_loops)
+ unroll_only_small_loops = 0;
+ if (!global_options_set.x_flag_rename_registers)
+ flag_rename_registers = 1;
+ if (!global_options_set.x_flag_web)
+ flag_web = 1;
+ }
/* If using typedef char *va_list, signal that
__builtin_va_start (&ap, 0) can be optimized to