# US 2020/0004536 A1 · Systems and methods to predict load data values

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0004536 A1
- Document ID: US20200004536A1
- Status: Published application
- Kind: A1
- Application number: 16/023,407
- Filed: 2018-06-29
- Published: 2020-01-02
- Earliest claimed: 2018-06-29
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Manjunath SHEVGOOR; Mark J. DECHENE; Stanislav SHWARTSMAN; Pavel I. KRYUKOV
- Web page: https://patentgrep.com/patent/US20200004536A1

## CPC

- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/3832: {Value prediction for operands; operand history buffers}
- G06F 9/30098: {Register arrangements}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3838: {Dependency mechanisms, e.g. register scoreboarding}
- G06F 9/3854: {Instruction completion, e.g. retiring, committing or graduating}
- G06F 9/3858: {Result writeback, i.e. updating the architectural state or memory}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F 9/3867: {using instruction pipelines}
- G06F 12/1027: using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed embodiments relate to predicting load data. In one example, a processor a pipeline having stages ordered as fetch, decode, allocate, write back, and commit, a training table to store an address, predicted data, a state, and a count of instances of unchanged return data, and tracking circuitry to determine, during one or more of the allocate and decode stages, whether a training table entry has a first state and matches a fetched first load instruction, and, if so, using the data predicted by the entry during the execute stage, the tracking circuitry further to update the training table during or after the write back stage to set the state of the first load instruction in the training table to the first state when the count reaches a first threshold.

## Claims

### Claim 1

A processor comprising:
fetch and decode circuitry to fetch and decode load instructions;
a pipeline having stages ordered as fetch, decode, allocate, write back, and commit;
a training table to store, for each of a plurality of load instructions, an address, predicted data, a state, and a count of instances of unchanged return data; and
tracking circuitry to determine, during one or more of the allocate and decode stages, whether a training table entry has a first state and matches a fetched first load instruction, and, if so, using the data predicted by the entry during the execute stage, the tracking circuitry further to update the training table during or after the write back stage by:
when no match exists, adding a new entry reflecting the first load instruction; when a match exists, but has different predicted data than the data returned for the first load instruction, reset the count and set the state to a second state; and
when a matching entry with matching predicted data exists, increment the count and, when the incremented count reaches a first threshold, set the state to the first state.

### Claim 2 (depends on 1)

The processor of claim 1, wherein, when the predicted data is used to optimize execution during the execute stage, the processor is further to await receipt of actual load data for the first load instruction, confirm whether the actual load data matches the predicted data, when a match is confirmed, accept results of executing the first load instruction and cause the first load instruction to be committed during the commit stage, and, otherwise, discard the optimized execution results and cause the first load instruction to be executed again.

### Claim 3 (depends on 1)

The processor of claim 1, wherein each training table entry is further to store an optimization opportunity expiration timeout count, and the processor, when adding a new entry to the training table, is further to set the optimization opportunity expiration timeout count to a fixed number of clocks ahead of a current clock, the processor further to compare the optimization opportunity expiration timeout to the current clock when determining which of one or more entries to evict from the training table.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the processor, when setting the state to the first state, uses a move elimination operation by storing the predicted data from the training table entry to a SLT register in a register file, and using a pointer to the SLT register in a register table, the contents of the SLT register to be used as load data for subsequent instances of the first load instruction.

### Claim 5 (depends on 1)

The processor of claim 1, wherein adding the new entry reflecting the first load instruction comprises setting the address stored in the new entry to a linear address of the first load instruction, setting the predicated data stored in the new entry to the data returned for the first load instruction, setting the state to the second state, and resetting the count of instances with unchanged data.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the training table is stored in memory being distinct from the processor register file.

### Claim 7 (depends on 1)

The processor of claim 1, wherein the training table comprises one of a set-associative memory structure, a fully associative memory structure, and a direct-mapped memory structure.

### Claim 8 (depends on 1)

The processor of claim 1, wherein the processor is further to evict a mispredicted entry from the training table, the mispredicted entry being one whose address matches that of the first load instruction, but whose predicted data differs from data returned for the first load instruction.

### Claim 9 (depends on 8)

The processor of claim 8, wherein the processor is further to add each mispredicted load to a Bloom filter, and to use the Bloom filter when selecting a training table entry to evict by determining whether a load-to-evict is either possibly in the set or definitely not in the set.

### Claim 10 (depends on 8)

The processor of claim 8, wherein the processor is to implement a lazy eviction scheme by storing, for each of the mispredicted load instructions, a mismatch count to track how many times the mispredicted load has been mispredicted, and to hold off evicting the mispredicted load until its mismatch count surpasses a second threshold.

### Claim 11

A method of processing load instructions by a processor having a pipeline comprising stages ordered as fetch, allocate, decode, write back, and commit, the method comprising:
storing a first load instruction in a training table comprising, for each entry, an address, predicted data, a state, and a count of instances of unchanged return data;
determining, during one or more of the allocate and decode stages, whether a training table entry having a stored address matching that of a fetched first load instruction exists and has a first state, and, if so, using the data predicted by the entry to optimize execution; and
updating the training table during or after the write back stage to:
when no match exists, adding a new entry reflecting the first load instruction;
when a match exists, but has different predicted data than the data returned for the first load instruction, reset the count and set the state to a second state; and
when a matching entry with matching predicted data exists, increment the count and, when the incremented count reaches a first threshold, set the state to the first state.

### Claim 12 (depends on 11)

The method of claim 11, wherein, when the predicted data is used to optimize execution during the execute stage, the processor is further to await receipt of actual load data for the first load instruction, confirm whether the actual load data matches the predicted data, when a match is confirmed, accept results of executing the first load instruction and cause the first load instruction to be committed during the commit stage, and, otherwise, discard the optimized execution results and cause the first load instruction to be executed again.

### Claim 13 (depends on 11)

The method of claim 11, wherein each training table entry is further to store an optimization opportunity expiration timeout count, and the processor, when adding a new entry to the training table, is further to set the optimization opportunity expiration timeout count to a fixed number of clocks ahead of a current clock, the processor further to compare the optimization opportunity expiration timeout to the current clock when determining which of one or more entries to evict from the training table.

### Claim 14 (depends on 11)

The method of claim 11, wherein the processor, when setting the state to the first state, uses a move elimination operation by storing the predicted data from the training table entry to a SLT register in a register file, and using a pointer to the SLT register as load data for subsequent instances of the first load instruction.

### Claim 15 (depends on 11)

The method of claim 11, wherein the processor, when setting the state to the first state, uses a move elimination operation by storing the predicted data from the training table entry to a SLT register in a register file, and using a pointer to the SLT register in a register table, the contents of the SLT register to be used as load data for subsequent instances of the first load instruction.

### Claim 16 (depends on 11)

The method of claim 11, wherein the training table is stored in memory being distinct from the processor register file.

### Claim 17 (depends on 11)

The method of claim 11, wherein the training table comprises one of a set-associative memory structure, a fully associative memory structure, and a direct-mapped memory structure.

### Claim 18 (depends on 11)

The method of claim 11, wherein the processor is further to evict a mispredicted entry from the training table, the mispredicted entry being one whose address matches that of the first load instruction, but whose predicted data differs from data returned for the first load instruction.

### Claim 19 (depends on 18)

The method of claim 18, wherein the processor is further to add each mispredicted load to a Bloom filter, and to use the Bloom filter when selecting a training table entry to evict by determining whether a load-to-evict is either possibly in the set or definitely not in the set.

### Claim 20 (depends on 18)

The processor of claim 18, wherein the processor is to implement a lazy eviction scheme by storing, for each of the mispredicted load instructions, a mismatch count to track how many times the mispredicted load has been mispredicted, and to hold off evicting the mispredicted load until its mismatch count surpasses a second threshold.

### Claim 21

A non-transitory computer-readable medium containing instructions that, when performed by a processor having a pipeline comprising stages ordered as fetch, allocate, decode, write back, and commit, cause the processor to respond by:
storing a first load instruction in a training table comprising, for each entry, an address, predicted data, a state, and a count of instances of unchanged return data;
determining, during one or more of the allocate and decode stages, whether a training table entry having a stored address matching that of a fetched first load instruction exists and has a first state, and, if so, using the data predicted by the entry to optimize execution; and
updating the training table during or after the write back stage to:
when no match exists, adding a new entry reflecting the first load instruction;
when a match exists, but has different predicted data than the data returned for the first load instruction, reset the count and set the state to a second state; and
when a matching entry with matching predicted data exists, increment the count and, when the incremented count reaches a first threshold, set the state to the first state.

### Claim 22 (depends on 21)

The non-transitory computer-readable medium of claim 21, wherein, when the predicted data is used to optimize execution during the execute stage, the processor is further to await receipt of actual load data for the first load instruction, confirm whether the actual load data matches the predicted data, when a match is confirmed, accept results of executing the first load instruction and cause the first load instruction to be committed during the commit stage, and, otherwise, discard the optimized execution results and cause the first load instruction to be executed again.

### Claim 23 (depends on 21)

The non-transitory computer-readable medium of claim 21, wherein each training table entry is further to store an optimization opportunity expiration timeout count, and the processor, when adding a new entry to the training table, is further to set the optimization opportunity expiration timeout count to a fixed number of clocks ahead of a current clock, the processor further to compare the optimization opportunity expiration timeout to the current clock when determining which of one or more entries to evict from the training table.

### Claim 24 (depends on 21)

The non-transitory computer-readable medium of claim 21, wherein the processor, when setting the state to the first state, uses a move elimination operation by storing the predicted data from the training table entry to a SLT register in a register file, and using a pointer to the SLT register as load data for subsequent instances of the first load instruction.

### Claim 25 (depends on 21)

The non-transitory computer-readable medium of claim 21, wherein adding the new entry reflecting the first load instruction comprises setting the address stored in the new entry to a linear address of the first load instruction, setting the predicated data stored in the new entry to the data returned for the first load instruction, setting the state to the second state, and resetting the count of instances with unchanged data.
