avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Upgraded and re-compiled a current project and a func


From: Anatoly Sokolov
Subject: Re: [avr-gcc-list] Upgraded and re-compiled a current project and a function was converted to in-line and a function.
Date: Sun, 20 Apr 2008 20:07:31 +0400

Hi.


>I just installed WinAvr-20080411 and re-compiled a recent project (lab4a).
> I was surprised that the code increased by almost 400 bytes (lab4b).
> 
> Looking into the reason I see that the compiler generated my EEPROM_read 
> function and then started generating the function in-line in all of the 
> places I called it.
> 
> Any reason for this?

Use '--param inline-call-cost=2' the GCC switch.

Without 'inline-call-cost':
$ avr-size main.elf
   text    data     bss     dec     hex filename
   1756     260     134    2150     866 main.elf

With  'inline-call-cost':
$ avr-size main.elf
   text    data     bss     dec     hex filename
   1370     260     134    1764     6e4 main.elf

Anatoly.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]