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: [patch] Move loop header copying after profiling


Hello,

> > this patch moves loop header copying pass after profile pass.  This
> > gives a better profile when we guess the branch probabilities.
> > Currently we guess 50/50 probabilities for the branch of the copied condition
> > that enters the loop, which is wrong, since the loop usually is entered.
> 
> The probability is actually roughtly about 60% as we got from the old
> loop header heuristic.

I find that number quite doubtful; at the very least, it is quite
dependent on the actual application -- for example in genattrtab
the probability should be 98.4%.

> Perhaps we can still use this number somehwere?

Yes, it would be possible, although somewhat complicated (using the
probabilities derived from the expected number of iterations of the loop
is much more natural).

Zdenek


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