IP Library Granted Patent US 12,657,030
Granted Patent B2
US 12,657,030 · App. 18/774,678 · Granted Jun 16, 2026

Cached instruction recording for prediction embedding

Inventors: Ian D Kountanis (Santa Clara, CA); Douglas C Holman (San Jose, CA); Wei-Han Lien (Los Gatos, CA); Pruthivi Vuyyuru (Santa Clara, CA); Ethan R Schuchman (Saratoga, CA); Niket K Choudhary (Santa Clara, CA); Kulin N Kothari (Cupertino, CA); Haoyan Jia (Ellicott City, MD)
Assignee: Apple Inc.
G06F9/3846G06F9/3806G06F9/3844G06F9/3848
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,657,030
App. No.
18/774,678
Granted
Jun 16, 2026
Kind
B2
Abstract

A processor may include a bias prediction circuit and an instruction prediction circuit to provide respective predictions for a conditional instruction. The bias prediction circuit may provide a bias prediction whether a condition of the conditional instruction is biased true or biased false. The instruction prediction circuit may provide an instruction prediction whether the condition of the conditional instruction is true of false. Responsive to a bias prediction that the condition of the conditional instruction is biased true or biased false, the processor may use the bias prediction from the bias prediction circuit to speculatively process the conditional instruction. Otherwise, the processor may use the instruction prediction from the instruction prediction circuit to speculatively process the conditional instruction.

Claims (50)

1 . A processor, comprising:

a bias prediction circuit configured to predict respective conditions for individual conditional instructions according to one or more previous executions of the individual conditional instructions, wherein the predicted conditions individually comprise a biased condition or an unbiased condition, and wherein the biased condition indicates that a respective condition is always true or always false; and

a fetch and decode circuit configured to encode, in a cache, information identifying a first conditional instruction as biased responsive to a prediction of a biased condition by the bias prediction circuit for the first conditional instruction.

2 . The processor of claim 1 , wherein to encode information identifying the first conditional instruction as biased, the fetch and decode circuit is configured to recode the first conditional instruction in the cache as a non-conditional instruction.

3 . The processor of claim 1 , wherein to encode information identifying the first conditional instruction as biased, the fetch and decode circuit is configured to:

encode the first conditional instruction in an entry of the cache; and

append information identifying the prediction of the biased condition to the entry of the cache.

4 . The processor of claim 1 , wherein to predict a condition for a given conditional instruction of the individual conditional instructions, the bias prediction circuit is configured to:

identify a value for the given conditional instruction in a bias table based on an address of the given conditional instruction; and

provide the predicted condition based on the identified value for the given conditional instruction in the bias table.

5 . The processor of claim 4 , wherein the value for the given conditional instruction in the bias table is one of a plurality of values including:

a first value indicating that no conditional instruction corresponding to an entry of the value in the bias table has been encountered by the bias prediction circuit;

a second value indicating that the condition of the given conditional instruction is biased false;

a third value indicating that the condition of the given conditional instruction is biased true; and

a fourth value indicating that the condition of the given conditional instruction is not biased.

6 . The processor of claim 5 , wherein the value for the given conditional instruction in the bias table is set from the first value to the second or third value when execution of the given conditional instruction indicates that the condition of the given conditional instruction is respectively false or true, or from the second or third value to the fourth value when the execution of the given conditional instruction indicates that the value for the given conditional instruction in the bias table mis-matches an outcome of the execution of the given conditional instruction.

7 . The processor of claim 1 , wherein the bias prediction circuit is configured to predict the respective conditions for the individual conditional instructions at a first stage of the processor corresponding to loading the respective individual conditional instructions to the cache of the processor, and wherein the processor further comprises an instruction prediction circuit configured to provide respective instruction predictions at a second stage of the processor corresponding to fetching, from the cache, of respective conditional instructions having respective predictions of unbiased conditions by the bias prediction circuit.

8 . A method, comprising:

predicting, using a bias prediction circuit of a processor, respective conditions for individual conditional instructions according to one or more previous executions of the individual conditional instructions, wherein the predicted conditions individually comprise a biased condition or an unbiased condition, and wherein the biased condition indicates that a respective condition of the respective conditions is always true or always false;

generating, by the bias prediction circuit, a prediction of the biased condition for a first conditional instruction; and

encoding, in a cache of the processor using a fetch and decode circuit of the processor, information identifying the first conditional instruction as biased responsive to a prediction of a biased condition by the bias prediction circuit for the first conditional instruction.

9 . The method of claim 8 , comprising: wherein encoding information identifying the first conditional instruction as biased comprises recoding the first conditional instruction in the cache as a non-conditional instruction.

10 . The method of claim 8 , wherein encoding information identifying the first conditional instruction as biased comprises:

encoding the first conditional instruction in an entry of the cache; and

appending information identifying the prediction of the biased condition to the entry of the cache.

11 . The method of claim 8 , wherein predicting a condition for a given conditional instruction of the individual conditional instructions comprises:

identifying a value for the given conditional instruction in a bias table based on an address of the given conditional instruction; and

providing the predicted condition based on the identified value for the given conditional instruction in the bias table.

12 . The method of claim 11 , wherein the value for the given conditional instruction in the bias table is one of a plurality of values including:

a first value indicating that no conditional instruction corresponding to an entry of the value in the bias table has been encountered by the bias prediction circuit;

a second value indicating that the condition of the given conditional instruction is biased false;

a third value indicating that the condition of the given conditional instruction is biased true; and

a fourth value indicating that the condition of the given conditional instruction is not biased.

13 . The method of claim 12 , wherein the value for the given conditional instruction in the bias table is set from the first value to the second or third value when execution of the given conditional instruction indicates that the condition of the given conditional instruction is respectively false or true, or from the second or third value to the fourth value when the execution of the given conditional instruction indicates that the value for the given conditional instruction in the bias table mis-matches an outcome of the execution of the given conditional instruction.

14 . The method of claim 8 , wherein predicting the respective conditions for the individual conditional instructions is performed at a first stage of the processor corresponding to loading the respective individual conditional instructions to the cache of the processor, and wherein the method further comprises providing, using an instruction prediction circuit of the processor, respective instruction predictions at a second stage of the processor corresponding to fetching, from the cache, of respective conditional instructions having respective predictions of unbiased conditions by the bias prediction circuit.

15 . A system, comprising:

one or more processors individually comprising:

a bias prediction circuit configured to predict respective conditions for individual conditional instructions according to one or more previous executions of the individual conditional instructions, wherein the predicted conditions individually comprise a biased condition or an unbiased condition, and wherein the biased condition indicates that a respective condition is always true or always false; and

a fetch and decode circuit configured to encode, in a cache, information identifying a first conditional instruction as biased responsive to a prediction of a biased condition by the bias prediction circuit for the first conditional instruction.

16 . The system of claim 15 , wherein to encode information identifying the first conditional instruction as biased, the fetch and decode circuit is configured to recode the first conditional instruction in the cache as a non-conditional instruction.

17 . The system of claim 15 , wherein to encode information identifying the first conditional instruction as biased, the fetch and decode circuit is configured to recode the first conditional instruction in the cache as a non-conditional instruction.

18 . The system of claim 15 , wherein to predict a condition for a given conditional instruction of the individual conditional instructions, the bias prediction circuit is configured to:

identify a value for the given conditional instruction in a bias table based on an address of the given conditional instruction; and

provide the predicted condition based on the identified value for the given conditional instruction in the bias table.

19 . The system of claim 18 , wherein the value for the given conditional instruction in the bias table is one of a plurality of values including:

a first value indicating that no conditional instruction corresponding to an entry of the value in the bias table has been encountered by the bias prediction circuit;

a second value indicating that the condition of the given conditional instruction is biased false;

a third value indicating that the condition of the given conditional instruction is biased true; and

a fourth value indicating that the condition of the given conditional instruction is not biased.

20 . The system of claim 19 , wherein the value for the given conditional instruction in the bias table is set from the first value to the second or third value when execution of the given conditional instruction indicates that the condition of the given conditional instruction is respectively false or true, or from the second or third value to the fourth value when the execution of the given conditional instruction indicates that the value for the given conditional instruction in the bias table mis-matches an outcome of the execution of the given conditional instruction.

Continuity (2)
Continuation 17590719 · Feb 1, 2022
Related Publication 20240385842A1 · Nov 21, 2024
References Cited (100)
US 5142634A · Fite et al. · 1992 [cited by applicant]
US 5287467A · Blaner · 1994 [cited by applicant]
US 5644779A · Song · 1997 [cited by applicant]
US 5870579A · Tan · 1999 [cited by applicant]
US 5920710A · Tan · 1999 [cited by applicant]
US 6240510B1 · Yeh · 2001 [cited by applicant]
US 6304960B1 · Yeh · 2001 [cited by applicant]
US 6308322B1 · Serocki · 2001 [cited by applicant]
US 6430682B1 · Dwyer, III · 2002 [cited by applicant]
US 6571331B2 · Henry et al. · 2003 [cited by applicant]
US 7302556B2 · Ludden et al. · 2007 [cited by applicant]
US 7434037B2 · Park et al. · 2008 [cited by applicant]
US 7809933B2 · Levitan · 2010 [cited by applicant]
US 7814298B1 · Thaik · 2010 [cited by applicant]
US 8055492B2 · Adir · 2011 [cited by applicant]
US 8521996B2 · Henry et al. · 2013 [cited by applicant]
US 9122487B2 · Golla · 2015 [cited by applicant]
US 9465615B2 · Smeets et al. · 2016 [cited by applicant]
US 9489203B2 · Dundas · 2016 [cited by applicant]
US 9529595B2 · Lin · 2016 [cited by applicant]
US 10209993B2 · Wang · 2019 [cited by applicant]
US 10235173B2 · Rasale · 2019 [cited by applicant]
US 10379858B2 · Branscome · 2019 [cited by applicant]
US 10747539B1 · Hakewill · 2020 [cited by applicant]
US 10795683B2 · Eickemeyer · 2020 [cited by applicant]
US 10866805B2 · Grisenthwaite · 2020 [cited by applicant]
US 10901484B2 · Blasco · 2021 [cited by applicant]
US 11061677B1 · Seth · 2021 [cited by applicant]
US 11169807B2 · Bhat et al. · 2021 [cited by applicant]
US 11269638B2 · Zbiciak · 2022 [cited by applicant]
US 11379240B2 · Al-otoom · 2022 [cited by applicant]
US 11416256B2 · Evers · 2022 [cited by applicant]
US 11449343B2 · Gonion · 2022 [cited by applicant]
US 11809874B2 · Schuchman et al. · 2023 [cited by applicant]
US 12067399B2 · Kountanis et al. · 2024 [cited by applicant]
US 20010032309A1 · Henry et al. · 2001 [cited by applicant]
US 20020040429A1 · Dowling · 2002 [cited by applicant]
US 20040003215A1 · Krimer · 2004 [cited by applicant]
US 20040093485A1 · Nguyen et al. · 2004 [cited by applicant]
US 20040210749A1 · Biles · 2004 [cited by applicant]
US 20040225866A1 · Williamson · 2004 [cited by applicant]
US 20060026408A1 · Morris · 2006 [cited by examiner]
US 20080059779A1 · Davis · 2008 [cited by applicant]
US 20080077781A1 · Smith · 2008 [cited by applicant]
US 20080162905A1 · Luick · 2008 [cited by examiner]
US 20090249037A1 · Webber · 2009 [cited by applicant]
US 20100031010A1 · Moyer · 2010 [cited by applicant]
US 20100064123A1 · Zuraski et al. · 2010 [cited by applicant]
US 20100274972A1 · Babayan et al. · 2010 [cited by applicant]
US 20120079255A1 · Combs et al. · 2012 [cited by applicant]
US 20120124346A1 · Hardage · 2012 [cited by applicant]
US 20130007425A1 · Cantin · 2013 [cited by examiner]
US 20130067202A1 · Henry · 2013 [cited by applicant]
US 20140156977A1 · Dechene · 2014 [cited by applicant]
US 20140156978A1 · Al-Otoom · 2014 [cited by applicant]
US 20140195790A1 · Merten · 2014 [cited by applicant]
US 20150052338A1 · Kuwahara et al. · 2015 [cited by applicant]
US 20150277916A1 · Khartikov · 2015 [cited by applicant]
US 20150363203A1 · Lipasti · 2015 [cited by applicant]
US 20160026470A1 · Manoukian · 2016 [cited by applicant]
US 20170075689A1 · Branscome · 2017 [cited by applicant]
US 20170083333A1 · Choudhary et al. · 2017 [cited by applicant]
US 20170153894A1 · Hornung · 2017 [cited by applicant]
US 20170322810A1 · Navada · 2017 [cited by applicant]
US 20180101385A1 · Wang · 2018 [cited by applicant]
US 20180173533A1 · Soundararajan et al. · 2018 [cited by applicant]
US 20190004802A1 · Tarsa · 2019 [cited by applicant]
US 20190004803A1 · Al Sheikh · 2019 [cited by examiner]
US 20200110615A1 · Ishii et al. · 2020 [cited by applicant]
US 20200151019A1 · Yu · 2020 [cited by applicant]
US 20200167163A1 · Levenstein · 2020 [cited by applicant]
US 20210240476A1 · Kountanis · 2021 [cited by applicant]
US 20220113976A1 · Microsoft · 2022 [cited by applicant]
US 20220121446A1 · Mcdonald · 2022 [cited by applicant]
US 20230244495A1 · Schuchman et al. · 2023 [cited by applicant]
CN 102156634A · 2011 [cited by applicant]
CN 104423929 · 2017 [cited by applicant]
CN 110321160 · 2019 [cited by applicant]
CN 113383320 · 2021 [cited by applicant]
CN 114637537A · 2022 [cited by applicant]
EP 0381444B1 · 1999 [cited by applicant]
EP 2063355 · 2017 [cited by applicant]
JP 2002182906 · 2002 [cited by applicant]
JP 6273718 · 2018 [cited by applicant]
KR 20010075258 · 2001 [cited by applicant]
WO 2009066063 · 2009 [cited by applicant]
WO 2017072615 · 2017 [cited by applicant]
Daniel A. Jimenez and Calvin Lin, “Branch Path Re-Aliasing”, Proceedings of the 4th Workshop on Feedback Directed and Dynamic Optimization (FDDO-4), pp. 1-10 (Year: 2001). [cited by examiner]
International Preliminary Report on Patentability from International Application No. PCT/US2023/011993, dated Aug. 15, 2024, pp. 1-6. [cited by applicant]
A. Seznec, et. al., “A case for (partially) TAggged GEometric history length branch prediction”, Retrieved from https://jilp.org/vol8/v8paper1.pdf, 2006 AI Access Foundation and Morgan Kaufmann Publishers, pp. 1-23. [cited by applicant]
A. Seznec, “A 256 Kbits L-TAGE branch predictor”, Retrieved from https://www.irisa.fr/caps/people/seznec/L-TAGE.pdf, Journal of Instruction-Level Parallelism (JILP) Special Issue: The Second Championship Branch Predicti… [cited by applicant]
Biswa, “Lecture-10 (Branch Prediction) CS422-Spring 2018”, Retrieved from https://www.cse.iitk.ac.in/users/biswap/CS422/L10-BP.pdf, 2018, pp. 1-16. [cited by applicant]
U.S. Appl. No. 18/358,890, filed Jul. 25, 2023, Duggal, et al. [cited by applicant]
U.S. Appl. No. 18/358,894, filed Jul. 25, 2023, Al-Otoom et al. [cited by applicant]
International Search Report and Written Opinion from PCT/US2023/011993, dated May 24, 2023, pp. 1-12. [cited by applicant]
U.S. Appl. No. 17/590,722, filed Feb. 1, 2022, Schuchman et al. [cited by applicant]
Allowance from Chinese Patent Application No. 202380019404.2, dated Januar 13, 2025, pp. 1-4. [cited by applicant]
First Examination Report from Indian Patent Application No. 202417055060, dated Feb. 11, 2026, pp. 1-7. [cited by applicant]
U.S. Appl. No. 19/542,518, filed Feb. 17, 2026, Al-Otoom et al. [cited by applicant]
Notice of Preliminary Rejection from Korean Patent App. 10-2026-7005452, dated Apr. 14, 2026, pp. 1-5. [cited by applicant]