Consider following assembly-language program:
1: MOV R3, R7 2: LD R8, (R3) 3: ADD R3, R3, 4 4: LOAD R9, (R3) 5: BNE R8, R9, L3
a) This program includes WAW, RAW, and WAR dependencies. Show these.
b) What is the difference between a dependency and hazard?
c) What is the difference between a name dependency and a true dependency?
e) Which of WAW, RAW, WAR are true dependencies and which are name dependencies?
RAW: L1-L2,L1-L3, L3-L4,L2-L5,L4-L5
b) A hazard is created when there is a dependency between instructions and they are close enough that the overlap caused by pipelining (or reordering) would change the order of access to the dependent operand.
c) In a true dependency information is transmitted between instructions, while this is not the case for name dependencies.
d) Name dependencies: WAR, WAW
True dependencies: RAW