IP Library › Granted Patent US 11,645,078
Granted Patent B2
US 11,645,078 · App. 16/729,349 · Granted May 9, 2023

Detecting a dynamic control flow re-convergence point for conditional branches in hardware

Inventors: Adarsh Chauhan (Bengaluru, IN); Franck Sala (Haifa, IL); Jayesh Gaur (Bangalore, IN); Zeev Sperber (Zichron Yackov, IL); Lihu Rappoport (Haifa, IL); Adi Yoaz (Hof HaCarmel, IL); Sreenivas Subramoney (Bangalore, IN)
Assignee: Intel Corporation
G06F9/3806G06F9/30058G06F9/30145
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 11,645,078
App. No.
16/729,349
Granted
May 9, 2023
Kind
B2
Abstract

Systems, methods, and apparatuses relating to hardware for auto-predication of critical branches. In one embodiment, a processor core includes a decoder to decode instructions into decoded instructions, an execution unit to execute the decoded instructions, a branch predictor circuit to predict a future outcome of a branch instruction, and a branch predication manager circuit to disable use of the predicted future outcome for a conditional critical branch comprising the branch instruction.

Claims (44)

1. A processor core comprising:

a decoder to decode instructions into decoded instructions;

an execution unit to execute the decoded instructions;

a branch predictor circuit to predict a future outcome of a branch instruction; and

a branch predication manager circuit to disable use of the predicted future outcome, that has been generated by the branch predictor circuit, for a conditional critical branch comprising the branch instruction.

2. The processor core of claim 1 , wherein the branch predication manager circuit is to detect the conditional critical branch, and then determine a point of re-convergence for the conditional critical branch.

3. The processor core of claim 2 , further comprising an instruction fetch unit, and the branch predication manager circuit causes the instruction fetch unit to fetch instructions of both a taken portion and a not-taken portion of the conditional critical branch up to the point of re-convergence.

4. The processor core of claim 3 , wherein the branch predication manager circuit is to cause the taken portion of the conditional critical branch to be architecturally visible after detecting the branch instruction of the conditional critical branch is executed by the execution unit.

5. The processor core of claim 3 , wherein the branch predication manager circuit is to increment a counter for every mispredicted instance of the branch instruction that triggers a pipeline flush, and disable use of the predicted future outcome for the conditional critical branch comprising the branch instruction when the counter exceeds a threshold.

6. The processor core of claim 3 , wherein the branch predication manager circuit is to determine if the conditional critical branch is one of a plurality of possible convergence patterns, and cause the instruction fetch unit to fetch the instructions of both the taken portion and the not-taken portion of the conditional critical branch up to the point of re-convergence in response to the conditional critical branch being one of the plurality of possible convergence patterns.

7. The processor core of claim 1 , wherein the branch predication manager circuit is to determine that a conditional branch is the critical conditional branch when the conditional branch exceeds a minimum threshold of misprediction events in an observation window of retired instructions.

8. The processor core of claim 1 , wherein the branch predication manager circuit is to throttle disabling of the use of the predicted future outcome based at least in part on a comparison of performance for a first proper subset of a plurality of retired instances of the conditional critical branch where the branch predication manager circuit is allowed to disable use of the predicted future outcome and performance for a second proper subset of the plurality of retired instances of the conditional critical branch where the branch predication manager circuit is not allowed to disable use of the predicted future outcome.

9. A method comprising:

decoding instructions into decoded instructions with a decoder of a hardware processor;

executing the decoded instructions with an execution unit of the hardware processor;

predicting a future outcome of a branch instruction with a branch predictor circuit of the hardware processor; and

disabling use of the predicted future outcome, that has been generated by the branch predictor circuit, for a conditional critical branch comprising the branch instruction with a branch predication manager circuit of the hardware processor.

10. The method of claim 9 , further comprising detecting the conditional critical branch with the branch predication manager circuit, and then determining a point of re-convergence for the conditional critical branch with the branch predication manager circuit.

11. The method of claim 10 , further comprising causing, by the branch predication manager circuit, an instruction fetch unit of the hardware processor to fetch instructions of both a taken portion and a not-taken portion of the conditional critical branch up to the point of re-convergence.

12. The method of claim 11 , further comprising causing, by the branch predication manager circuit, the taken portion of the conditional critical branch to be architecturally visible after detecting the branch instruction of the conditional critical branch is executed by the execution unit.

13. The method of claim 11 , further comprising:

incrementing a counter for every mispredicted instance of the branch instruction that triggers a pipeline flush; and

disabling use of the predicted future outcome for the conditional critical branch comprising the branch instruction when the counter exceeds a threshold.

14. The method of claim 11 , further comprising:

determining, by the branch predication manager circuit, if the conditional critical branch is one of a plurality of possible convergence patterns, and

causing the instruction fetch unit to fetch the instructions of both the taken portion and the not-taken portion of the conditional critical branch up to the point of re-convergence in response to the conditional critical branch being one of the plurality of possible convergence patterns.

15. The method of claim 9 , further comprising determining, by the branch predication manager circuit, that a conditional branch is the critical conditional branch when the conditional branch exceeds a minimum threshold of misprediction events in an observation window of retired instructions.

16. The method of claim 9 , further comprising throttling disabling of the use of the predicted future outcome, by the branch predication manager circuit, based at least in part on a comparison of performance for a first proper subset of a plurality of retired instances of the conditional critical branch where the branch predication manager circuit is allowed to disable use of the predicted future outcome and performance for a second proper subset of the plurality of retired instances of the conditional critical branch where the branch predication manager circuit is not allowed to disable use of the predicted future outcome.

17. A non-transitory machine readable medium that stores program code that when executed by a machine causes the machine to perform a method comprising:

decoding instructions into decoded instructions with a decoder of a hardware processor;

executing the decoded instructions with an execution unit of the hardware processor;

predicting a future outcome of a branch instruction with a branch predictor circuit of the hardware processor; and

disabling use of the predicted future outcome, that has been generated by the branch predictor circuit, for a conditional critical branch comprising the branch instruction with a branch predication manager circuit of the hardware processor.

18. The non-transitory machine readable medium of claim 17 , further comprising detecting the conditional critical branch with the branch predication manager circuit, and then determining a point of re-convergence for the conditional critical branch with the branch predication manager circuit.

19. The non-transitory machine readable medium of claim 18 , further comprising causing, by the branch predication manager circuit, an instruction fetch unit of the hardware processor to fetch instructions of both a taken portion and a not-taken portion of the conditional critical branch up to the point of re-convergence.

20. The non-transitory machine readable medium of claim 19 , further comprising causing, by the branch predication manager circuit, the taken portion of the conditional critical branch to be architecturally visible after detecting the branch instruction of the conditional critical branch is executed by the execution unit.

21. The non-transitory machine readable medium of claim 19 , further comprising:

incrementing a counter for every mispredicted instance of the branch instruction that triggers a pipeline flush; and

disabling use of the predicted future outcome for the conditional critical branch comprising the branch instruction when the counter exceeds a threshold.

22. The non-transitory machine readable medium of claim 19 , further comprising:

determining, by the branch predication manager circuit, if the conditional critical branch is one of a plurality of possible convergence patterns, and

causing the instruction fetch unit to fetch the instructions of both the taken portion and the not-taken portion of the conditional critical branch up to the point of re-convergence in response to the conditional critical branch being one of the plurality of possible convergence patterns.

23. The non-transitory machine readable medium of claim 17 , further comprising determining, by the branch predication manager circuit, that a conditional branch is the critical conditional branch when the conditional branch exceeds a minimum threshold of misprediction events in an observation window of retired instructions.

24. The non-transitory machine readable medium of claim 17 , further comprising throttling disabling of the use of the predicted future outcome, by the branch predication manager circuit, based at least in part on a comparison of performance for a first proper subset of a plurality of retired instances of the conditional critical branch where the branch predication manager circuit is allowed to disable use of the predicted future outcome and performance for a second proper subset of the plurality of retired instances of the conditional critical branch where the branch predication manager circuit is not allowed to disable use of the predicted future outcome.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNOR'S NAME FROM GUAR, JAYESH TO GAUR, JAYESH PREVIOUSLY RECORDED AT REEL: 051681 FRAME: 0835. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Mar 10, 2020
From: CHAUHAN, ADARSH; SALA, FRANCK; GAUR, JAYESH; SPERBER, ZEEV; RAPPOPORT, LIHU; YOAZ, ADI; SUBRAMONEY, SREENIVAS
To: INTEL CORPORATION
Reel/Frame 052137/0612 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 23, 2020
From: CHAUHAN, ADARSH; SALA, FRANCK; GUAR, JAYESH; SPERBER, ZEEV; RAPPOPORT, LIHU; YOAZ, ADI; SUBRAMONEY, SREENIVAS
To: INTEL CORPORATION
Reel/Frame 051681/0835 →
Continuity (2)
Provisional Application 62876463 · Jul 19, 2019
Related Publication 20210019149A1 · Jan 21, 2021
Cited By (1)
US 12,645,463