Professional Documents
Culture Documents
WAW – Control dependence: branch, jump, etc. • A dependency (or dependence) is a particular
instance of one instruction depending on another. – The instructions can’t be effectively (as
opposed to just syntactically) fully parallelized, or reordered.
Info iconThis preview has intentionally blurred sections. Sign up to view the full version.
8 Name Dependence • Occurs when two instructions both access the same data storage location
due to reuse the storage (Also called storage dependence, at least one of the accesses must be a
write.) • Two sub-types (for inst. B after inst. A): – Antidependence: A reads, then B writes. •
Potential for a WAR hazard. – Output dependence: A writes, then B writes. • Potential for a
WAW hazard. • Note: Name dependencies can be avoided by changing instructions to use
different locations (rather than reusing a location), called renaming
Info iconThis preview has intentionally blurred sections. Sign up to view the full version.
9 WAR, WAW Examples • WAR Hazard: Instr J writes operand before Instr I reads it • WAW
Hazard: Instr J writes operand before Instr I writes it. I: sub r4, r1 ,r3 J: add r1 ,r2,r3 K: mul
r6,r1,r7 I: sub r1 ,r4,r3 J: add r1 ,r2,r3 K: mul r6,r1,r7
Info iconThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Right Arrow Icon
11 Control Dependence – Another Example • Example: (for data flow ) DADDU R2, R3, R4 BEQZ
R5, L1 DSUBU R2, R6, R7 L1: OR R8, R2, R9 • OR depends DADDU and DSUBU. Maintaining data
dependences is not enough • Control flow decides where the correct R2 comes from (DADDU or
DSUBU)