This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix inaccurate estimation of probabilities in the scheduler
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Andrey Belevantsev <abel at ispras dot ru>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, James E Wilson <wilson at specifixinc dot com>
- Date: Mon, 04 Jul 2005 12:29:01 -0400
- Subject: Re: [PATCH] Fix inaccurate estimation of probabilities in the scheduler
- References: <42C94ABF.9030500@ispras.ru>
Andrey Belevantsev wrote:
Hello,
This patch fixes inaccurate calculation of basic block execution
probabilities in the scheduler. The old code assumed the probability
of leaving a loop as 10%, and distributed the rest evenly among all
other outgoing edges. The patch fixes this by using frequency field of
basic block structure, either when branch guessing is working or
profile information is available.
The patch also introduces two parameters instead of hard-coded
scheduler values. These are maximal latency of the instruction, which
is to be considered for interblock code motion, and minimal relative
basic block probability. The default values are 3 and 40%, respectively.
The patch also sets these parameters to 2 and 20% for IA-64 platform.
These settings were chosen as the best one during SPEC testing done
back in March. That time, the change was practically neutral with
exception of bzip2, which had 2,7% speedup at -O2. I was going to redo
the tests with the mainline, but unfortunately, gcc and galgel do not
work on ia64 as of June 29 mainline. I can either submit these values
or redo the tests and send the new values as a followup.
Bootstrapped and regtested on i686-linux and ia64-linux. Bootstrap
times practically haven't changed.
OK for mainline?
Next time if you need an approval, please put RFA in the subject. As I
know you need a copyright assignment in order to commit your patch (and
probably futiure patches) into gcc. Please get it first. You can find
information how to do it on gcc mailing lists.
As for the patch. In general it is ok. Finaly, haifa scheduler will
use gcc infrastracture for the frequencies.
Although I have some minor remarks
o You missed changelog entry for your patch.
o I think it is better use word scheduler in "historic evaluation"
instead of historic.
o You should always put two blanks after the end of sentence (after the
period). It is requirement of Gnu coding standard.
o You don't need to put one statement in {}.
o Some comment lines are 80-char length. It is better to use maximum 79
characters on a line.
When you get the copyright assignment, please submit the patch again
(with changes I mentioned above) and I'll commit the patch into mainline
because, as I see, you have no write access to the repository.
And thanks for the patch.
Vlad