Method and apparatus for predicting branches using a meta predictor
AssigneeMicron Technology, Inc.
InventorsStephan J. Jourdan, Adi Yoaz, Mattan Erez, Ronny Ronen
Life of this patent
Estimating the term…
Abstract
A branch predicting apparatus is disclosed that reduces branch mispredictions in a processor. The branch prediction apparatus includes a base misprediction history register. The branch prediction apparatus includes a meta predictor that receives an index value and a branch prediction to generate a misprediction value in accordance with the base misprediction history register. The branch prediction apparatus also includes a logic gate that receives the branch prediction and the misprediction value to generate a final prediction. The final prediction may be used to predict whether a branch is taken or not taken.
Claims26
A branch prediction apparatus, comprising:
- a base misprediction history register to provide an output;
- a meta predictor to receive as inputs an index value and a branch prediction to generate a misprediction value in accordance with said inputs and said base misprediction history register output, said branch prediction generated in response to a branch request and said misprediction value comprising a value predicting whether said branch prediction is correct or incorrect;
- and
- a logic gate to generate a final prediction based on said branch prediction and said misprediction value, said final prediction comprising information indicating whether said branch prediction is to be taken or reversed for said branch request according to said misprediction value.
A method for predicting branches, comprising:
- receiving an index value, a branch prediction correlating to said index value, and a misprediction history value at a meta predictor, said branch prediction generated in response to a branch request;
- generating a misprediction value at said meta predictor, said misprediction value comprising a value predicting whether said branch prediction is correct or incorrect;
- and
- generating a final prediction based on said branch prediction and said misprediction value, said final prediction comprising information indicating whether said branch prediction is to be taken or reversed for said branch request according to said misprediction value.
An apparatus, comprising:
- a branch predictor to generate a branch prediction in response to a branch request;
- a base misprediction history register to provide a misprediction history value;
- a meta predictor to generate a misprediction value based on an index value, said branch prediction and said misprediction history value, said misprediction value comprising a value predicting whether said branch prediction is correct or incorrect;
- and
- a logic gate to generate a final prediction based on said branch prediction and said misprediction value, said final prediction comprising information indicating whether said branch prediction is to be taken or reversed for said branch request according to said misprediction value.
A non-transitory computer-readable storage device storing instructions which, when executed by one or more processors, configure the one or more processors to:
- receive an index value, a branch prediction correlating to said index value, and a misprediction history value at a meta predictor, said branch prediction generated in response to a branch request;
- generate a misprediction value at said meta predictor, said misprediction value comprising a value indicating whether said branch prediction is correct or incorrect;
- and
- generate a final prediction based on said branch prediction and said misprediction value, said final prediction comprising information indicating whether said branch prediction is to be taken or reversed for said branch request according to said misprediction value.
A method for restoring a branch prediction apparatus following a branch misprediction of a branch instruction, comprising:
- restoring a base misprediction history register;
- and
- restoring a branch predictor history register.
Dependencies are inferred from the claim text.