Control Hazards
Notes
- Trace
cbz x0 address in the CPU picture
- What problems does this introduce?
- P & H state that 17% of the instructions in the SPEC 2006 set are conditional branches.
- What would the impact of inserting a pipeline stall (bubbles) be?
- How far ahead could we move the computations, ie how many stalls could we remove?
- Consider
B address
- Is there still a problem?
- Will data hazards impact branches?
- We have three options here
- Pipeline stalls
- Speculative execution/flush
- Branch Prediction
- Let's write some branching code and discuss the branches.