Data dependencies
Instruction (statement) j dependent on i if
-
- Transitivity: Instruction j dependent on k and k dependent on i
Dependence is a program property
Hazards (RAW in this case) and their (partial) removals is a pipeline organization property
Code scheduling goal
- Maintain dependence and avoid hazard (pipeline is exposed to the compiler)
- Eliminate dependence by modifying code