This is the mail archive of the gcc-patches@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: Out-of-order inlining and --param values


> Jan Hubicka wrote:
> 
> >I made similar patch, but that also construct callgraph and inlines the
> >static function called once.  I will try to polish it and push out.
> >
> Great!

The patch is in bit ugly shape as it was just a experiment, but cleaning
it up should not take too much effort. I wanted to take a look first
whether someone did the same, perhasp on AST branch first.
> 
> >I
> >made  SPEC benchmarking only with only with the equivalent of RIchard's
> >patch and it brought about 3 SPEC points speedup.
> >
> Very nice!
I hope to get more with the callgraph info.  Also my patch had bug so it
output even the out-of-line copies of inline functions that caused code
to grow up.
Some of SPEC tests, like vpr, are writen so they are all out-of-order.
This is not so incommon case (parts of GCC are done same way0 and for
such programs, this is really important.
> 
> > It brings some
> >slowdown to compilation time due to larger memory overhead so I think it
> >should be enabled by separate switch.
> >
> I see. In principle, however, I see no obvious reason why in-order and
> out-order should be dealt with in different ways... do you?

Only what I am concerned about is that to do out-of-order inlining you
need to delay compilation of all functions. THat means that gcc will
first parse everything, keep it in memory and then spit it out that
requires more memory than the current mode.  This can become bit serious
for us given the fact that garbage collector has to go trought all of
the dead tree data structures each time.  With generation this would be
much cheaper.

I think this is good enought purpose for switch (I cann it
-funit-at-time for a moment).  I think it can be on by default at
-O2 or -O3 or we can invent -O4 for it.  I would be ahppy with any
solution.

> What does Intel do?
They have -ip to enable out-of-order inlining + some other
intraprocedural stuff in single module.  I think it is on with -O2 or
-O3.

Honza
> 
> Perhaps we could test Richard's patch with the inlining parameters tuned
> by default to smaller values... 1-2 SPEC speedups /without/ the slowdown in
> compilation time ?!?
> 
> Ciao, Paolo.
> 
> 
> 


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