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: Schwichtenberg, Knut
Subject: RE: [avr-gcc-list] regression in size from 4.2.2 to 4.5.0
Date: Thu, 7 May 2009 13:49:25 +0200

 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: 
> address@hidden
> g 
> [mailto:address@hidden
ongnu.org] On Behalf Of Sean D'Epagnier
> Sent: Thursday, May 07, 2009 8:21 AM
> To: Weddington, Eric
> Cc: address@hidden
> 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 <address@hidden> wrote:
> >
> >
> >> -----Original Message-----
> >> From:
> >> address@hidden
> >> [mailto:address@hidden
> >> org] On Behalf Of Sean D'Epagnier
> >> Sent: Wednesday, May 06, 2009 12:45 PM
> >> To: address@hidden
> >> 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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> 



reply via email to

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