[PATCH][PR28071]: Fix sched-deps.c to flush dependencies.

Maxim Kuvyrkov mkuvyrkov@ispras.ru
Fri Apr 13 11:19:00 GMT 2007


Hi!

This is a patch for a problem described in 
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00760.html .

The problem is in sched-deps.c: flush_pending_lists () which 
*unconditionally* sets pending_lists_length to zero but flushes 
pending_read_* lists *conditionally*.  Such scenario happens when 
flushing on processing of a pure call which doesn't require 
pending_read_* to be flushed.

Adding separate counters for read_mems and write_mems instead of one 
cumulative pending_list_length counter will solve the problem.

PR28071: As a result of this patch the dependency analyzer now creates 
480K of dependencies instead of 3.5M it was used to.  Thus making the 
scheduler use ~7 time less memory on the testcase.

The patch is obvious and fixes a long standing issue which, IMHO, are 
good reasons for considering it for 4.2/4.1 branches as well.

Ok for trunk/4.2/4.1 ?


Thanks,

Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mem-read-flush.clg
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070413/eca313ab/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mem-read-flush.patch
Type: text/x-patch
Size: 5187 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070413/eca313ab/attachment.bin>


More information about the Gcc-patches mailing list