]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
picochip.c (flag_conserve_stack): set PARAM_LARGE_STACK_FRAME and PARAM_STACK_FRAME_G...
authorHariharan Sandanagobalane <hariharan@picochip.com>
Fri, 30 Jan 2009 10:25:54 +0000 (10:25 +0000)
committerHariharan Sandanagobalane <hariharans@gcc.gnu.org>
Fri, 30 Jan 2009 10:25:54 +0000 (10:25 +0000)
        * config/picochip/picochip.c (flag_conserve_stack): set
        PARAM_LARGE_STACK_FRAME and PARAM_STACK_FRAME_GROWTH to zero under
        fconserve-stack. Reduce call-overhead used by inliner.

From-SVN: r143785

gcc/ChangeLog
gcc/config/picochip/picochip.c

index 120b50eae092ce8c3ab3d31d849c68cfac2d8d83..6dc807bb4ca92fa966d2117be07312c5806bd534 100644 (file)
@@ -1,3 +1,9 @@
+Hariharan Sandanagobalane <hariharan@picochip.com>
+
+       * config/picochip/picochip.c (flag_conserve_stack): set
+       PARAM_LARGE_STACK_FRAME and PARAM_STACK_FRAME_GROWTH to zero under
+       fconserve-stack. Reduce call-overhead used by inliner.
+
 Hariharan Sandanagobalane <hariharan@picochip.com>
 
        PR/38157
index 36170421d191dcbff0a3d8e8b6d9b55583d9cc33..a0686bdb262b56ee51948f35c466621fee230ba0 100644 (file)
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3.  If not, see
 #include "target-def.h"
 #include "langhooks.h"
 #include "reload.h"
+#include "params.h"
 
 #include "picochip-protos.h"
 
@@ -303,6 +304,16 @@ picochip_return_in_memory(const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 void
 picochip_override_options (void)
 {
+  /* If we are optimizing for stack, dont let inliner to inline functions
+     that could potentially increase stack size.*/
+   if (flag_conserve_stack)
+   {
+     PARAM_VALUE (PARAM_LARGE_STACK_FRAME) = 0;
+     PARAM_VALUE (PARAM_STACK_FRAME_GROWTH) = 0;
+   }
+   /* The function call overhead on picochip is not very high. Let the
+      inliner know so its heuristics become more reasonable. */
+   PARAM_VALUE (PARAM_INLINE_CALL_COST) = 2;
 
   /* Turn off the elimination of unused types. The elaborator
      generates various interesting types to represent constants,