This is the mail archive of the
mailing list for the GCC project.
Re: scheduling question
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: aturjan at yahoo dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 07 May 2009 14:06:16 -0400
- Subject: Re: scheduling question
- References: <email@example.com>
Alex Turjan wrote:
High, Alex. I could look at this, if you have a test and the problem
can be reproducable (it is not a new target).
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.
Did anybody experience similar problem? 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.
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.
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.