This is the mail archive of the gcc@gcc.gnu.org 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: scheduling question


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.

Did anybody experience similar problem?

From what you described it's not clear what the problem is. When scheduler infers that an instruction cannot be scheduled in the next N cycles (due to DFA hazard or insn_cost/dep_cost hook considerations or due to something else) the scheduler queues the instruction on (N+1) cycle.


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.

Yes, that would be correct from code correctness point of view, but state_transition() *will* make the scheduler requeue the instruction on the next cycle, so you will just loose in compile time.


It seams to me that moving from the ready to queue list with cost >=1 is an optimization for compilation time.

Correct, scheduler would be working unnecessarily long otherwise.


--
Maxim


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