This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.3 release criteria


On Tue, 25 Feb 2003, Matt Austern wrote:

> On Tuesday, February 25, 2003, at 12:51  PM, Michael Hayes wrote:
> 
> > tm_gccmail at mail dot kloo dot net writes:
> >
> >> My feelings exactly...for embedded programming and kernel work, you 
> >> need
> >> an inline keyword that consistently inlines, regardless of the 
> >> setting of
> >> the compiler switches or whatever.
> >
> > I endorse this for small-scale embedded apps where you want the
> > convenience of a function call abstraction but not the expense of a
> > call instruction---some micros only have an 8 level call stack!
> >
> > For general programming, I'm happy to defer to the wisdom of the
> > compiler.
> 
> This sounds like an argument in favor of a switch like Apple's
> -fobey-inline.  Programmers who are writing specialized code
> and who need detailed control of low-level optimizations will
> use that switch, others won't.
> 
> Again, I should remind people: Apple tried the experiment of
> making -fobey-inline the default.  The results were not good.
> This sort of low-level control is sometimes useful, but it's
> not useful as often as a lot of people think it is.  If we
> do make -fobey-inline available (which I think we should),
> then I encourage everyone to compile their code with and
> without it, and look at the effect on code size, before adding
> it to their makefiles.
> 
> 			--Matt

I think the "always_inline" attribute is enough, as long as it does
actually always inline regardless of the options.

It would be nice to have:

"maybe_inline" as a compiler hinting mechanism
"never_inline" to force the compiler not to inline
                   (for debugging purpose and whatnot) 

Toshi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]