R. Clayton (rclayton@monmouth.edu)
(no date)
If the input program is
mov r1 12
mov r2 13
mov r1 15
A hyperthread schedule could combine the first two instructions and follow it
with the third instruction; this schedule overwrites r1. In this case, should
the third instruction be scheduled immediately or held back for later
scheduling?
Your program's output schedule should produce the same results in main store
as would be produced by the input programs if each were run separately
(because the two programs don't communicate, each produces the same results
when run in either order).
Under that constraint, your example program could result in either of the
schedules
move r1 12 ; move r2 13
move r1 15
or
move r1 12
move r1 15 ; move r2 13
However, the output schedule is also subject to the constraint that it be
the shortest possible schedule, in which case neither of the above two
schedules is correct because the schedule
move r1 15 ; move r2 13
also produces the same results as the original program and is one instruction
smaller than either of the previous examples.
However however, because the initial and final values of the registers are
not relevant in determining a schedule's effects, and because the example
program manipulates only registers, the truly optimal schedule is
that is, no schedule at all.
This archive was generated by hypermail 2.0b3 on Mon May 03 2004 - 17:00:06 EDT