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]

Re: Inlining heuristics for C++


On Tue, Jul 10, 2001 at 12:25:58AM -0400, Daniel Berlin wrote:
> > I agree.  But based on the fact that it is unlikely that a constructor
> > that calls two large functions is within a loop to begin with.  Fortunately
> > here you talk about "a large function", instead of "a function large compared
> > to the constructor size".  That is a difference that matter and that should
> > be reflected in the patch.
> I don't understand, please paint me a picture if i don't get it in the
> morning. I'm slow at midnight.
> :)

It's 6:38 am here :p.

Anyway - perhaps I did let myself go too much.  Having an "analysis-IQ" of 180 is great
for seeing errors in other peoples logic and I've successfully pissed of people
numerous of times by constantly (and only) break down what they come up with by
pointing out errors.  However, this is not important, it is just a minor difference
in looking at things :/.  I appologize to everyone on the list.

> > patch does but 1) look at the absolute size of the to-inline function,
> > 2) inline like we inline now when any parameter passed is a
> >    constant?
> 
> Sure, i'm happy to do this, once i understand #1.
> #2 is easy.
> 
> We also inline when it says inline, so that's, once again, always a
> fall back if the heuristic is too stupid.
> 
> Right now we inline *way* too much. I'd rather have people have to add
> inline.
> 
> Theres no way to say "noinline"
> :)

Before going to bed, allow me to summarize what IS important, I think:
I basically agree with everything you said, and I don't have a big problem
with the patch.  It certainly is better than what we have now and I'd like
to thank you for writing this (I mean that).  I am reassured too, that
functions marked as inline still WILL be inlined.  If you add point 2)
above I will be honoured more than satisfied ;).  I'll try to explain
point 1) tomorrow without wanting to make a big point out of it: I have
the feeling that in practise there won't be much difference in the result
anyway - its just that in my mind it's a-logical, and that itched.

Night,

-- 
Carlo Wood <carlo@alinoe.com>


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