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: gcc compile-time performance


> On Sat, May 18, 2002 at 03:11:49AM -0300, Alexandre Oliva wrote:
> > On May 17, 2002, "Chip Cuntz" <chip.cuntz@earthling.net> wrote:
> > 
> > >> It's also interesting to note how the compiler tree keeps taking
> > >> longer to compile.
> > 
> > > On the dog of an AIX box I have it takes two days to bootstrap gcc!
> > 
> > Well, mine takes about the whole week to bootstrap and test it.
> > 
> > 
> > I wonder how much of a performance win we'd observe by replacing every
> > occurrence of:
> > 
> >   if (some_condition)
> >     abort ();
> > 
> > with
> > 
> >   if (flag_internal_checks && some_condition)
> >     abort ();
> > 
> > 
> > I've certainly contributed myself to slow downs in the compiler, by
> > introducing sanity checks in a number of functions called quite often.
> 
> Or how much of a win we could get from using __builtin_expect in sanity
> checks... do we actually assume checks leading to a noreturn function
> call are unlikely, yet, or is that only on the CFG branch?

This is already done on the mainline.  However this idea does not work
perfectly for complicated expression that contains multiple branches.

Honza
> 
> -- 
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer


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