Question: do the branch prediction for the branch in the loop ( i . e . . , the branch that goes from BB 3 to

do the branch prediction for the branch in the loop (i.e..,
the branch that goes from BB3 to either BB4 or BB5 as
shown in red lines in Figure 1) based on the algorithm dis-
cussed in class (shown in Figure 2), and calculate the mis-
prediction rate. Assume the branch prediction for the first
two dynamic executions of this branch is always taken.
Execution Trace: Sequence of Basic Blocks Executed
1,2,3,5,6,2,3,4,5,6,2,3,5,6,2,3,4,
5,6,2,3,5,6,2,3,5,6,2,3,4,5,6
Figure One: CFG
There is a red arrow between blocks 3 and 4 and a red arrow going from
block 3 to 5.
Figure Two: Branch Prediction Algorithm
do the branch prediction for the branch in the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!