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

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

RE: [avr-gcc-list] Question about code size


From: Eric Weddington
Subject: RE: [avr-gcc-list] Question about code size
Date: Fri, 16 Mar 2007 07:00:17 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Dave Hylands
> Sent: Friday, March 16, 2007 2:00 AM
> To: Erik Christiansen
> Cc: AVR-GCC-list
> Subject: Re: [avr-gcc-list] Question about code size
> 
> hi Erik.
> 
> > Does -fno-default-inline do any good?
> 
> I get the following warning:
> cc1: warning: command line option "-fno-default-inline" is valid for
> C++/ObjC++ but not for C
> 
> > > It seems to be inlining the putch function which is 
> called many times,
> > > and the inlined version is quite a bit bigger than calling the
> > > function.
> >
> > If the above doesn't do it, how about:
> >
> > #define NOINLINE __attribute__ ((__noinline__))
> >
> > on the functions that shouldn't be inlined?
> > (OK, that could be laborious if there are a lot of them. :-)
> 
> That seems to work. If I put it front of every function, then I get
> the size down to 890 bytes (it was 1366 bytes before this).
> 
> The 3.4.5 compiler generated 848 bytes.

Can you determine where that difference is? Like you did with the inlined
code.

Eric





reply via email to

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