IP Library › Granted Patent US 11,182,166
Granted Patent B2
US 11,182,166 · App. 16/561,004 · Granted Nov 23, 2021

Branch prediction throughput by skipping over cachelines without branches

Inventors: Madhu Saravana Sibi Govindan (Austin, TX); Fuzhou Zou (Austin, TX); Anhdung Ngo (Austin, TX); Wichaya Top Changwatchai (Austin, TX); Monika Tkaczyk (Austin, TX); Gerald David Zuraski, Jr. (Austin, TX)
G06F9/3842G06F9/3806G06F9/3816G06F9/4881G06F9/544
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,182,166
App. No.
16/561,004
Granted
Nov 23, 2021
Kind
B2
Abstract

According to one general aspect, an apparatus may include a branch prediction circuit configured to predict if a branch instruction will be taken or not. The apparatus may include a branch target buffer circuit configured to store a memory segment empty flag that indicates whether or not the memory segment after a target address includes at least one other branch instruction, wherein the memory segment empty flag was created during a commit stage of a prior occurrence of the branch instruction. The branch prediction circuit may be configured to skip over the memory segment if the memory segment empty flag indicates a lack of other branch instruction(s).

Claims (46)

1. An apparatus comprising:

a branch prediction circuit configured to predict that a branch instruction will be taken; and

a return address stack circuit configured to store a memory segment empty flag that indicates that a memory segment after a return address does not include at least one other branch instruction;

determine that a physical address translation for a next memory segment and a following sequential memory segment are available; and

wherein the branch prediction circuit is configured to skip over the memory segment associated with the memory segment empty flag that indicates a lack of at least one other branch instruction.

2. The apparatus of claim 1 , wherein the branch prediction circuit is configured to:

determine that a next memory segment is stored within an instruction cache and the return address stack circuit; and

skip over the memory segment that the memory segment empty flag indicates a lack of branch instructions.

3. The apparatus of claim 1 , wherein the branch prediction circuit is configured to, for a memory segment that includes at least one other branch instruction after a return address, move to a next instruction within the memory segment.

4. The apparatus of claim 1 , wherein the memory segment is a cacheline.

5. The apparatus of claim 1 , wherein the branch prediction circuit is configured to determine if the branch instruction is one of a call instruction or a return instruction.

6. The apparatus of claim 5 , further comprising a branch target buffer circuit configured to store the memory segment empty flag for a target address; and

wherein, in response to the branch instruction being a call instruction, the apparatus is configured to:

determine that the memory segment after an associated return instruction includes at least one other branch instruction, and

store a result of the determination as a memory segment empty flag within the return address stack circuit.

7. The apparatus of claim 5 , wherein branch target buffer circuit is further configured to store a second memory segment empty flag that indicates or not that the memory segment after a target return address does not include at least one other branch instruction, wherein the memory segment empty flag was created during a commit stage of a prior occurrence of the branch instruction.

8. The apparatus of claim 1 , wherein the branch prediction circuit is configured to:

proceed to skip over the memory segment that the memory segment empty flag indicates a lack of branch instructions.

9. The apparatus of claim 1 , wherein the branch detection circuit is configured to, in response to the current instruction not being a branch instruction, determine that a previously stored last committed branch instruction is still valid.

10. The apparatus of claim 9 , further comprising

a branch target buffer circuit configured to store:

a branch instruction address, and

a memory segment empty flag that indicates whether a portion of the memory segment after a target address includes at least one branch instruction; and

wherein the branch detection circuit is configured to, in response to the current instruction not being a branch instruction and the previously stored last committed branch instruction being still valid, set, in the branch target buffer circuit, a memory segment empty flag associated with the previously stored last committed branch instruction.

11. The apparatus of claim 9 , wherein the branch detection circuit is configured to, if the current instruction is not a branch instruction and the previously stored last committed branch instruction is not valid, mark the previously stored last committed branch instruction as not valid.

12. The apparatus of claim 1 , wherein the branch target buffer includes a graph-based branch target buffer circuit.

13. The apparatus of claim 1 , wherein the memory segment empty flag that indicates a number of memory segments, or portions thereof, after the branch instruction address that do not include at least one other branch instruction.

14. An apparatus comprising:

a branch detection circuit configured to detect, during a commit stage of a current instruction, wherein the commit stage includes a pipeline stage in which the apparatus determines that an instruction and the instruction's results will be kept, an existence of at least one branch instruction stored within a portion of a memory segment; and

a return address circuit configured to store:

a return address, and

a memory segment empty flag that indicates whether a portion of the memory segment after a return address includes at least one branch instruction.

15. The apparatus of claim 14 , wherein the memory segment is a cacheline.

16. The apparatus of claim 14 , wherein the apparatus comprises a commit queue circuit;

wherein the commit queue circuit is configured to store currently committing instructions in age order.

17. The apparatus of claim 14 , wherein the apparatus comprises a last committed branch memory configured to store a previously committed branch instruction.

18. The apparatus of claim 17 , wherein branch detection circuit is configured to:

determine that the current instruction is a branch instruction; and

store the current instruction in the last committed branch memory.

19. A system comprising:

a branch detection circuit configured to detect, during a commit stage of a current committing instruction, wherein the commit stage includes a pipeline stage in which the system determines that an instruction and the instruction's results will be kept, an existence or at least one branch instruction stored with a portion of a memory segment;

a branch target buffer circuit configured to store:

a branch instruction address, and

a memory segment empty flag that indicates whether a portion of the memory segment after a target address includes at least one other branch instruction; and

a branch prediction circuit configured to predict that a branch instruction will be taken, and wherein the branch prediction circuit is configured to skip over the memory segment that an associated memory segment empty flag indicates a lack of branch instructions.

20. The system of claim 19 , wherein the memory segment empty flag is only valid for taken branch instructions.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 22, 2023
From: GOVINDAN, MADHU SARAVANA SIBI; ZOU, FUZHOU; NGO, ANHDUNG; CHANGWATCHAI, WICHAYA TOP; TKACZYK, MONIKA; ZURASKI, GERALD DAVID, JR.
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 063408/0545 →
Continuity (2)
Provisional Application 62852286 · May 23, 2019
Related Publication 20200371811A1 · Nov 26, 2020