[PATCH] Fix inaccurate estimation of probabilities in the scheduler

Andrey Belevantsev abel@ispras.ru
Mon Jul 4 14:45:00 GMT 2005


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?

Thanks, Andrey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prob_20050704.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050704/5a076a62/attachment.ksh>

More information about the Gcc-patches mailing list