This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cgraph based inlining heuristics
> On Wed, 2 Jul 2003, Jan Hubicka wrote:
>
> > > Ok, here they go. I tested four different setups:
> > >
> > > (0) gcc3.4
> > > (1) gcc3.4 with __attribute__((leafify)) patch
> > > (2) gcc3.4 with your patch
> > > (3) gcc3.4 with your patch and -funit-at-a-time
> > > (4) gcc3.4 with your patch and -funit-at-a-time --param max-inline-insns-auto=200 --param max-inline-insns-single=200 --param inline-unit-growth=1000 --param large-function-growth=1000
> > >
> > > flags otherwise used are
> > > -O2 -g -march=athlon -fno-math-errno -fno-trapping-math -ffinite-math-only
> > > -funroll-loops
> > >
> > > (0) (1) (2) (3) (4)
> > > binary size 10166017 10681144 8405237 8405237 9874056
> > > compile time 2m57.503s 3m40.638s 1m19.553s 1m20.742s 2m55.031s
> > > runtime performance 3.97s 1.66s 2.65s 2.64s 1.74s
> > >
> > > timings are seconds per iteration. The new heuristics are a huge
> > > improvement, both in compile and runtime! I suspect from the numbers,
> > > that -funit-at-a-time is enabled at -O2 already? Also we probably get
> >
> > I do it in my tree, so I more likely hit the bugs during bootstraps, but
> > it is not the case in the mainline. I would like to see it enabled at
> > -O2 in the future assuming that it makes average compilation faster.
>
> So it was enabled in the patch you sent? I doubt it would make zero effect
> on both binary size and compile time else, see numbers for (2) and (3).
Yes, in the patch I sent you, unlike in the combination I sent for
approval, the unit-at-a-time is default at -O2, so you need to
-fno-unit-at-a-time to get old inlining heuristics (but still with new
code size counting)
>
> Also I rarely use -O3 as it usually makes compilation and code slower.
Well, you may try it out now, perhaps it will work better :)
Honza
>
> Richard.
>