1. A computer implemented method for performing selective branch prediction, the method comprising: detecting, by a processor, a branch-prediction blocking instruction in a stream of instructions; and blocking, by the processor, branch prediction of a predetermined number of branch instructions following the branch-prediction blocking instruction based on the detecting the branch-prediction blocking instruction.