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

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

Re: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0


From: Rolf Ebert
Subject: Re: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0
Date: Sat, 09 May 2009 11:48:00 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Weddington, Eric schrieb:
-----Original Message-----
From: address@hidden [mailto:address@hidden
org] On Behalf Of Bob Paddock
Sent: Friday, May 08, 2009 6:55 PM
To: address@hidden
Subject: Re: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0

1) -no-inline-small-function    - 69034
2) --param inline-call-cost=2   - 68964
3) -fno-inline                  - 68816
4) -finline-limit=10            - 68810
5) #2 & #4 - 68754 6)
-finline-limit=3             -
68754 (same results for 1,2 and 3)
I found that it depends on your source codes
To get better code size, you have to try different switches
combinations.

Is there any way to apply the switches on a per source file basis?

Yes, it's called "using a Makefile". ;-)


You can, for example, define the CFLAGS depending on the target

foo.o: CFLAGS += -no-inline-small-functions
bar.o: CFLAGS += --param inline-call-cost=2 -finline-limit=10

and leave everything else as it is provided in the sample Makefile.

Beware that the above syntax might be a GNU extension and not be available elsewhere.

   Rolf





reply via email to

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