IP Library Granted Patent US 12,541,371
Granted Patent B2
US 12,541,371 · App. 18/454,165 · Granted Feb 3, 2026

Predicting behaviour of control flow instructions using prediction entry types

Inventors: Houdhaifa Bouzguarrou (Austin, TX); Alexander Cole Shulyak (Austin, TX)
Assignee: Arm Limited
G06F9/3842G06F9/3844
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,541,371
App. No.
18/454,165
Granted
Feb 3, 2026
Kind
B2
Abstract

An apparatus stores pointer values for pointers which are incremented differentially and has prediction circuitry to maintain prediction entries each identifying a control flow instruction, an associated pointer, and a behaviour record indicating resolved behaviour of the control flow instruction. Resolved behaviour stored in a selected element of the behaviour record identified using a pointer value of the associated pointer may be used as predicted behaviour for a control flow instruction. The prediction entries include a first type of prediction entry and a further type of prediction entry, where prediction circuitry uses each prediction entry of the first type to identify a control flow instruction whose associated pointer is within a first subset of the pointers, and uses each prediction entry of a further type to identify a control flow instruction whose associated pointer is within a further subset of the pointers excluding at least one pointer of the first subset.

Claims (59)

1 . An apparatus comprising:

pointer storage configured to store pointer values for a plurality of pointers;

increment circuitry, responsive to a series of increment events, to differentially increment the pointer values of the pointers;

prediction circuitry configured to maintain a plurality of prediction entries, each prediction entry arranged to identify a control flow instruction with an associated pointer from the plurality of pointers, and a behaviour record comprising at least one element, wherein a valid element of the behaviour record comprises an indication of a resolved behaviour of an instance of the control flow instruction identified by the prediction entry; and

training circuitry configured to perform a training process to seek to determine from among the plurality of pointers a given pointer, to be associated with a given control flow instruction identified by a given prediction entry of the prediction circuitry, where a pointer value of the given pointer increments in a manner that meets a correlation threshold with occurrence of instances of the given control flow instruction; wherein

the prediction circuitry is responsive to replay of a given instance of the given control flow instruction identified by the given prediction entry of the prediction circuitry, to use the resolved behaviour stored in a selected element of the behaviour record of the given prediction entry as the predicted behaviour of the given instance of the given control flow instruction, wherein the selected element is dependent on the pointer value of the given pointer; and

the plurality of prediction entries comprises:

at least one prediction entry of a first type, wherein the prediction circuitry is enabled to use each prediction entry of the first type to identify a control flow instruction whose associated pointer is within a first subset of the plurality of pointers; and

at least one prediction entry of at least one further type, wherein the prediction circuitry is enabled to use each prediction entry of the at least one further type to identify a control flow instruction whose associated pointer is within a further subset of the plurality of pointers that excludes at least one pointer of the first subset.

2 . The apparatus according to claim 1 , comprising pointer value routing circuitry arranged to route a pointer value from the pointer storage to the prediction circuitry for making a prediction in respect of a chosen prediction entry; wherein

the pointer value routing circuitry comprises first pointer value routing circuitry arranged to route to the prediction circuitry a pointer value associated with any pointer of the first subset of pointers, the first pointer value routing circuitry being employed when the chosen prediction entry is a prediction entry of the first type, and further pointer value routing circuitry arranged to route to the prediction circuitry a further pointer value associated with at least one pointer of the further subset of pointers, the further pointer value routing circuitry being employed when the chosen prediction entry is a prediction entry of a given further type.

3 . The apparatus according to claim 2 , wherein

the further pointer value routing circuitry associated with a prediction entry of the given further type is arranged to directly read the further pointer value pointer from the pointer storage without making a selection between pointer values.

4 . The apparatus according to claim 1 , wherein

each prediction entry of the first type is arranged to specify the associated pointer.

5 . The apparatus according to claim 1 , wherein

at least one prediction entry of the at least one further type is arranged to identify the associated pointer based on an entry type.

6 . The apparatus according to claim 1 , wherein the at least one prediction entry of the at least one further type comprises a prediction entry of a second type, and the further subset for the prediction entry of the second type comprises an incremented-each-event pointer, where a pointer value of the incremented-each-event pointer is incremented in response to each increment event.

7 . The apparatus according to claim 6 , wherein the further subset for the prediction entry of the second type comprises a never-updated pointer, where a pointer value of the never-updated pointer is not updated in response to any of the series of increment events.

8 . The apparatus according to claim 1 , wherein the at least one prediction entry of the at least one further type comprises a prediction entry of a third type, and the further subset for the prediction entry of the third type comprises a never-updated pointer, where a pointer value of the never-updated pointer is not updated in response to any of the series of increment events.

9 . The apparatus according to claim 8 , wherein the behaviour record associated with a control flow instruction identified by the prediction entry of the third type comprises a single element which is the selected element.

10 . The apparatus according to claim 1 , wherein

the first subset of the plurality of pointers comprises the further subset of the plurality of pointers.

11 . The apparatus according to claim 1 , comprising allocation circuitry configured to allocate a control flow instruction to the plurality of prediction entries;

wherein the allocation circuitry is configured to allocate a control flow instruction, having an associated pointer which is in both the first subset and the further subset, to a selected prediction entry chosen from among the first type and the at least one further type.

12 . The apparatus according to claim 11 , wherein

the allocation circuitry is configured to preferentially choose as the selected prediction entry a free prediction entry of the at least one further type.

13 . The apparatus according to claim 1 , comprising power control circuitry, wherein:

the prediction circuitry comprises multiple partitions each for storing a respective type of prediction entry; and

the power control circuitry is responsive to one or more power trigger events to separately control a power mode of each partition.

14 . The apparatus according to claim 1 , wherein the training circuitry comprises tracker circuitry to maintain a plurality of tracker entries each associated with a control flow instruction, the training circuitry arranged to perform the training process for the given control flow instruction identified in a given tracker entry; and

promotion circuitry, responsive to detection of the correlation threshold being met for the given control flow instruction, to allocate a prediction entry within the prediction circuitry to identify the given control flow instruction and the associated pointer, and to establish within the prediction entry the behaviour record.

15 . The apparatus according to claim 14 , comprising cache circuitry to maintain a plurality of cache entries, each cache entry to store a resolved behaviour of an instance of a control flow instruction identified by a tracker entry of the tracker circuitry along with an associated tag value generated in dependence on a chosen pointer when the resolved behaviour was allocated into that cache entry.

16 . The apparatus according to claim 1 , comprising update circuitry configured to update a prediction entry identifying a given control flow instruction in response to a resolved behaviour event identifying a resolved behaviour for one or more subsequently observed instances of the identified given control flow instruction; wherein

the update circuitry is configured to update a prediction entry of the at least one further type within fewer clock cycles following the resolved behaviour event than the update circuitry is configured to update a prediction entry of the first type.

17 . A system comprising:

the apparatus according to claim 1 , implemented in at least one packaged chip;

at least one system component; and

a board,

wherein the at least one packaged chip and the at least one system component are assembled on the board.

18 . A chip-containing product comprising the system according to claim 17 , assembled on a further board with at least one other product component.

19 . A method of predicting behaviour of control flow instructions, comprising:

maintaining pointer values for a plurality of pointers and, responsive to a series of increment events, differentially incrementing pointer values of the pointers;

employing prediction circuitry to maintain a plurality of prediction entries, each prediction entry arranged to identify a control flow instruction with an associated pointer from the plurality of pointers, and a behaviour record comprising at least one element, wherein a valid element of the behaviour record comprises an indication of a resolved behaviour of an instance of the control flow instruction identified by the prediction entry;

performing a training process to seek to determine from among the plurality of pointers a given pointer, to be associated with a given control flow instruction identified by a given prediction entry of the prediction circuitry, where a pointer value of the given pointer increments in a manner that meets a correlation threshold with occurrence of instances of the given control flow instruction;

detecting replay of a given instance of the given control flow instruction identified by the given prediction entry of the prediction circuitry; and

responsive to replay of the given instance of the given control flow instruction identified by the given prediction entry of the prediction circuitry, using the resolved behaviour stored in a selected element of the behaviour record of the given prediction entry as the predicted behaviour of the given instance of the given control flow instruction, wherein the selected element is dependent on the pointer value of the given pointer; wherein

the plurality of prediction entries comprises:

at least one prediction entry of a first type, wherein the prediction circuitry is enabled to use each prediction entry of the first type to identify a control flow instruction whose associated pointer is within a first subset of the plurality of pointers; and

at least one prediction entry of at least one further type, wherein the prediction circuitry is enabled to use each prediction entry of the at least one further type to identify a control flow instruction whose associated pointer is within a further subset of the plurality of pointers that excludes at least one pointer of the first subset.

20 . A non-transitory computer-readable medium to store computer-readable code for fabrication of a data processing apparatus comprising:

pointer storage configured to store pointer values for a plurality of pointers;

increment circuitry, responsive to a series of increment events, to differentially increment the pointer values of the pointers;

prediction circuitry configured to maintain a plurality of prediction entries, each prediction entry arranged to identify a control flow instruction with an associated pointer from the plurality of pointers, and a behaviour record comprising at least one element, wherein a valid element of the behaviour record comprises an indication of a resolved behaviour of an instance of the control flow instruction identified by the prediction entry; and

training circuitry configured to perform a training process to seek to determine from among the plurality of pointers a given pointer, to be associated with a given control flow instruction identified by a given prediction entry of the prediction circuitry, where a pointer value of the given pointer increments in a manner that meets a correlation threshold with occurrence of instances of the given control flow instruction; wherein

the prediction circuitry is responsive to replay of a given instance of the given control flow instruction identified by the given prediction entry of the prediction circuitry, to use the resolved behaviour stored in a selected element of the behaviour record of the given prediction entry as the predicted behaviour of the given instance of the given control flow instruction, wherein the selected element is dependent on the pointer value of the given pointer; and

the plurality of prediction entries comprises:

at least one prediction entry of a first type, wherein the prediction circuitry is enabled to use each prediction entry of the first type to identify a control flow instruction whose associated pointer is within a first subset of the plurality of pointers; and

at least one prediction entry of at least one further type, wherein the prediction circuitry is enabled to use each prediction entry of the at least one further type to identify a control flow instruction whose associated pointer is within a further subset of the plurality of pointers that excludes at least one pointer of the first subset.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2023
From: BOUZGUARROU, HOUDHAIFA; SHULYAK, ALEXANDER COLE
To: ARM LIMITED
Reel/Frame 065508/0990 →
Continuity (1)
Related Publication 20250068426A1 · Feb 27, 2025
References Cited (40)
US 6006317A · Ramagopal et al. · 1999 [cited by applicant]
US 6385720B1 · Tanaka · 2002 [cited by applicant]
US 6694425B1 · Eickemeyer · 2004 [cited by applicant]
US 6738897B1 · Talcott · 2004 [cited by examiner]
US 8078852B2 · Al-Otoom · 2011 [cited by applicant]
US 8751776B2 · Ukai · 2014 [cited by examiner]
US 9639368B2 · Bonanno · 2017 [cited by applicant]
US 9891918B2 · Hooker · 2018 [cited by examiner]
US 9973187B1 · Pant · 2018 [cited by examiner]
US 10223123B1 · Blasco · 2019 [cited by examiner]
US 10846097B2 · Jumani et al. · 2020 [cited by applicant]
US 10915322B2 · Annamalai · 2021 [cited by applicant]
US 11113066B2 · Bhat · 2021 [cited by examiner]
US 11334361B2 · Ishii · 2022 [cited by examiner]
US 11983533B2 · Pusdesris · 2024 [cited by applicant]
US 20040255104A1 · Akkary et al. · 2004 [cited by applicant]
US 20050138480A1 · Srinivasan et al. · 2005 [cited by applicant]
US 20110238917A1 · Lin · 2011 [cited by applicant]
US 20160092230A1 · Chen · 2016 [cited by applicant]
US 20160350116A1 · Reddy et al. · 2016 [cited by applicant]
US 20170010820A1 · Day · 2017 [cited by applicant]
US 20180088953A1 · Lin · 2018 [cited by applicant]
US 20200050459A1 · Palivela · 2020 [cited by applicant]
US 20200104137A1 · Natarajan · 2020 [cited by applicant]
US 20200174794A1 · Golla · 2020 [cited by applicant]
US 20210081575A1 · Saileshwar · 2021 [cited by applicant]
US 20210124586A1 · Bouzguarrou · 2021 [cited by applicant]
US 20210240476A1 · Kountanis · 2021 [cited by applicant]
US 20220197650A1 · Soundararajan · 2022 [cited by applicant]
US 20230057600A1 · Malley · 2023 [cited by applicant]
Xie et al., SWIP Prediction: Complexity-Effective Indirect-Branch Prediction Using Pointers, Jul. 12, 2012, J. Comput. Sci. Technol. 27, 754-768 (Year: 2012). [cited by examiner]
U.S. Appl. No. 17/851,266, filed Jun. 28, 2022, Shulyak et al. [cited by applicant]
U.S. Appl. No. 18/312,052, filed May 4, 2023, Shulyak et al. [cited by applicant]
U.S. Appl. No. 18/454,158, filed Aug. 23, 2023, Bouzguarrou et al. [cited by applicant]
U.S. Appl. No. 18/462,742, filed Sep. 7, 2023, Bouzguarrou et al. [cited by applicant]
Office Action dated Aug. 9, 2023 for U.S. Appl. No. 17/851,266, 11 pages. [cited by applicant]
Akkary, H. et al. “Recycling Waste: Exploiting Wrong-Path Execution to Improve Branch Prediction” ICS'03, Jun. 23-26, 2003, pp. 12-21 (10 pages). [cited by applicant]
Mutlu, O. et al. “On Reusing the Results of Pre-Executed Instructions in a Runahead Execution Processor” IEEE Computer Architecture Letters, 2005, vol. 4 (4 pages). [cited by applicant]
Notice of Allowance dated Aug. 22, 2024 for U.S. Appl. No. 18/312,052, 15 pages. [cited by applicant]
Notice of Allowance dated Apr. 4, 2025 for U.S. Appl. No. 18/462,742, 10 pages. [cited by applicant]