|
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@hiddenorg] 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.01) -no-inline-small-function - 69034 2) --param inline-call-cost=2 - 68964 3) -fno-inline - 68816 4) -finline-limit=10 - 688105) #2 & #4 - 68754 6)-finline-limit=3 -68754 (same results for 1,2 and 3)I found that it depends on your source codesTo get better code size, you have to try different switchescombinations. 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
[Prev in Thread] | Current Thread | [Next in Thread] |