diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-11-24 15:30:17 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-11-24 15:30:17 +0000 |
commit | 94331892c35dcef7d097578e8b166c5feded9358 (patch) | |
tree | 60a991d2053ed8ebeab1b44f7a44ee9d1e4273e8 | |
parent | 33a002b0ab6f8827631cc50eddaa2b2d4aa1bd35 (diff) | |
download | gcc-94331892c35dcef7d097578e8b166c5feded9358.zip gcc-94331892c35dcef7d097578e8b166c5feded9358.tar.gz gcc-94331892c35dcef7d097578e8b166c5feded9358.tar.bz2 |
sparc-common.c (sparc_option_optimization_table): Enable REE at -O2 and higher.
* common/config/sparc/sparc-common.c (sparc_option_optimization_table):
Enable REE at -O2 and higher.
* config/sparc/sparc.c (sparc_option_override): Disable it by default
in 32-bit mode.
From-SVN: r242841
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/common/config/sparc/sparc-common.c | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6641c1..c1469f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-11-24 Eric Botcazou <ebotcazou@adacore.com> + + * common/config/sparc/sparc-common.c (sparc_option_optimization_table): + Enable REE at -O2 and higher. + * config/sparc/sparc.c (sparc_option_override): Disable it by default + in 32-bit mode. + 2016-11-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR target/48863 diff --git a/gcc/common/config/sparc/sparc-common.c b/gcc/common/config/sparc/sparc-common.c index 3958b7e..721c8b3 100644 --- a/gcc/common/config/sparc/sparc-common.c +++ b/gcc/common/config/sparc/sparc-common.c @@ -28,6 +28,8 @@ along with GCC; see the file COPYING3. If not see static const struct default_options sparc_option_optimization_table[] = { { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, + /* Enable redundant extension instructions removal at -O2 and higher. */ + { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } }; diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 2d1f598..a70a0ad 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -1713,6 +1713,11 @@ sparc_option_override (void) pessimizes for double floating-point registers. */ if (!global_options_set.x_flag_ira_share_save_slots) flag_ira_share_save_slots = 0; + + /* Only enable REE by default in 64-bit mode where it helps to eliminate + redundant 32-to-64-bit extensions. */ + if (!global_options_set.x_flag_ree && TARGET_ARCH32) + flag_ree = 0; } /* Miscellaneous utilities. */ |