[patch] function inlining when optimize for size (PR11830)

Gábor Lóki loki@inf.u-szeged.hu
Fri Mar 19 08:14:00 GMT 2004


>>I have examined if it is possible to use the function inlining when
>>optimizing for size. I've found we can use it without any risk because
>>when the max-inline-insns-* parameters were set with a small value
>>the function inlining doesn't inline large functions.
>>
>>I measuerd the size effect on CSiBE and this patch made about 1% code
>>size save (arm:1.212%, i386:1.024%, i686:1.029%, m68k:0.795%,
>>mips:1.096%, ppc:1.106%).
> 
> This looks very nice.  Do you have any numbers for single/auto limits
> set to 10?  That would allow inlining the functions that have exactly
> one function call in them possibly elliminating the need for wrapper,
> but not sure if it would pay back.

Yes, I have some numbers (code size save):

Single/Auto/RTL, arm-elf, i686-linux, ppc-elf
  0/ 0/ 0, 1.194%, 1.027%, 1.092%
  5/ 5/10, 1.212%, 1.029%, 1.106%
10/10/20, 1.054%, 0.921%, 0.964%

There is a significant difference between 5/5/10 and 10/10/20
combinations. I think when we optimizing for size the best combination
is the 5/5/10 for single/auto/rtl limits, am I correct?

Regards,
   GĂĄbor LĂłki





More information about the Gcc-patches mailing list