Apparatus and Method for Bias-Free Branch Prediction
US-2015363203-A1 · Dec 17, 2015 · US
US11416256B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11416256-B2 |
| Application number | US-202016945275-A |
| Country | US |
| Kind code | B2 |
| Filing date | Jul 31, 2020 |
| Priority date | Jun 18, 2018 |
| Publication date | Aug 16, 2022 |
| Grant date | Aug 16, 2022 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A set of entries in a branch prediction structure for a set of second blocks are accessed based on a first address of a first block. The set of second blocks correspond to outcomes of one or more first branch instructions in the first block. Speculative prediction of outcomes of second branch instructions in the second blocks is initiated based on the entries in the branch prediction structure. State associated with the speculative prediction is selectively flushed based on types of the branch instructions. In some cases, the branch predictor can be accessed using an address of a previous block or a current block. State associated with the speculative prediction is selectively flushed from the ahead branch prediction, and prediction of outcomes of branch instructions in one of the second blocks is selectively initiated using non-ahead accessing, based on the types of the one or more branch instructions.
Opening claim text (preview).
What is claimed is: 1. A method comprising: initiating speculative prediction of outcomes of first branch instructions in a set of first blocks that correspond to predicted outcomes of a second branch instruction in a second block; determining a type of the second branch instruction concurrently with the speculative prediction of the outcomes of the first branch instructions; and selectively flushing a state associated with the speculative prediction based on the type of the second branch instruction. 2. The method of claim 1 , further comprising: accessing, based on a first address of the second block, a set of entries in a branch prediction structure for the set of first blocks. 3. The method of claim 2 , wherein accessing the set of entries in the branch prediction structure comprises accessing a set of entries in the branch prediction structure for a set of first blocks that are potential targets of the second branch instruction or a block that follows the second block if the second branch instruction is not taken. 4. The method of claim 2 , further comprising: reinitiating speculative prediction of at least one of the first branch instructions in a predicted first block of the first blocks based on an entry in the branch prediction structure that is indexed by a second address of the predicted first block. 5. The method of claim 4 , wherein the predicted first block corresponds to a predicted outcome of the second branch instruction in the second block. 6. The method of claim 1 , further comprising: determining the type of the second branch instruction concurrently with the speculative prediction of the outcomes of the first branch instructions in the set of first blocks. 7. The method of claim 6 , wherein determining the type of the second branch instruction comprises determining the type of the second branch instruction based on whether an outcome of the second branch instruction is determined by a branch target buffer, an indirect branch predictor, or a return address stack. 8. The method of claim 1 , wherein selectively flushing the state comprises flushing the state associated with the speculative prediction of the outcomes of the first branch instructions in response to the type of the second branch instruction belonging to a first subset of a set of types of branch instructions. 9. The method of claim 8 , wherein the first subset comprises call instructions, return instructions, and indirect branch instructions. 10. The method of claim 8 , wherein selectively flushing the state comprises bypassing flushing the state and continuing with the speculative prediction in response to the type of the second branch instruction belonging to a second subset of the set of types of branch instructions. 11. An apparatus comprising: a scheduler configured to initiate speculative prediction of outcomes of first branch instructions in a set of first blocks that correspond to predicted outcomes of a second branch instruction in a second block; and a branch predictor configured to determine a type of the second branch instruction concurrently with the speculative prediction of the outcomes of the first branch instructions and selectively flush a state associated with the speculative prediction based on the type of the second branch instruction. 12. The apparatus of claim 11 , wherein the branch predictor is configured to access, based on a first address of the second block, a set of entries in a branch prediction structure for the set of first blocks. 13. The apparatus of claim 12 , wherein the branch predictor is configured to access a set of entries in the branch prediction structure for a set of first blocks that are potential targets of the second branch instruction or a block that follows the second block if the second branch instruction is not taken. 14. The apparatus of claim 12 , wherein the branch predictor is configured to re-initiate speculative prediction of at least one of the first branch instructions in a predicted first block of the first blocks based on an entry in the branch prediction structure that is indexed by a second address of the predicted first block. 15. The apparatus of claim 14 , wherein the predicted first block corresponds to a predicted outcome of the second branch instruction in the second block. 16. The apparatus of claim 11 , wherein the branch predictor is configured to determine the type of the second branch instruction concurrently with the speculative prediction of the outcomes of the first branch instructions in the set of first blocks. 17. The apparatus of claim 16 , wherein the branch predictor is configured to determine the type of the second branch instruction based on whether an outcome of the second branch instruction is determined by a branch target buffer, an indirect branch predictor, or a return address stack. 18. The apparatus of claim 11 , wherein the branch predictor is configured to flush the state associated with the speculative prediction of the outcomes of the first branch instructions in response to the type of the second branch instruction belonging to a first subset of a set of types of branch instructions. 19. The apparatus of claim 18 , wherein the first subset comprises call instructions, return instructions, and indirect branch instructions. 20. The apparatus of claim 18 , wherein the branch predictor is configured to flush the state and continue with the speculative prediction in response to the type of the second branch instruction belonging to a second subset of the set of types of branch instructions.
Indirect addressing · CPC title
Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00) · CPC title
Indexed addressing · CPC title
using dynamic branch prediction, e.g. using branch history tables · CPC title
using address prediction, e.g. return stack, branch history buffer · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.