IP Library › Granted Patent US 12,204,908
Granted Patent B2
US 12,204,908 · App. 15/997,344 · Granted Jan 21, 2025

Storing incidental branch predictions to reduce latency of misprediction recovery

Inventors: Marius Evers (Santa Clara, CA); Douglas Williams (Santa Clara, CA); Ashok T. Venkatachar (Santa Clara, CA); Sudherssen Kalaiselvan (Santa Clara, CA)
Assignee: Advanced Micro Devices, Inc.
G06F9/3806G06F9/30058G06F9/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,204,908
App. No.
15/997,344
Granted
Jan 21, 2025
Kind
B2
Abstract

A branch predictor predicts a first outcome of a first branch in a first block of instructions. Fetch logic fetches instructions for speculative execution along a first path indicated by the first outcome. Information representing a remainder of the first block is stored in response to the first predicted outcome being taken. In response to the first branch instruction being not taken, the branch predictor is restarted based on the remainder block. In some cases, entries corresponding to second blocks along speculative paths from the first block are accessed using an address of the first block as an index into a branch prediction structure. Outcomes of branch instructions in the second blocks are concurrently predicted using a corresponding set of instances of branch conditional logic and the predicted outcomes are used in combination with the remainder block to restart the branch predictor in response to mispredictions.

Claims (36)

1. An apparatus comprising:

a branch predictor configured to predict a first outcome of a first branch instruction in a first block of instructions and to predict a second outcome for a remainder block of the first block of instructions;

an alternate prediction storage array in the branch predictor to selectively store the second outcome by:

storing the second outcome in response to the first outcome being taken, and

not storing the second outcome in response to the first outcome being not taken; and

fetch logic to, in response to the first outcome being a predicted to be taken and an actual outcome of the first branch instruction being not taken, restart the branch predictor based on the second outcome.

2. The apparatus of claim 1 , wherein the branch predictor is configured to concurrently predict the first outcome of the first branch instruction and the second outcome, wherein the second outcome is for a second branch instruction in the remainder block of the first block of instructions.

3. The apparatus of claim 2 , wherein the branch predictor is restarted to begin branch prediction at a second block identified by one of:

a target address of a second branch instruction in response to the second outcome indicating that the second branch instruction is taken; and

an address of an instruction subsequent to the second branch instruction in response to the second outcome indicating that the second branch instruction is not taken and the first block including at least one third branch instruction.

4. The apparatus of claim 2 , wherein the first block does not include a second branch instruction until a subsequent memory boundary, and wherein the remainder block of the first block includes information indicating that the first block does not include the second branch instruction until the subsequent memory boundary.

5. The apparatus of claim 4 , wherein the branch predictor is configured to restart at the subsequent memory boundary indicated in the remainder block of the first block.

6. The apparatus of claim 1 , further comprising:

a branch prediction structure configured to store a set of entries corresponding to a set of second blocks along speculative paths from the first block, wherein the branch predictor is configured to access the branch prediction structure using an address of the first block as an index.

7. The apparatus of claim 1 , wherein, in response to the first outcome not being mispredicted, processing the first block of instructions.

8. A method comprising:

predicting, at a branch predictor, a first outcome of a first branch instruction in a first block of instructions and a second outcome for a remainder block of the first block of instructions;

selectively storing, in an alternate prediction storage array in the branch predictor, the second outcome, wherein selectively storing the second outcome comprises storing the second outcome in the alternate prediction storage array in response to the first outcome being taken, and

not storing the second outcome in the alternate prediction storage array in response to the first outcome being not taken; and

in response to the first branch instruction being predicted to be taken and an actual outcome of the first branch instruction being not taken, restarting the branch predictor based on the second outcome.

9. The method of claim 8 , wherein selectively storing the second outcome comprises storing information indicating that the first block does not include any branch instructions until a subsequent memory boundary.

10. The method of claim 8 , wherein multiple copies of branch predictor conditional logic are instantiated to concurrently predict outcomes of branch instructions in the first block of instructions.

11. The method of claim 8 , further comprising:

responsive to the first outcome not being mispredicted, processing the first block of instructions.

12. The method of claim 8 , further comprising:

concurrently predicting the first outcome of the first branch instruction and the second outcome, wherein the second outcome is for a second branch instruction in the first block of instructions.

13. The method of claim 12 ,

wherein restarting the branch predictor comprises restarting the branch predictor to begin branch prediction at a second block identified by one of:

a target address of a second branch instruction in the remainder block of the first block of instructions in response to the second outcome indicating that the second branch instruction is taken; and

an address of an instruction subsequent to the second branch instruction in response to the second outcome indicating that the second branch instruction is not taken and the first block including at least one third branch instruction.

14. The method of claim 8 , wherein the first block does not include a second branch instruction prior to a subsequent memory boundary, and wherein the remainder block includes information indicating that the first block does not include the second branch instruction prior to the subsequent memory boundary.

15. The method of claim 14 ,

wherein restarting the branch predictor comprises restarting the branch predictor at the subsequent memory boundary indicated in the remainder block.

16. The method of claim 8 , further comprising:

accessing information in a branch prediction structure using an address of the first block as an index, wherein the information comprises a set of entries corresponding to a set of second blocks along speculative paths from the first block.

17. The method of claim 8 , wherein selectively storing the second outcome comprises storing information associated with the remainder block including information indicating the second outcome and a location of an end of the remainder block.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 5, 2018
From: EVERS, MARIUS; WILLIAMS, DOUGLAS; VENKATACHAR, ASHOK T.; KALAISELVAN, SUDHERSSEN
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 045994/0118 →
Continuity (1)
Related Publication 20190369999A1 · Dec 5, 2019
References Cited (58)
US 4991080A · Emma · 1991 [cited by examiner]
US 5353421A · Emma et al. · 1994 [cited by applicant]
US 5848433A · Tran · 1998 [cited by examiner]
US 5903750A · Yeh · 1999 [cited by examiner]
US 6502188B1 · Zuraski, Jr. · 2002 [cited by examiner]
US 6976156B1 · Nguyen · 2005 [cited by examiner]
US 7620804B2 · Kuo · 2009 [cited by examiner]
US 8578140B2 · Yokoi · 2013 [cited by examiner]
US 20020073301A1 · Kahle · 2002 [cited by applicant]
US 20040034762A1 · Kacevas · 2004 [cited by applicant]
US 20050050309A1 · Yamashita et al. · 2005 [cited by applicant]
US 20050223200A1 · Tremblay · 2005 [cited by examiner]
US 20050268075A1 · Caprioli et al. · 2005 [cited by applicant]
US 20070101110A1 · Kishore et al. · 2007 [cited by applicant]
US 20070204137A1 · Tran · 2007 [cited by applicant]
US 20080004670A1 · McVenes et al. · 2008 [cited by applicant]
US 20080077781A1 · Smith · 2008 [cited by examiner]
US 20080162908A1 · Luick · 2008 [cited by applicant]
US 20080209190A1 · Bhargava · 2008 [cited by examiner]
US 20090063819A1 · Doing et al. · 2009 [cited by applicant]
US 20090193231A1 · Gschwind et al. · 2009 [cited by applicant]
US 20090210683A1 · Caprioli · 2009 [cited by applicant]
US 20110225401A1 · Emma · 2011 [cited by examiner]
US 20130117535A1 · Venkumahanti · 2013 [cited by examiner]
US 20130198490A1 · Tran et al. · 2013 [cited by applicant]
US 20140201508A1 · Busaba et al. · 2014 [cited by applicant]
US 20160034280A1 · Bonanno · 2016 [cited by examiner]
US 20170083333A1 · Choudhary · 2017 [cited by examiner]
US 20170090935A1 · Falsafi · 2017 [cited by examiner]
US 20170123797A1 · Friedmann et al. · 2017 [cited by applicant]
US 20170262287A1 · Abdallah · 2017 [cited by examiner]
US 20190303161A1 · Nassi et al. · 2019 [cited by applicant]
US 20200201651A1 · Jumani et al. · 2020 [cited by applicant]
CN 107102845 · 2017 [cited by applicant]
Seznec et al., “Effective ahead pipelining of instruction block address generation,” 30th AISCA, 2003. Proceedings, pp. 241-252, Retrieved from the internet on Dec. 19, 2019 at <https://ieeexplore.ieee.org/document/1207… [cited by examiner]
International Search Report and Written Opinion mailed Sep. 4, 2019 for International Application No. PCT/US2019/033511, 11 pages. [cited by applicant]
Seznec, Andre, et al., “Effective Ahead Pipelining of Instruction Block Address Generation”, 30th Annual International Symposium on Computer Architecture, Jun. 9-11, 2003, San Diego, CA, 12 pages. [cited by applicant]
Seznec, Andre, et al., “Multiple-Block Ahead Branch Predictors”, Institute National de Recherche en Informatique et en Automatique, No. 2825, Mar. 1996, 30 pages. [cited by applicant]
U.S. Appl. No. 17/012,833, filed Sep. 4, 2020 listing Venkatachar, Ashok T. as first inventor, entitled, “Alternate Path for Branch Prediction Redirect,”, 50 pages. [cited by applicant]
Seznec, Andre, “A 256 Kbits L-TAGE branch predictor”, IRISA/INRIA/HIPEAC, 6 pages. [cited by applicant]
International Preliminary Report on Patentability issued Dec. 17, 2020 in Application No. PCT/US2019/033511, 8 pages. [cited by applicant]
Non-Final Office Action mailed Jun. 23, 2021 in U.S. Appl. No. 17/012,833. [cited by applicant]
Final Office Action mailed Nov. 15, 2021 for U.S. Appl. No. 17/012,833, 11 pages. [cited by applicant]
International Search Report and Written Opinion mailed Dec. 9, 2021 for PCT/US2021/047705, 10 pages. [cited by applicant]
Extended European Search Report mailed Jan. 24, 2022 for 19814382.8, 9 pages. [cited by applicant]
Final Office Action issued in U.S. Appl. No. 17/012,833, mailed Sep. 4, 2022, 9 pages. [cited by applicant]
Non-Final Office Action issued in U.S. Appl. No. 17/012,833 mailed Jun. 8, 2022, 8 pages. [cited by applicant]
Non-Final Office Action mailed Jun. 8, 2022 for U.S. Appl. No. 17/012,833, 8 pages. [cited by applicant]
Office Action mailed Sep. 7, 2022 for Indian Application No. 202017052859, 7 pages. [cited by applicant]
International Preliminary Report on Patentability issued in Application No. PCT/US2021/047705, mailed Mar. 16, 2023, 7 Pages. [cited by applicant]
Office Action issued in Japanese Application No. 2020-567762, mailed Dec. 19, 2023, 5 pages. [cited by applicant]
Japanese Office Action issued in Application No. 2020-567762, mailed Jun. 20, 2023, 10 pages. [cited by applicant]
Non-Final Office Action issued in U.S. Appl. No. 17/012,833, mailed Oct. 12, 2023, 18 pages. [cited by applicant]
Final Office Action issued in U.S. Appl. No. 17/012,833, mailed Mar. 12, 2024, 22 pages. [cited by applicant]
Office Action issued in European Application No. 19814382.8, mailed Mar. 11, 2024, 5 pages. [cited by applicant]
Office Action issued in Korean Application No. 10-2021-7000083, mailed Jul. 18, 2024, 6 pages. [cited by applicant]
Office Action issued in European Application No. 19814382.8, mailed Nov. 26, 2024, 5 pages. [cited by applicant]
Office Action issued in Chinese Application No. 201980046035, mailed Oct. 24, 2024, 6 pages. [cited by applicant]