0
1 lw $t2, 8($t1)
2 lw $s0, 0($t2)
3 add $t3, $t2, $t1
4 add $s1, $s0, $t3

Am I correct in saying there are 3 dependences? 2 depends on 1, 3 depends on 1, and 4 depends on 3.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Cool Guy
  • 1
  • 1
  • 1
    The load of `$s0` in 2 is used later, so that's also a true dependency (of 4 on 2). Both operands need to be forwarded separately. Also, 2 and 3 are independent, so 3 could complete while the load (2) was still in flight, on a hypothetical MIPS with load scoreboarding instead of stall on miss. – Peter Cordes Jun 19 '22 at 18:13
  • 1
    I count 4 dependencies in that snippet. – Erik Eidt Jun 19 '22 at 18:17

0 Answers0