On Thu, 28 Nov 2024, Jakub Jelinek wrote:

> On Thu, Nov 28, 2024 at 01:03:01PM +0100, Richard Biener wrote:
> > > I think auto_inline and inline would be just confusing, even in the 
> > > negative
> > > forms.  We actually "auto-inline" even functions not declared inline, just
> > > with different heuristics.
> > 
> > But inline __attribute__((feeble_inline)) is exactly 'auto-inline', no?
> 
> No.  inline is that 'auto-inline' (with the meaning, do what IPA does with
> DECL_DECLARED_INLINE_P right now, use it as a hint to inline stuff, higher
> limits and the like).
> inline __attribute__((feeble_inline)) is that 'default', i.e. for IPA
> purposes handle it as if it wasn't explicitly inline.  Except that the FE
> do what they should do with any inline, e.g. make it comdat, for constexpr
> constexpr, handle static variables in those specially, ...

OK, then it's just notational difference.  auto-inline to me is
applied to everything _not_ declared inline while 'inline' has
alternate cost metrics.  Aka "auto-inline" makes GCC add "inline".

Oh, there's -finline-functions which is enabling this "auto-inline",
keyed on whether a function is declared inline.  Does feeble_inline
also "undo" 'inline' to the level requiring -finline-functions to
consider a function as inline candidate?  (I know it's not _that_
simple, given -finline-functions-called-once considers not
inline declared functions as well, likewise
-finline-small-functions, cf. --param early-inlining-insns).

Richard.

>       Jakub
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to