Re: [cc65] optimizer?

Date view Thread view Subject view

From: Andre Majorel (amajorel_at_teaser.fr)
Date: 2001-06-25 20:52:47


On 2001-06-25 13:31 -0500, Mike McCarty wrote:
> 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.

Functions whose definition has the inline qualifier do not cause
the generation of any object code (unless they're invoked of
course :-)). That's why they're often defined in a .h instead of
a .c.

cc65 obviously does it differently.

-- 
André Majorel
Work: <amajorel_at_arkeia.com>
Home: <amajorel_at_teaser.fr> http://www.teaser.fr/~amajorel/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de 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