This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Move loop header copying after profiling
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, stevenb at suse dot de, hubicka at ucw dot cz,pthaugen at us dot ibm dot com
- Date: Wed, 11 May 2005 22:55:22 +0200
- Subject: Re: [patch] Move loop header copying after profiling
- References: <20050510062556.GA16211@atrey.karlin.mff.cuni.cz> <20050511162137.GF7024@kam.mff.cuni.cz>
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