# US 8,578,358 B2 · Macroscalar processor architecture

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

- Number: US 8,578,358 B2
- Document ID: US8578358B2
- Status: Granted
- Kind: B2
- Application number: 13/298,764
- Filed: 2011-11-17
- Published: 2012-03-15
- Granted: 2013-11-05
- Earliest claimed: 2004-04-23
- Assignees: Apple Inc.
- Applicants: Jeffry E. Gonion
- Inventors: Jeffry E. Gonion
- Web page: https://patentgrep.com/patent/US8578358B2

## CPC

- G06F 8/441: {Register allocation; Assignment of physical memory space to logical memory space}
- G06F 8/443: {Optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A macroscalar processor architecture is described herein. In one embodiment, a processor receives instructions of a program loop having a vector block and a sequence block intended to be executed after the vector block, where the processor includes multiple slices and each of the slices is capable of executing an instruction of an iteration of the program loop substantially in parallel. For each iteration of the program loop, the processor executes an instruction of the sequence block using one of the slices while executing instructions of the vector block using a remainder of the slices substantially in parallel. Other methods and apparatuses are also described.

## Claims

### Claim 1

A method for aggregating a program loop, the method comprising:
determining whether a number of dynamic registers of a processor to be used in a program loop exceeds a predetermined threshold, the processor including a plurality of static registers, dynamic registers, and extended registers; and
allocating one or more of the extended registers to be used in the program loop in place of at least a portion of the determined number of dynamic registers intended to be used in the program loop, such that a number of dynamic registers used in aggregating the program loop does not exceed the predetermined threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining whether a number of dynamic registers of a processor to be used is performed by a compiler in view of source code of the program loop, and wherein the compiler inserts one or more directives into machine executable code based on the source code to indicate one or more extended registers to be used in place of one or more dynamic registers by the processor at runtime.

### Claim 3 (depends on 2)

The method of claim 2, wherein the one or more directives specify an offset from which at least a portion of the dynamic registers to be used is shifted, and wherein the shifted portion of the dynamic registers are replaced with the allocated one or more extended registers by the processor at runtime.

### Claim 4 (depends on 3)

The method of claim 3, wherein the one or more directives further specify a number of the dynamic registers to be shifted with the specified offset to where the one or more extended registers allocated to replace the shifted dynamic registers.

### Claim 5 (depends on 4)

The method of claim 4, wherein the one or more directives further specify a starting location of the dynamic registers from which the number of the dynamic registers is to be shifted.

### Claim 6

A method for aggregating a program loop, the method comprising:
identifying a static register of a processor to be accessed by an instruction of an iteration of a program loop, wherein a value of the static register is used in a subsequent iteration; and
in response to the instruction executed by the processor, copying the value of the static register to a dynamic register of the processor, the dynamic register being used in the subsequent iteration of the program loop, wherein copying the value of the static register is performed without additional instructions from source code corresponding to the instruction of the iteration received by the processor.

### Claim 7 (depends on 6)

The method of claim 6, wherein the static register accessed by the instruction includes a write operation to the static register by the instruction.

### Claim 8 (depends on 6)

The method of claim 6, wherein the static register accessed by the instruction includes a read operation from the static register by the instruction.

### Claim 9 (depends on 6)

The method of claim 6, further comprising specifying the static register from which the value is copied and the dynamic register to which the value is copied.

### Claim 10 (depends on 9)

The method of claim 9, further comprising inserting by a compiler one or more directives prior to the instruction of the program loop to specify the static and dynamic registers.

### Claim 11

A method for aggregating a program loop, comprising:
identifying one or more instructions of a program loop, wherein during each iteration of the program loop, a member of a first array referenced by a first index is assigned to a member of a second array referenced by a second index dependent upon a predicate condition;
for each iteration of the program loop, at runtime by a processor, incrementally assigning a value to a dynamic register associated with the respective iteration only if the predicate condition is satisfied during the respective iteration; and
executing the one or more instructions as a vector block that assign a member of the first array to a member of the second array referenced by the dynamic register associated with each iteration.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
counting a number of active iterations of the program loop, wherein an iteration is an active iteration if the predicate condition is satisfied during the respective iteration; and
storing the counted number of active iterations into a static register associated with second index after the vector block execution.

### Claim 13 (depends on 11)

The method of claim 11, wherein identifying the one or more instructions is performed by a compiler and wherein the compiler inserts one or more directives to specify a dynamic register associated with an iteration to be incrementally assigned based on a base value and an increment amount specified within the one or more directives.

### Claim 14 (depends on 13)

The method of claim 13, wherein the base value is determined based on a value of a static register associated with the second index prior to the vector block execution.

### Claim 15

An apparatus for aggregating a program loop, the apparatus comprising:
means for identifying a static register of a processor to be accessed by an instruction of an iteration of a program loop, wherein a value of the static register is used in a subsequent iteration; and
in response to the instruction executed by the processor, means for copying the value of the static register to a dynamic register of the processor, the dynamic register being used in the subsequent iteration of the program loop, wherein copying the value of the static register is performed without additional instructions from source code corresponding to the instruction of the iteration received by the processor.
