[PATCH] Fix PR 46521 and 46522 (remnants of PR45352)

Andrey Belevantsev abel@ispras.ru
Tue Dec 21 17:01:00 GMT 2010


Hello,

After the patch for PR45352 there were more test cases that revealed two 
more problems.  First, we need to propagate the "rescheduling" bits from 
the current block to the next block more carefully, also through the empty 
blocks.  Second, I thought that if we stall for more cycles that DFA tells 
us to, then the insn would be surely ready for issuing, but this is not the 
case, so I accounted for this in the function that resets scheduling cycles.

Both problems fixed by the below patch, I have checked it on all tests from 
PRs 45352, 46521, and 46522 with all option variants found by Zdenek.  The 
patch was bootstrapped and tested on x86-64 with selective scheduling 
enabled with -O2, and bootstrapped on ia64 again with selective scheduling 
enabled with -O2.  Ok for trunk and active branches if testing on ia64 passes?

Andrey


2010-12-21  Andrey Belevantsev  <abel@ispras.ru>

	PR rtl-optimization/45352
	PR rtl-optimization/46521
	PR rtl-optimization/46522
	* sel-sched.c (reset_sched_cycles_in_current_ebb): Recheck the DFA state
	on the last iteration of the advancing loop.
	(sel_sched_region_1): Propagate the rescheduling bit to the next block
	also for empty blocks.

	gcc.dg/pr46521.c: New.
	gcc.dg/pr46522.c: New.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr45352-2.diff
Type: text/x-patch
Size: 3654 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20101221/5c53a7fc/attachment.bin>


More information about the Gcc-patches mailing list