This is the mail archive of the gcc-patches@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: [rtlopt] speed improvement of branch prediction


> Speed up the use of real.c instead.  See attached patch.
> It gets rid of most divisions in branch prediction.
> 
> > real.c already does not do operations bit by bit
> > but by groups of bits (size of unsigned long)
> > so I do not know how to speed it up.
> 
> It does do division bit by bit. 

Yes, division is done bit by bit, but (at least some) other operations
are on groups.

> This patch achieves a speedup of GCC by a few percent on compiling
> combine.c; any suggestions for better compile-time benchmarks gladly
> accepted.

This patch is a good idea. I have bootstrapped it on i386 (athlon),
I'm regtesting it now.

Josef

> 2003-01-08  Segher Boessenkool  <segher@koffie.nl>
> 
> 	* predict.c (real_inv_br_prob_base): New variable.
> 	(propagate_freq): Use multiply by reciprocal instead of
> 	division.  Don't divide by 1.0 at all.
> 	(estimate_bb_frequencies): Similar.


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