Hi,
According to me at this moment the scheduler does not support your needs.

I was confronted with a similar problem as yours and I solved it by 
implementing the TARGET_SCHED_DFA_NEW_CYCLE hook. Inside of the function which 
supports this hook I choose/set the insn reservation that makes  possible to 
fit as many other insn as possible in the same cycle.

During this process I also update the ready list with insns that become ready 
as a result of scheduling the current insn ( like in your example -insns that 
are anti-dependent on the current insn and which therefore can be scheduled in 
the current cycle). Thus the best insn reservation makes possible scheduling 
antidependent insns of cost zero in the same cycle by avoiding resource 
conflicts. 

Alex


few changes in the gcc mainline sources

--- On Fri, 2/11/11, Bernd Schmidt <ber...@codesourcery.com> wrote:

> From: Bernd Schmidt <ber...@codesourcery.com>
> Subject: Scheduling automaton question
> To: "GCC List" <gcc@gcc.gnu.org>
> Cc: "Vladimir N. Makarov" <vmaka...@redhat.com>
> Date: Friday, February 11, 2011, 2:33 PM
> Suppose I have two insns, one
> reserving (A|B|C), and the other reserving
> A. I'm observing that when the first one is scheduled in an
> otherwise
> empty state, it reserves the A unit and blocks the second
> one from being
> scheduled in the same cycle. This is a problem when there's
> an
> anti-dependence of cost 0 between the two instructions.
> 
> Vlad - two questions. Is this behaviour what you would
> expect to happen,
> and how much work do you think would be involved to fix it
> (i.e. make
> the first one transition to a state where we can still
> reserve any two
> out of the three units)?
> 
> 
> Bernd
> 


      

Reply via email to