This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC/patch] Callgraph based inlining heuristics
- From: Jan Hubicka <jh at suse dot cz>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>,Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org
- Date: Mon, 23 Jun 2003 18:04:23 +0200
- Subject: Re: [RFC/patch] Callgraph based inlining heuristics
- References: <Pine.LNX.4.44.0306231731040.582-100000@goofy> <3EF7231D.9090508@student.tudelft.nl>
> >and possibly tree-optimize the to-be inlined function (with its current
> >parameters) before applying any heuristics. Of course this will be
> >
> In fact, the weird thing about unit-at-a-time is that it changes the
> current behavior of tree-ssa in a peculiar way. With -finline-functions
> when not in unit-at-a-time mode, each function is first tree-optimized
> and then deferred and later inlined. With unit-at-a-time, the functions
> are first deferred, then inlined, and tree-optimizing them is the final
> step. So _without_ unit-at-a-time, we inline optimized function bodies,
> but _with_ unit-at-a-time we do not!
Why not hook tree-SSA work into the unit-at-a-time driver? The code is
supposed to drive how the compilation works and when the code is
optimized.
Early tree-ssa optimization is supposed to happen at the same time
frontend hook lower_function is called (lower_function is called so
because I had gimplifying in the mind) and the late optimization after
inlining is done is supposed to happen inside cgraph_optimize_function.
I can try to send the patch for this once I am done with the other work
that is currently making me so busy.
>
> Ideally we would tree-optimize first (allowing better estimates of the
> function size) and then defer for unit-at-a-time, but there were some
> issues with C++, GIMPLE and unit-at-a-time which I didn't quite
> understand but which seemed to be the reason why C++ unit-at-a-time took
> so long to implement. Again, Honza? ;-)
Hmm, the reason why it took so long to implement is that C++ is funny
language and I had very little understanding of the frontend when I
started :(
With the current tree-ssa branch you don't have unit-at-a-time C++ at
all, so you can't do it, but still you can do it for C.
Honza
>
> >expensive. But at -O4 I'll pay this price if the result is good.
> >
>
> Yup.
>
> Gr.
> Steven
>
>
>