mainline "exploding"
Jan Hubicka
jh@suse.cz
Wed Oct 15 12:52:00 GMT 2003
> On Tue, 14 Oct 2003, Jan Hubicka wrote:
> >
> > > 2) go ahead and enable unit-at-a-time by default for C++ at all levels
>
> On Tue, Oct 14, 2003 at 02:28:53PM +0200, Michael Matz wrote:
> > IMHO, if possible we should go this way. Maybe combined with lower limits
> > at -O1. In the long run I see no sense in having two inlining heuristics.
>
> Certainly if we have two inlining algorithms we have to keep maintaining,
> tuning, and bug-fixing two inlining algorithms. Making the poorer one go
> away seems advisable. I might have been confused, but the main argument
> I heard against using unit-at-a-time all the time was memory, so if we
> actually need more memory to use the old algorithm in many cases, that kills
> that.
Memory footprint does not appear to be catastrophical. Even with
inlining disabled, for many copilation units, such as combine.c the
peak is actually lower with -funit-at-a-time than without.
It is however possible to construct artifical testcases that do behave
worse in unit-at-a-time of course.
Worst realistic testcase I have is GCC itself compiled with
--enable-intermodule and -O2. Then we need about 700MB of memory. This is
quite a lot compared to 100MB source but should be solvable by improving
IL and making the memory management more curefull (I have some patches
for this reducing overhead to about 600MB for start).
When compiled with -O3 the situation is other way around.
unit-at-a-time peaks 700MB again, while non-unit-at-a-time explodes to
1GB.
Problem however is compatibility. Some code uses top level asm
statements that depends on their placement, other reffers to
functions/variables in hidden ways, so I think we need at least one
version of GCC to provide both modes.
My last patch to obsolette old inlining heuristics replaces it by
roughly two pages of code with no special parameters in it (all decisions
are handled by code common to unit-at-a-time one), so I would say that
it can be seen just as two versions of the same heuristics (one
incremental, one not). It has same memory behaviour too, just the
decisions are somewhat inferrior from global point of view.
(the heuristics works best when the decisions are queried in the order
of decreasing effectivity that is not the case for incremental version
of the algorithm)
Honza
>
>
More information about the Gcc
mailing list