Control dependencies
Branches restrict the scheduling of instructions
Speculation (i.e., executing an instruction that might not be needed) must be:
- Safe (no additional exception)
- Legal (the end result should be the same as without speculation)
Speculation can be implemented by:
- Compiler (code motion, predication)
- Hardware (branch prediction)
- Both (branch prediction, conditional operations)