Systems and methods for dynamically switching between branch prediction modes
AssigneeAdvanced Micro Devices, Inc.
InventorsAparna Chandrashekhar Mandke, Steven R. Havlir, Upamanyu Banerjee
Life of this patent
Estimating the term…
Abstract
A method for dynamically switching between branch prediction modes may include evaluating a criterion associated with dynamic selection of a mode of speculative prediction of outcomes of one or more branch instructions, wherein the criterion is based on addresses of a plurality of branch instructions executed during a first time period. The method may also include initiating, during a second time period, the mode of speculative prediction of outcomes of the one or more branch instructions, wherein the mode of the speculative prediction is selected based, at least in part, on the criterion.
Claims20
A method comprising:
- evaluating a criterion associated with dynamic selection of a mode of speculative prediction of outcomes of one or more branch instructions, wherein the criterion is based on addresses of a plurality of branch instructions executed during a first time period;
- and
- initiating, during a second time period, the mode of speculative prediction of outcomes of the one or more branch instructions, wherein the mode of the speculative prediction is selected based, at least in part, on the criterion.
A branch prediction circuit comprising:
- a return monitor circuit configured to estimate a number of unique return instructions executed during a first time period;
- and
- a branch prediction mode selector circuit configured to
- evaluate a criterion associated with dynamic selection of a mode of speculative prediction of outcomes of one or more branch instructions, wherein the one or more branch instructions include one or more return instructions, wherein the criterion relates to the number of unique return instructions executed during the first time period, and
- initiate, during a second time period, a non-ahead mode of speculative prediction of outcomes of the one or more return instructions based, at least in part, on the criterion.
A processor core comprising:
- a fetch circuit configured to fetch first and second blocks of instructions during a clock cycle;
- and
- a branch prediction circuit configured to selectively perform ahead branch prediction to predict addresses of third and fourth blocks of instructions based on respective addresses of the first and second blocks of instructions, wherein the branch prediction circuit includes:
- a return monitor configured to estimate a number of unique return instructions executed during a first time period, and
- a branch prediction mode selector configured to
- evaluate a criterion associated with dynamic selection of a mode of speculative prediction of outcomes of one or more branch instructions, wherein the one or more branch instructions include one or more return instructions, wherein the criterion relates to the number of unique return instructions executed during the first time period, and
- initiate, during a second time period, a non-ahead mode of speculative prediction of outcomes of the one or more return instructions based, at least in part, on the criterion.
Dependencies are inferred from the claim text.