[PATCH GCC]Fix checking on MAX_PENDING_LIST_LENGTH

Bin Cheng bin.cheng@arm.com
Mon Nov 10 09:41:00 GMT 2014


Hi,
There is parameter max-pending-list-length in gcc scheduler, but the
parameter is checked using greater than condition.  As a result, the real
max pending list length is actually "max-pending-list-length + 1".  This
patch fixes this by using ">=" rather than ">" comparison operator.  Though
it is kind of nit-picking, I want to change this: a) it breaks sched-fusion
because the 33rd couldn't be paired; b) when sched-fusion tries to sort many
consecutive stores, it breaks dcache line alignment at large probability.  I
mean without cache sensitive optimizer, GCC breaks dcache line alignment
randomly, but 33 is definitely worse than 32.  Of course, this only happens
in very restricted case.

Bootstrap and test on x86_64.  Is it OK?

2014-11-10  Bin Cheng  <bin.cheng@arm.com>

	* sched-deps.c (sched_analyze_1): Check pending list if it is not
	less than MAX_PENDING_LIST_LENGTH.
	(sched_analyze_2, sched_analyze_insn, deps_analyze_insn): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: max-pending-list-length.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141110/e0717ed6/attachment.txt>


More information about the Gcc-patches mailing list