IP Library › Granted Patent US 12,379,929
Granted Patent B2
US 12,379,929 · App. 18/412,504 · Granted Aug 5, 2025

Branch prediction using loop iteration count

Inventors: Kai Chirca (Dallas, TX); Paul Daniel Gauvreau (Plano, TX); David Edward Smith, Jr. (Allen, TX)
Assignee: TEXAS INSTRUMENTS INCORPORATED
G06F9/325G06F9/3806G06F9/3846
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,379,929
App. No.
18/412,504
Granted
Aug 5, 2025
Kind
B2
Abstract

An integrated circuit comprising instruction processing circuitry for processing a plurality of program instructions and instruction prediction circuitry. The instruction prediction circuitry comprises circuitry for detecting successive occurrences of a same program loop sequence of program instructions. The instruction prediction circuitry also comprises circuitry for predicting a number of iterations of the same program loop sequence of program instructions, in response to detecting, by the circuitry for detecting, that a second occurrence of the same program loop sequence of program instructions comprises a same number of iterations as a first occurrence of the same program loop sequence of program instructions.

Claims (53)

1. A device comprising:

an instruction pipeline;

a program counter coupled to the instruction pipeline and configured to store a value; and

a branch predictor coupled to the program counter and configured to:

determine that the value corresponds to a beginning of a hyperblock loop by performing a first comparison of the value with a first data set;

in response to the value corresponding to the beginning of the hyperblock loop, determine that a second data set characterizing the hyperblock loop is stored in a memory by performing a second comparison of the value with the second data set, wherein the second data set is different from the first data set; and

predict a number of iterations for the hyperblock loop based on the second data set.

2. The device of claim 1 , wherein the branch predictor is configured to:

determine that the second data set characterizing the hyperblock loop is valid; and

predict the number of iterations in response to determining that the second data set characterizing the hyperblock loop is valid.

3. The device of claim 2 , wherein the branch predictor is configured to determine that the second data set is valid based on a bit stored in the memory.

4. The device of claim 1 , wherein to determine that the second data set is stored in the memory, the branch predictor is configured to match the value to an entry stored the memory.

5. The device of claim 1 , wherein the branch predictor is configured to predict the number of iterations based on a count stored in the memory.

6. The device of claim 1 , wherein the instruction pipeline is configured to process instructions of the hyperblock loop for the number of iterations predicted by the branch predictor.

7. The device of claim 1 , wherein the branch predictor is configured to:

determine that no data set characterizing the hyperblock loop is stored in the memory; and

store a new data set characterizing the hyperblock loop to the memory.

8. The device of claim 7 , wherein the branch predictor is configured to:

determine a count of iterations processed by the instruction pipeline; and

store the count of iterations as part of the new data set in the memory.

9. The device of claim 1 , wherein the branch predictor is configured to determine that the value corresponds to the beginning of the hyperblock loop by at least:

determining that the value corresponds to a beginning of a hyperblock; and

determining that the hyperblock is the hyperblock loop in response to determining that the value corresponds to the beginning of the hyperblock.

10. The device of claim 1 ,

wherein the memory is a buffer in the branch predictor, and

wherein the branch predictor is configured to determine that the second data set is stored in a branch target buffer.

11. A method comprising:

determining that a value stored in a program counter corresponds to a beginning of a hyperblock loop by comparing the value with a first data set;

determining that a second data set characterizing the hyperblock loop is stored in a memory by comparing the value with the second data set, wherein the second data set is different from the first data set; and

predicting a number of iterations for the hyperblock loop based on the second data set.

12. The method of claim 11 , further comprising determining that the second data set characterizing the hyperblock loop is valid,

wherein predicting the number of iterations in response to determining that the second data set characterizing the hyperblock loop is valid.

13. The method of claim 12 , wherein determining that the second data set is valid is based on a bit stored in the memory.

14. The method of claim 11 , wherein determining that the second data set is stored in the memory comprises matching the value to an entry stored the memory.

15. The method of claim 11 , wherein predicting the number of iterations is based on a count stored in the memory.

16. The method of claim 11 , further comprising processing instructions of the hyperblock loop for the predicted number of iterations.

17. The method of claim 11 , further comprising:

determining that a second value stored in the program counter corresponds to a beginning of a second hyperblock loop;

determining that no data set characterizing the second hyperblock loop is stored in the memory; and

storing a new data set characterizing the second hyperblock loop to the memory.

18. The method of claim 17 , further comprising:

determining a count of iterations processed by an instruction pipeline; and

storing the count of iterations as part of the new data set in the memory.

19. The method of claim 11 , wherein determining that the value corresponds to the beginning of the hyperblock loop comprises:

determining that the value corresponds to a beginning of a hyperblock; and

determining that the hyperblock is the hyperblock loop in response to determining that the value corresponds to the beginning of the hyperblock.

20. A device comprising:

a program counter configured to store a value;

a memory; and

a branch predictor coupled to the program counter, and configured to:

determine that the value corresponds to a hyperblock loop by comparing the value with a first data set;

determine that a second data set characterizing the hyperblock loop is stored in the memory by at least matching the value to an entry in the second data set stored in the memory, wherein the second data set is different from the first data set; and

predict a number of iterations for the hyperblock loop based on the second data set.

Continuity (4)
Continuation 17578516 · Jan 19, 2022
Continuation 16888783 · May 31, 2020
Provisional Application 62855468 · May 31, 2019
Related Publication 20240152360A1 · May 9, 2024
References Cited (23)
US 5909573A · Sheaffer · 1999 [cited by applicant]
US 5951679A · Anderson et al. · 1999 [cited by applicant]
US 9996358B2 · Falsafi et al. · 2018 [cited by applicant]
US 10275249B1 · Richins · 2019 [cited by applicant]
US 20070113059A1 · Tran · 2007 [cited by applicant]
US 20070220239A1 · Dieffenderfer · 2007 [cited by examiner]
US 20150121050A1 · Williams et al. · 2015 [cited by applicant]
US 20160092230A1 · Chen · 2016 [cited by examiner]
US 20160132331A1 · Godard · 2016 [cited by applicant]
US 20160139933A1 · Srikantaiah · 2016 [cited by applicant]
US 20180349144A1 · Pal · 2018 [cited by applicant]
US 20200050458A1 · Bouzguarrou · 2020 [cited by examiner]
US 20200065111A1 · Bouzguarrou · 2020 [cited by examiner]
US 20200089498A1 · Annamalai · 2020 [cited by applicant]
US 20200364052A1 · Chinchole · 2020 [cited by applicant]
CN 101401065A · 2009 [cited by applicant]
CN 107077335A · 2017 [cited by applicant]
International Search Report for PCT/US2020/035567 dated Sep. 17, 2020. [cited by applicant]
Nitya Ranganathan, et al., “Combining Hyperblocks and Exit Prediction to Increase Front-End Bandwidth and Performance: Department of Computer Sciences Technical Report TR-02-41”, Department of Computer Sciences the Univ… [cited by applicant]
Gou Pengfei, Yang Bing, Yu Mingyan, Mao Zhigang, “Novel O-GEHL Based Hyperblock Predictor for EDGE Architectures”, IEEE, pp. 172-180 (Year: 2012). [cited by applicant]
Ming Cong, Hong An, Yongqing Ren, Canming Zhao, Jun Zhang, “A feasibility study on hyperblock-based aggressive speculative execution model”, IEEE, pp. 119-123 (Year: 2009). [cited by applicant]
Karthikeyan Sankaralingam, Ramadass Nagarajan, Haiming Liu, Changkyu Kim, Jaehyuk Huh, Doug Burger, Stephen W. Keckler and Charles R. Moore, “Exploiting ILP, TLP, and DLP with the Polymorphous TRIPS Architecture”, June,… [cited by applicant]
Chinese Office Action for Corresponding Application No. 202080036967.9, mailed May 16, 2025. [cited by applicant]