Alex Turjan wrote:
Hi,
During scheduling Im confronted with the fact that an instruction is moved
from the ready list to queued with the cost 2, while according to my
expectations the insn should have been moved to queued with cost 1.

High, Alex. I could look at this, if you have a test and the problem can be reproducable (it is not a new target).
Did anybody experience similar problem?
In case an insn is ready but can bot be schedled in the current
cycle, is it correct (i.e. the generated code is correct) to move the insn
to the queue list with cost 1 ?; no matter what it the value >=1
returned by state_transition.

No, it is not correct. With the point of resource hazard, it is ok because the scheduler checks possibility of insn issuing at given state in any way. But it is wrong with the point of the data delay hazard because the scheduler does not check that time when all data for insn (INSN_TICK) are ready at given time (INSN_TICK () <= clock_var). If you add checking this in schedule_block and update clock_var until the insn is ready plus sort insn according to their INSN_TICK as the first priority, you can put all insns into the queue list with cost 1.
It seams to me that moving from the ready to queue list with cost >=1 is an optimization for compilation time.
Not only, please see my comment above.


Reply via email to