Patent ID: 7949861

Claim:
A method of managing branch predictions in an instruction pipeline, the method comprising: marking instructions fetched into the instruction pipeline to indicate their branch prediction dependencies, wherein at least one of the instructions fetched into the instruction pipeline was selected based on a dynamic branch prediction, wherein the dynamic branch prediction includes predicting branch conditions based on accumulated branch prediction statistics, wherein marking instructions comprises: appending a branch flush tag of one or more bits to each conditional branch instruction fetched into the instruction pipeline to be carried with the conditional branch instruction through the instruction pipeline, wherein the branch flush tag identifies an instruction as a conditional branch instruction; and appending a corresponding branch path tag to each instruction fetched into the instruction pipeline wherein each branch path tag identifies at least one conditional branch instruction that a particular instruction depends upon; detecting an incorrect branch prediction of a particular conditional branch instruction; broadcasting a flush signal to at least one stage of the instruction pipeline based on a branch flush tag of the particular conditional branch instruction; and in response to receipt of the flush signal, flushing all instructions in the at least one stage of the instruction pipeline whose branch path tags are marked with the branch flush tag of the particular conditional branch instruction.