[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13 |
Date: |
Mon, 16 Feb 2009 17:51:16 -0700 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of David Brown
> Sent: Monday, February 16, 2009 5:07 PM
> To: address@hidden
> Subject: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13
>
> Weddington, Eric wrote:
> >
> >
> >> -----Original Message----- From:
> >> address@hidden
> >> [mailto:address@hidden org]
> >> On Behalf Of David Brown Sent: Monday, February 16, 2009 2:31 PM
> >> To: address@hidden Subject: [avr-gcc-list] Re: Code
> >> optimistaion in AVR Tiny13
> >>
> >> Another important point in getting code as small as possible is to
> >> use -combine and -fwhole-program - it can significantly improve
> >> code, especially for functions that are called only once but live
> >> in different modules.
> >
> > In my tests on real world programs, it have decreased the code by up
> > to 25%. And it has also *increased* the code by up to 25%!
> > Unfortunately I don't know what about the code that causes it to
> > increase. But clearly it is not always a win and can be a detriment.
> > So be sure to check your code sizes when you use this.
>
> If these flags *increase* code size, there's a bug somewhere - or at
> least some badly tuned parameters (such as -finline-limit, or
> something
> similar). They give the compiler increased knowledge and more
> opportunity to combine code and do inter-procedural
> optimisations across
> compilation units. I've only used it myself on a couple of programs
> (boot programs, which are particularly space-concious), and it helped
> significantly.
Oh, I definitely agree that it could help significantly. The problem, again,
has to do with maintenance. I spoke with one of the guys who works on gcc (for
Google) and it seems that no one is really maintaining -fwhole-program. Most
targets on gcc optimize for speed, not size. So there's no one to go to with
problems with this switch. It's one of those: if we want it fixed, we have to
do it ourselves because no one else is working on it. :-/
- Re: [avr-gcc-list] Code optimistaion in AVR Tiny13, (continued)
- Re: [avr-gcc-list] Code optimistaion in AVR Tiny13, Ruud Vlaming, 2009/02/16
- Re: [avr-gcc-list] Code optimistaion in AVR Tiny13, Anatoly Sokolov, 2009/02/16
- [avr-gcc-list] RE: inline control, larry barello, 2009/02/16
- [avr-gcc-list] Re: inline control, David Brown, 2009/02/16
- RE: [avr-gcc-list] Re: inline control, Weddington, Eric, 2009/02/16
- [avr-gcc-list] Re: inline control, David Brown, 2009/02/16
- RE: [avr-gcc-list] Re: inline control, Weddington, Eric, 2009/02/16
[avr-gcc-list] Re: Code optimistaion in AVR Tiny13, David Brown, 2009/02/16
- RE: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13, Weddington, Eric, 2009/02/16
- [avr-gcc-list] Re: Code optimistaion in AVR Tiny13, David Brown, 2009/02/16
- RE: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13,
Weddington, Eric <=
- [avr-gcc-list] Re: Code optimistaion in AVR Tiny13, David Brown, 2009/02/17
- RE: [avr-gcc-list] Re: Code optimistaion in AVR Tiny13, Weddington, Eric, 2009/02/17