Re: [cc65] optimizer?

Date view Thread view Subject view

From: Mike McCarty (
Date: 2001-06-25 20:31:04

On Mon, 25 Jun 2001, Andre Majorel wrote:

> On 2001-06-25 08:34 +0200, Ullrich von Bassewitz wrote:
> > On Mon, Jun 25, 2001 at 12:20:54AM +0200, Andre Majorel wrote:
> > > Just a side note: one of the improvements in GCC 3.0 was, they
> > > say, to move the inlining stage before the optimization stage to
> > > make it possible to optimize across inlined function calls.
> > 
> > It is correct to do so. On the other side, the linker is able to see more of
> > the final program than the optimizer when run over one module. So the linker
> > would be able to inline things, that the compiler cannot inline, because it
> > does not see the code for the inlined function.
> I believe they're talking about inlining of user-defined
> functions.  Those functions cannot be inlined by the linker.
> They're defined in a .h, not a .c.

I find this statement confusing. The compiler/linker make no
distinctions between source files' names, extensions, or locations. All
they care about is compilation units.

> GCC also has built-ins for certain common functions like
> memset() and memcpy(). In this case as well, I believe the
> inlining is done in the compiler, not in the linker.

char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I don't speak for Alcatel      <- They make me say that.

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:40 CET