During compilation of a computer program, a branch instruction within the
computer program is identified as having a characteristic (e.g., as being dependent
upon unpredictable data) that influences the accuracy of a branch prediction for
the branch instruction. Responsive to this identification, a compiler, again during
compilation of the computer program, flags the branch instruction. During execution
of the computer program, speculative execution of instructions is suppressed responsive
to detection of the flagged branch instruction.