IP Library Granted Patent US 11,928,472
Granted Patent B2
US 11,928,472 · App. 17/033,771 · Granted Mar 12, 2024

Branch prefetch mechanisms for mitigating frontend branch resteers

Inventors: Gilles Pokam (Livermore, CA); Jared Warner Stark, IV (Portland, OR); Niranjan Kumar Soundararajan (Bengaluru, IN); Oleg Ladin (Kaliningrad, RU)
Assignee: Intel Corporation
G06F9/3806G06F9/3802G06F9/3814G06F9/382G06F9/383G06F9/3844G06F12/0875G06F9/30145G06F2212/452
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,928,472
App. No.
17/033,771
Granted
Mar 12, 2024
Kind
B2
Abstract

Methods and apparatus relating to branch prefetch mechanisms for mitigating front-end branch resteers are described. In an embodiment, predecodes an entry in a cache to generate a predecoded branch operation. The entry is associated with a cold branch operation, where the cold branch operation corresponds to an operation that is detected for a first time after storage in an instruction cache and wherein the cold branch operation remains undecoded since it is stored at a location in a cache line prior to a subsequent location of a branch operation in the cache line. The predecoded branch operation is stored in a Branch Prefetch Buffer (BPB) in response to a cache line fill operation of the cold branch operation in an instruction cache. Other embodiments are also disclosed and claimed.

Claims (26)

1. An apparatus comprising:

predecode circuitry to predecode an entry in a cache to generate a predecoded branch operation, the entry being associated with a cold branch operation, wherein the cold branch operation corresponds to an operation that is detected for a first time after storage in an instruction cache and wherein the cold branch operation remains undecoded since it is stored at a location in a cache line prior to a subsequent location of a branch operation in the cache line; and

a Branch Prefetch Buffer (BPB) to store the predecoded branch operation in response to a cache line fill operation of the cold branch operation in an instruction cache.

2. The apparatus of claim 1 , wherein the predecode circuitry is to predecode one or more entries of the cache starting with a byte immediately preceding a first byte of an entry address.

3. The apparatus of claim 2 , wherein the predecode circuitry is to predecode the one or more entries of the cache in two phases.

4. The apparatus of claim 3 , wherein the two phases comprise a first phase to calculate a length of an instruction corresponding to the cold branch operation and a second phase to mark a first byte of the instruction corresponding to the cold branch operation in reverse order starting with the byte immediately preceding the first byte of the entry address.

5. The apparatus of claim 1 , wherein the BPB is coupled to a Branch Target Buffer (BTB), wherein the BTB is to store information corresponding to one or more branches taken and their target addresses.

6. The apparatus of claim 5 , wherein upon a miss for a request directed to the BTB, the request is to be serviced by the BPB.

7. The apparatus of claim 5 , where upon a hit for a request directed to the BPB, a corresponding BPB entry is to be stored in the BTB.

8. The apparatus of claim 1 , wherein the BPB and a Branch Target Buffer (BTB) are to be looked up in parallel in response to a lookup request.

9. The apparatus of claim 1 , wherein the cache comprises a Mid-Level Cache (MLC) or a Level 2 (L2) cache.

10. The apparatus of claim 1 , wherein the predecoded branch operation is to be stored in the instruction cache.

11. The apparatus of claim 1 , wherein the cache line is stored in the cache.

12. The apparatus of claim 1 , wherein the BPB is to store 192 entries.

13. The apparatus of claim 1 , wherein the BPB is to allocate a maximum of three cold branches in response to the cache line fill operation in the instruction cache.

14. The apparatus of claim 1 , wherein a processor, having one or more processor cores, comprises one or more of the predecode circuitry, the BPB, and a Branch Target Buffer (BTB).

15. The apparatus of claim 14 , wherein the processor comprises a Graphics Processing Unit (GPU), having one or more graphics processing cores.

16. A system comprising:

memory to store one or more instructions;

a processor, having one or more cores, to execute the one or more instructions;

predecode circuitry to predecode an entry in a cache to generate a predecoded branch operation, the entry being associated with a cold branch operation, wherein the cold branch operation corresponds to an operation that is detected for a first time after storage in an instruction cache and wherein the cold branch operation remains undecoded since it is stored at a location in a cache line prior to a subsequent location of a branch operation in the cache line; and

a Branch Prefetch Buffer (BPB) to store the predecoded branch operation in response to a cache line fill operation of the cold branch operation in an instruction cache.

17. The system of claim 16 , wherein the predecode circuitry is to predecode one or more entries of the cache starting with a byte immediately preceding a first byte of an entry address.

18. The system of claim 17 , wherein the predecode circuitry is to predecode the one or more entries of the cache in two phases.

19. The system of claim 18 , wherein the two phases comprise a first phase to calculate a length of an instruction corresponding to the cold branch operation and a second phase to mark a byte in reverse order starting with the byte immediately preceding the first byte of the entry address.

20. The system of claim 16 , wherein the BPB is coupled to a Branch Target Buffer (BTB), wherein the BTB is to store information corresponding to one or more branches taken and their target addresses.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 14, 2021
From: POKAM, GILLES; STARK, JARED WARNER, IV; SOUNDARARAJAN, NIRANJAN KUMAR; LADIN, OLEG
To: INTEL CORPORATION
Reel/Frame 055915/0693 →
Continuity (1)
Related Publication 20220100520A1 · Mar 31, 2022
Cited By (1)
US 12,645,463