The increase in size was also subject for other gcc versions. Often the following gcc comand-line swichtes were proposed:
-fno-inline-small-function -fno-split-wide-types -fno-move-loop-invariants ------------------------------------- Additionally Larry Barello provided the following measurement on 16-Feb-09: I explicitly inline code with the following attribute #define _INLINE_ static inline __attribute__((always_inline)) For my medium size project (lots of menus/graphics/various sensors and serial port devices) 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) Since I am generally not too concerned about overall speed I prefer small size and explicit _INLINE_ where I deem appropriate... Usually the speed I am worried about is how long it takes to download another version while debugging :) Anyway, thanks for the pointers and I am glad I spent 20 minutes trying them out! ------------------------- Cheers Knut > -----Original Message----- > From: > avr-gcc-list-bounces+knut.schwichtenberg=siemens....@nongnu.or > g > [mailto:avr-gcc-list-bounces+knut.schwichtenberg=siemens....@n ongnu.org] On Behalf Of Sean D'Epagnier > Sent: Thursday, May 07, 2009 8:21 AM > To: Weddington, Eric > Cc: avr-gcc-list@nongnu.org > Subject: Re: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0 > > Thanks for all the input. > > I will do some more investigating myself and hopefully produce a small > test case as well as try to track down the actual commits to gcc which > caused it. Unfortunately I suspect there are multiple causes to > blame. I will post back when I have more information. I thought > someone might have a guess or know right away what might have caused > this. > > Thanks, > Sean > > On 5/6/09, Weddington, Eric <eric.wedding...@atmel.com> wrote: > > > > > >> -----Original Message----- > >> From: > >> avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org > >> [mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu. > >> org] On Behalf Of Sean D'Epagnier > >> Sent: Wednesday, May 06, 2009 12:45 PM > >> To: avr-gcc-list@nongnu.org > >> Subject: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0 > >> > >> Hi, > >> > >> I was trying to reduce the size of my binary so it would > fit on some > >> 128kb parts. I normally used gcc 4.2.2 for this project, > but decided > >> to try gcc 4.5.0. To my surprise, the resulting binary was 3.5kb > >> _larger_ with the newer gcc. This is a serious bug imho > and should be > >> fixed. I'm not quite sure why it did occur, but I have > some guesses. > >> I have here the old (4.2.2 gcc) then the new (4.5.0 gcc) > disassembly: > > > > The first step is to fill out a bug report at the GCC > project. Let me know > > the bug number so I can track it. > > > > Next, it needs to be determined which version caused the > biggest problem. > > 4.2.x? 4.3.x? 4.4.0? Or HEAD/4.5? It could just get > progressively worse with > > each version, or perhaps there is some big jump in code size. > > > > > _______________________________________________ > AVR-GCC-list mailing list > AVR-GCC-list@nongnu.org > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list > _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list