# US 2025/0094357 A1 · Cache Control to Preserve Register Data

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

- Number: US 2025/0094357 A1
- Document ID: US20250094357A1
- Status: Published application
- Kind: A1
- Application number: 18/962,158
- Filed: 2024-11-27
- Published: 2025-03-20
- Earliest claimed: 2023-02-23
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Jonathan M. Redshaw; Winnie W. Yeung; Benjiman L. Goodman; David K. Li; Zelin Zhang; Yoong Chert Foo
- Web page: https://patentgrep.com/patent/US20250094357A1

## CPC

- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 9/30087: {Synchronisation or serialisation instructions}
- G06F 9/382: {Pipelined decoding, e.g. using predecoding}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3867: {using instruction pipelines}
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0857: {by multiple requestors}
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 2212/1024: Latency reduction
- G06F 2212/1028: Power efficiency
- G06F 2212/454: Vector or matrix data
- G06F 2212/455: Image or video data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed relating to eviction control for cache lines that store register data. In some embodiments, memory hierarchy circuitry is configured to provide memory backing for register operand data in one or more cache circuits. Lock circuitry may control a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated, by decode circuitry, as being utilized by decoded instructions of the first thread. The lock circuitry may preserve register operand data in the one or more cache circuits, including to prevent eviction of a given cache line from a cache circuit based on an asserted lock indicator. The lock circuitry may clear the first set of lock indicators in response to a reset event. Disclosed techniques may advantageously retain relevant register information in the cache with limited control circuit area.

## Claims

### Claim 1

An apparatus, comprising:
processor pipeline circuitry configured to perform operations on register operand data;
control circuitry configured to provide memory backing for register operand data in a memory hierarchy, wherein the memory hierarchy includes:
a data cache;
an operand cache between the processor pipeline circuitry and the data cache in the memory hierarchy;
lock circuitry configured to:
control a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated as being utilized by instructions of the first thread;
preserve register operand data in the data cache, including to prevent eviction of a given cache line from the data cache based on an asserted lock indicator for register data stored in the given cache line; and
in response to a reset event:
flush operand data to the memory hierarchy from one or more operand cache entries indicated as being last-use; and
clear the first set of lock indicators.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the lock circuitry is further configured to, in response to the reset event:
assert one or more lock indicators for the registers whose operand data was flushed from the one or more operand cache entries.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein, to assert the one or more lock indicators for the registers whose operand data was flushed from the one or more operand cache entries, the lock circuitry is configured to control a second set of lock indicators for the set of registers.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the lock circuitry is further configured to, in response to the reset event:
clear entries in the operand cache that are not indicated as being last-use.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein indications of last-use for one or more operand cache entries are based on last-use hint information from a compiler.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the lock circuitry is configured to maintain lock indicators at single-instruction multiple-data (SIMD) granularity for threads in a SIMD group.

### Claim 7 (depends on 1)

The apparatus of claim 1, further comprising:
decode circuitry configured to decode instructions for execution and indicate the registers utilized by instructions of the first thread.

### Claim 8 (depends on 1)

The apparatus of claim 1, wherein the lock circuitry is configured to switch between sets of lock indicators for the set of registers in response to the reset event.

### Claim 9 (depends on 1)

The apparatus of claim 1, wherein the processor pipeline circuitry is configured to pipeline, at least through a schedule pipeline stage, information that identifies a set of lock indicators corresponding to a given operation.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the processor pipeline circuitry is configured to perform a fence operation in response to the reset event such that all operations that use the first set of lock indicators reach a pipeline stage before any operations that use a second set of lock indicators proceed past the pipeline stage.

### Claim 11 (depends on 1)

The apparatus of claim 1, wherein the reset event corresponds to a threshold number of registers in the set of registers being locked.

### Claim 12 (depends on 1)

The apparatus of claim 1, wherein the reset event corresponds to a compiler hint.

### Claim 13 (depends on 1)

The apparatus of claim 1, wherein the reset event corresponds to a threshold number of stall cycles of the first thread in a pipeline stage.

### Claim 14

A method, comprising:
storing, by a computing system in an operand cache, register operand data for operations performed by a processor pipeline of the computing system;
controlling, by the computing system, a first set of lock indicators for a set of registers for a first thread, including to assert one or more lock indicators for registers that are indicated as being utilized by instructions of the first thread;
preserving, by the computing system, register operand data in a data cache, including to prevent eviction of a given cache line from the data cache based on an asserted lock indicator for register data stored in the given cache line; and
in response to a reset event, the computing system:
flushing operand data to the data cache from one or more entries of the operand cache indicated as being last-use; and
clear the first set of lock indicators.

### Claim 15 (depends on 14)

The method of claim 14, further comprising, in response to the reset event:
asserting one or more lock indicators for the registers whose operand data was flushed from the one or more operand cache entries.

### Claim 16 (depends on 15)

The method of claim 15, wherein the asserting includes controlling a second set of lock indicators for the set of registers.

### Claim 17 (depends on 14)

The method of claim 14, further comprising, in response to the reset event:
clearing entries in the operand cache that are not indicated as being last-use.

### Claim 18

An apparatus, comprising:
processor pipeline circuitry configured to perform operations on register operand data;
control circuitry configured to provide memory backing for register operand data in a memory hierarchy, wherein the memory hierarchy includes:
a data cache at a first cache level;
scoreboard circuitry configured to track which architectural registers are stored at the first cache level; and
lock circuitry configured to:
initiate a map request to confirm whether operand data for registers that are indicated as being utilized by instructions of a first thread are stored at the first cache level;
in response to the scoreboard circuitry confirming that one or more registers utilized by instructions of the first thread are stored at the first cache level, control a first set of lock indicators for a set of registers for the first thread, including to assert one or more lock indicators corresponding to the confirmed one or more registers; and
preserve register operand data in the data cache, including to prevent eviction of a given cache line from the data cache based on an asserted lock indicator for a register stored in the given cache line.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the lock circuitry is further configured to:
clear the first set of lock indicators in response to a reset event.

### Claim 20 (depends on 18)

The apparatus of claim 18, further comprising:
control circuitry configured to, in response to the scoreboard circuitry confirming that a register utilized by an instruction of the first thread is not stored at the first cache level, initiate a fetch operation from the memory hierarchy to the first cache level.
