[PATCH, TARGET]AVR Reduce default PARAM_INLINE_CALL_COST

View: New views
2 Messages — Rating Filter:   Alert me  

[PATCH, TARGET]AVR Reduce default PARAM_INLINE_CALL_COST

by Andy H-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

attached patch changes PARAM_INLINE_CALL_COST for AVR target  to 5
instead of gcc default of 12. . This reduces code size regression due
too aggressive inlining.

Tested on 4.4 HEAD with no regressions

Ok for 4.4 HEAD?



2008-07-22  Andy Hutchinson  <hutchinsonandy@...>

   * config/avr/avr.c (avr_override_options): Reduce value of
PARAM_INLINE_CALL_COST.



Index: gcc/config/avr/avr.c
===================================================================
--- gcc/config/avr/avr.c (revision 138071)
+++ gcc/config/avr/avr.c (working copy)
@@ -43,6 +43,7 @@
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
+#include "params.h"
 #include "df.h"
 
 /* Maximal allowed offset for an address in the LD command */
@@ -348,6 +349,9 @@
 
   flag_delete_null_pointer_checks = 0;
 
+  if (!PARAM_SET_P (PARAM_INLINE_CALL_COST))
+    set_param_value ("inline-call-cost", 5);
+
   for (t = avr_mcu_types; t->name; t++)
     if (strcmp (t->name, avr_mcu_name) == 0)
       break;

Re: [PATCH, TARGET]AVR Reduce default PARAM_INLINE_CALL_COST

by Anatoly Sokolov-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.
 
> 2008-07-22  Andy Hutchinson  <hutchinsonandy@...>
>
>   * config/avr/avr.c (avr_override_options): Reduce value of
> PARAM_INLINE_CALL_COST.
>

This is OK, Thanks.

Anatoliy.
LightInTheBox - Buy quality products at wholesale price