On 11/06/2012 05:50 PM, Paulo Matos wrote:

> I am following your advice and using sched.reorg to remove the
> instruction from the ready list. What I am doing is checking the
> register written in ready[n_ready - 1] (if any) and look for the
> remainder of the ready list for insns writing to the same register.

That probably won't work, you'll need to keep track of which registers
have already been written in the current cycle - that needs to be
updated in the variable_issue hook.

> If I find one such insn, in index k, then I remove the insn by
> moving
all insns from 0 -> k-1 to 1-> k (essentially shifting right all
instructions below k.

If you also put it back into the position in the array that has become
free, that sounds about right.

> However this is getting me into trouble with an ice. I feel like I
should instead be moving the instruction from ready to pending instead
of simply removing it from ready, however I have no access to
Haifa-sched.c internals from the backend.

Well, if you're doing it right, you're not really removing the
instructions, just reordering the array and returning a different value
for n_ready. Look at c6x.c for some example code.


Bernd

Reply via email to