< previous page page_461 next page >

Page 461
0461-01.gif
Figure 7.29
Instruction window.
only in poorly represented code. Since this type of dependency is generally eliminated by any optimizing compiler, it can be largely ignored in our discussions and is not regarded by some as a true instruction dependency. Consider two examples:
Example #1
d87111c01013bcda00bb8640fdff6754.gif
DIV R3, R1, R2
d87111c01013bcda00bb8640fdff6754.gif
ADD R3, R4, R5.
Example #2
d87111c01013bcda00bb8640fdff6754.gif
DIV R3, R1, R2
d87111c01013bcda00bb8640fdff6754.gif
ADD R5, R3, R4
d87111c01013bcda00bb8640fdff6754.gif
ADD R3, R6, R7.
The first example is clearly a case of a redundant instruction (the DIV), whereas the second is a case that has an output dependency, but also has an essential dependency; since this essential dependency must be covered, the output dependency is also covered. It is important to realize that the fewer the dependencies that arise in the code, the more concurrency available in the code and the faster the overall program execution. Thus, if output dependencies cannot occur because of the compiler, we achieve a higher degree of concurrency than otherwise.
7.6.2 Representing Data Dependencies
Suppose we have a block of instructions as shown in Figure 7.29. Instruction i is by definition independent of all others, since it is the first one in sequence. From the previous discussion, subsequent instruction j is dependent and cannot be executed at this time if any of the following three conditions are satisfied (i precedes j):
1. EssentialDi = S1j or Di = S2j
d87111c01013bcda00bb8640fdff6754.gif
(also called read after write dependency [171]).
2. OrderingDj = S1i or Dj = S2i
d87111c01013bcda00bb8640fdff6754.gif
(also called write after read dependency [171]).
3. OutputDi = Dj
d87111c01013bcda00bb8640fdff6754.gif
(also called write after write dependency [171]).

 
< previous page page_461 next page >