This makes the new CPI 1.235. These optimizations are in addition to any branch delay scheduling. However, this still leaves more than a third of the branches improperly predicted. Predict forward not taken and backward taken This scheme is similar to predicting all branches as taken except that it uses information about the types of branches. Forward branches are likely part of if-else constructs, and may be less likely to be taken.
Backward branches are usually part of loops and thus more likely to be taken.
However, this method won't perform much better than simply predicting not-taken . The compiler can instrument the code using the profile information from previous runs of the program. It is not perfect since many branches are both taken and not taken in the course of execution. But it does provide better prediction than other static methods. This is true even if different input data is used for the program.