re PR target/70677 (Suboptimal cond on AVR: unneeded stack frame)
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 4 Aug 2016 07:52:38 +0000 (07:52 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Thu, 4 Aug 2016 07:52:38 +0000 (07:52 +0000)
PR 70677
* common/config/avr/avr-common.c (avr_option_optimization_table)
[OPT_LEVELS_ALL]: Turn off -fcaller-saves.

From-SVN: r239117

gcc/ChangeLog
gcc/common/config/avr/avr-common.c

index 0e5eea4e7ca4bf980b8b60cb003d0e81975f8c7f..940096a131faf0d10993cbf8d28c05ef45732f58 100644 (file)
@@ -1,3 +1,9 @@
+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
index d0272e4cda73ac07fe15155f0d7d763b541560d1..75c877175c1d69a85338f2f3b31f5ac652004937 100644 (file)
@@ -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 }
   };