Q. How can we minimize problems occurring because of the branch instructions?
We may use various mechanisms which may minimize the effect of branch penalty.
- To keep multiple streams in pipeline in the case of branch
- Pre-fetching the subsequent as well as instruction to which branch is to take place
- A loop buffer can be used to store instructions of a loop instruction
- Predicting whether the branch will occur or not and acting accordingly
- Delaying the pipeline fill up until branch decision is taken.