# US 2015/0178056 A1 · Generating simd code from code statements that include non-isomorphic code statements

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

- Number: US 2015/0178056 A1
- Document ID: US20150178056A1
- Status: Published application
- Kind: A1
- Application number: 14/138,424
- Filed: 2013-12-23
- Published: 2015-06-25
- Earliest claimed: 2013-12-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ehsan Amiri; Christopher M. Barton; Denis M. Palmeiro; Raul Silvera
- Web page: https://patentgrep.com/patent/US20150178056A1

## CPC

- G06F 8/443: {Optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Generating SIMD code from code statements that include non-isomorphic code statements. Code statements are received, each code statement has one or more operators in a respective operator order and each operator has a type and associated operands. At least two code statements among the code statements received have an operator of the same type in a different operator order position. A first operator order position is identified for the operators of the same type in each of the code statements. For each of the code statements, code is generated for operators and their associated operands having operator order positions preceding the first operator order positions. SIMD code is generated at least based on the identified first operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

## Claims

### Claim 1

A method to generate SIMD code from code statements that include non-isomorphic code statements, the method comprising:
receiving, by one or more processors, a plurality of code statements, each code statement having one or more operators in a respective operator order, each operator having a type and associated operands, at least two code statements of the plurality of code statements having an operator of the same type in a different operator order position;
identifying, by the one or more processors, a first operator order position for the operators of the same type in each of the at least two code statements;
for each of the at least two code statements, generating, by the one or more processors, code for operators and their associated operands having operator order positions preceding the first operator order positions; and
generating, by the one or more processors, SIMD code at least based on the identified first operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 2 (depends on 1)

A method in accordance with claim 1, wherein generating code for operators and their associated operands comprises:
identifying a second operator order position preceding the first operator order position;
identifying a third operator order position for operators having an operator type corresponding to the second operator order position in each of the at least two code statements;
for each of the at least two code statements, generating code for operators and their associated operands having operator order positions preceding the third operator order positions; and
generating SIMD code at least based on the identified second and third operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 3 (depends on 1)

A method in accordance with claim 1, wherein generating code for operators and their associated operands further comprises generating SIMD code.

### Claim 4 (depends on 2)

A method in accordance with claim 2, wherein generating code for operators and their associated operands further comprises generating SIMD code.

### Claim 5 (depends on 1)

A method in accordance with claim 1, wherein operator order includes one of:
operator precedence order, and operator positional order in a statement.

### Claim 6 (depends on 1)

A method in accordance with claim 1, wherein operands include: linearized address expressions, non-linearized address expressions, memory adjacent operands, and non-memory adjacent operands.

### Claim 7 (depends on 1)

A method in accordance with claim 1, wherein operators include: addition and subtraction operators, multiplication and division operators, store operators, conversion operators.

### Claim 8

A computer program product to generate SIMD code from code statements that include non-isomorphic code statements, the computer program product comprising one or more computer-readable tangible storage devices and program instructions stored on at least one of the one or more computer-readable tangible storage devices, the program instructions comprising:
program instructions to receive, by one or more processors, a plurality of code statements, each code statement having one or more operators in a respective operator order, each operator having a type and associated operands, at least two code statements of the plurality of code statements having an operator of the same type in a different operator order position;
program instructions to identify, by the one or more processors, a first operator order position for the operators of the same type in each of the at least two code statements;
for each of the at least two code statements, program instructions to generate, by the one or more processors, code for operators and their associated operands having operator order positions preceding the first operator order positions; and
program instructions to generate, by the one or more processors, SIMD code at least based on the identified first operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 9 (depends on 8)

A computer program product in accordance with claim 8, wherein the program instructions to generate code for operators and their associated operands comprise:
program instructions to identify a second operator order position preceding the first operator order position;
program instructions to identify a third operator order position for operators having an operator type corresponding to the second operator order position in each of the at least two code statements;
for each of the at least two code statements, program instructions to generate code for operators and their associated operands having operator order positions preceding the third operator order positions; and
program instructions to generate SIMD code at least based on the identified second and third operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 10 (depends on 8)

A computer program product in accordance with claim 8, wherein the program instructions to generate code for operators and their associated operands further comprises program instructions to generate SIMD code.

### Claim 11 (depends on 9)

A computer program product in accordance with claim 9, wherein the program instructions to generate code for operators and their associated operands further comprises program instructions to generate SIMD code.

### Claim 12 (depends on 8)

A computer program product in accordance with claim 8, wherein operator order includes one of: operator precedence order, and operator positional order in a statement.

### Claim 13 (depends on 8)

A computer program product in accordance with claim 8, wherein operands include: linearized address expressions, non-linearized address expressions, memory adjacent operands, and non-memory adjacent operands.

### Claim 14 (depends on 8)

A computer program product in accordance with claim 8, wherein operators include: addition and subtraction operators, multiplication and division operators, store operators, conversion operators.

### Claim 15

A computer system to generate SIMD code from code statements that include non-isomorphic code statements, the computer system comprising one or more processors, one or more computer readable memories, one or more computer readable tangible storage devices, and program instructions stored on at least one of the one or more storage devices for execution by at least one of the one or more processors via at least one of the one or more memories, the program instructions comprising:
program instructions to receive, by one or more processors, a plurality of code statements, each code statement having one or more operators in a respective operator order, each operator having a type and associated operands, at least two code statements of the plurality of code statements having an operator of the same type in a different operator order position;
program instructions to identify, by the one or more processors, a first operator order position for the operators of the same type in each of the at least two code statements;
for each of the at least two code statements, program instructions to generate, by the one or more processors, code for operators and their associated operands having operator order positions preceding the first operator order positions; and
program instructions to generate, by the one or more processors, SIMD code at least based on the identified first operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 16 (depends on 15)

A computer system in accordance with claim 15, wherein the program instructions to generate code for operators and their associated operands comprise:
program instructions to identify a second operator order position preceding the first operator order position;
program instructions to identify a third operator order position for operators having an operator type corresponding to the second operator order position in each of the at least two code statements;
for each of the at least two code statements, program instructions to generate code for operators and their associated operands having operator order positions preceding the third operator order positions; and
program instructions to generate SIMD code at least based on the identified second and third operator order positions, the corresponding operator type, and the operands associated with the operator type at the identified operator order positions.

### Claim 17 (depends on 15)

A computer system in accordance with claim 15, wherein the program instructions to generate code for operators and their associated operands further comprises program instructions to generate SIMD code.

### Claim 18 (depends on 15)

A computer system in accordance with claim 15, wherein operator order includes one of: operator precedence order, and operator positional order in a statement.

### Claim 19 (depends on 15)

A computer system in accordance with claim 15, wherein operands include: linearized address expressions, non-linearized address expressions, memory adjacent operands, and non-memory adjacent operands.

### Claim 20 (depends on 15)

A computer system in accordance with claim 15, wherein operators include: addition and subtraction operators, multiplication and division operators, store operators, conversion operators.
