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]
Other format: [Raw text]

Re: Using FDO to speed up compiler?


> On Wed, Feb 12, 2003 at 10:17:10PM +0100, Jan Hubicka wrote:
> > The number reminds me not-so-related note.  I've also hacked makefiles
> > in the past to add profiling into the bootstrap.  I used "make check"
> > for train run and measured speedup in between 5-10% on compiling 
> > on compiling binutils on early rtlopt-branch tree.
> 
> Nice.
I will have to re-benchmark the numbers as many things has changed since
that , but hope it won't change in the negative direction :)
One of important factors was code placement, as we had extraordinally
large insn-attrtab that time.  With DFA this problem has changed a bit.
> 
> > Do we want such a machinery in mainline? Using FDO for compiler seems to
> > make sense, but it makes bootstrap much longer.  I set it up as
> > "profiledbootstrap" in makefile that would imply that for development we
> > will use different switches that for production that can cause problems
> > in future...
> > Also getting this right for crosscompilation may be dificult.
> 
> Cross-compilation doesn't bootstrap.  You just "make all" instead.
> 
> I think it would be interesting to have this in place.  Could be 
> useful for distributions packaging the compiler.  Pay the extra
> bootstrap time up front for a nice improvement to the users.

OK, my opinion too, but it has been never strong enought to get around
all the Makefile stuff.  Now it is :) At least if we want to push more
packages to use FDO (and I think number of them are obvious candidates),
we should do it ourselves at least.  My overall design has been
following:

stage1 - same as previous
profilestage
check
feedbackstage
feedbackstage2

the feedbackstage and feedbackstage2 should be comparable.  The first is
build by stage1 compiler, 

This has one extra problem that stage1 must be build with compiler
having 64bit type, so crossbootstrapping from non-GCC compiler may
break.  This is fixable by adding enabling stage2 and this is point
where my little Makefile mind goes crazy.

Does Makefile gurus have some hints how should I implement it nicely?

Also make check does not generate very good workload for the compiler
and does not train all the possible common switches.  But this is common
problem with the FDO.  I did simple test with using buitils build
instead of make check and the nubers didn't changed measurably so it
looks it should be pretty safe.

Honza
> 
> 
> r~


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