This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: haifa-sched: Fix problems with cc0 in prune_ready_list

On 04/11/2012 10:08 AM, Bernd Schmidt wrote:
On 02/10/2012 08:01 PM, Vladimir Makarov wrote:
On 02/08/2012 10:01 AM, Bernd Schmidt wrote:
We found a scheduler problem while testing Coldfire targets. The
prune_ready_list function I introduced doesn't take SCHED_GROUPs into
account, which can lead to a random insn being scheduled between a cc0
setter and user. The patch below fixes it, OK? (Bootstrapped&   tested

Ok. Thanks, Bernd.
It turns out that the previous fix was insufficient. If a cc0 user and
another insn are on the ready list, it can happen that the cc0 user is
delayed for longer than the other insn, and we will reenter
prune_ready_list with a new ready insn but with the cc0 user still
queued for later. In that case we'll do the wrong thing.
What a coincidence :) Yesterday I found the same bug on m68k on lra branch and just started to work on it.
The following patch reworks the function to take care of this problem.
Bootstrapped and tested on i686-linux, and also tested with a m68k
multilib on our internal compiler (4.6 based but with scheduler patches
from 4.7). Ok?
I assume this should also go into 4.7 eventually.

Yes. It is a serious bug for cc0 targets.

Thanks, Bernd.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]