aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2016-08-04 07:52:38 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2016-08-04 07:52:38 +0000
commit90b1c81d64556c24ef208e7fd012c08b044d847e (patch)
tree925c06b8679c1a4eaf9e8233d7125b44baa0d6d4 /gcc
parente7ff6a46c9d852aeabae483b45e0e30bd6322a10 (diff)
downloadgcc-90b1c81d64556c24ef208e7fd012c08b044d847e.zip
gcc-90b1c81d64556c24ef208e7fd012c08b044d847e.tar.gz
gcc-90b1c81d64556c24ef208e7fd012c08b044d847e.tar.bz2
re PR target/70677 (Suboptimal cond on AVR: unneeded stack frame)
PR 70677 * common/config/avr/avr-common.c (avr_option_optimization_table) [OPT_LEVELS_ALL]: Turn off -fcaller-saves. From-SVN: r239117
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/common/config/avr/avr-common.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0e5eea4..940096a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2016-08-04 Georg-Johann Lay <avr@gjlay.de>
+ PR 70677
+ * common/config/avr/avr-common.c (avr_option_optimization_table)
+ [OPT_LEVELS_ALL]: Turn off -fcaller-saves.
+
+2016-08-04 Georg-Johann Lay <avr@gjlay.de>
+
PR 55181
* config/avr/avr.md: New pattern to work around do_store_flag
generating shift instructions for bit extractions.
diff --git a/gcc/common/config/avr/avr-common.c b/gcc/common/config/avr/avr-common.c
index d0272e4..75c87717 100644
--- a/gcc/common/config/avr/avr-common.c
+++ b/gcc/common/config/avr/avr-common.c
@@ -28,6 +28,9 @@
static const struct default_options avr_option_optimization_table[] =
{
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+ // The only effect of -fcaller-saves might be that it triggers
+ // a frame without need when it tries to be smart around calls.
+ { OPT_LEVELS_ALL, OPT_fcaller_saves, NULL, 0 },
{ OPT_LEVELS_NONE, 0, NULL, 0 }
};