Loop predictor and method for instruction fetching using a loop predictor
AssigneeAdvanced Micro Devices, Inc.
InventorAnthony Jarvis
Life of this patent
Estimating the term…
Loading patent…
AssigneeAdvanced Micro Devices, Inc.
InventorAnthony Jarvis
Estimating the term…
A loop predictor and a method for instruction fetching using a loop predictor. A processor may include a loop predictor in addition to a primary branch predictor. A relatively common scenario in program execution is that a set of branches repeat over and over forming a loop. The loop may be detected based on a repeated pattern of access to a data structure used for branch prediction. Once a loop is detected and it may be determined whether the codes would stay in the loop for at least a duration sufficient to disable the branch prediction. On a determination that the detected loop is locked, a sequence of instruction addresses in one iteration of the detected loop may be captured in a buffer and the branch predictor may be turned off and a sequence of fetch instructions may be played from the buffer.
A method for instruction fetching in a processor using a loop predictor, the method comprising:
A processor comprising:
A non-transitory computer-readable storage medium storing a set of instructions for execution by a processor to fetch an instruction using a loop predictor, the set of instructions comprising:
A non-transitory computer-readable storage medium storing a code for describing a structure and/or a behavior of a circuit configured to detect a loop based on a repeated pattern of access to a data structure used for branch prediction, capture a sequence of instruction addresses in one iteration of the detected loop in a buffer on a determination that the detected loop is locked, and generate a sequence of instruction addresses for instruction fetching from the buffer, wherein the detected loop is determined to be locked if it is determined based on the repeated pattern of access to the data structure that instructions stay in the loop for at least a duration sufficient to disable the branch prediction.
Dependencies are inferred from the claim text.