# US 2026/0086786 A1 · Source Code Optimization

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

- Number: US 2026/0086786 A1
- Document ID: US20260086786A1
- Status: Published application
- Kind: A1
- Application number: 18/441,647
- Filed: 2024-02-14
- Published: 2026-03-26
- Earliest claimed: 2024-02-14
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Tyler Steele; Jordan Gillette; Reid Copeland; Muhammad Suhaib Tahir Saleem; Jacqueline Midroni
- Web page: https://patentgrep.com/patent/US20260086786A1

## CPC

- G06F 8/447: {Target code generation}
- G06F 8/443: {Optimisation}
- G06F 8/72: Code refactoring
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer implemented method optimizes source code. A processor set receives a source code in a first version. The processor set compiles the source code in the first version to generate an intermediate representation for the source codes in the first version. The processor set compares the intermediate representation for the source code in the first version to a number of optimization paths. The processor set identifies a number of matches based on the comparisons. The processor set updates at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version.

## Claims

### Claim 1

A computer implemented method for optimizing source code, the computer implemented method comprising:
receiving, by a processor set, a source code in a first version;
compiling, by the processor set, the source code in the first version to generate an intermediate representation for the source code in the first version;
comparing, by the processor set, the intermediate representation for the source code in the first version to a number of optimization paths, wherein the number of optimization paths are data structures that comprise information for converting the source code in the first version to a second version;
identifying, by the processor set, a number of matches based on the comparisons, wherein each match from the number of matches comprises a fragment of the intermediate representation and corresponding portion of the source code for the fragment of the intermediate representation in the second version based on an optimization path from the number of optimization paths; and
updating, by the processor set, at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version.

### Claim 2 (depends on 1)

The computer implemented method of claim 1 further comprising:
tagging, by the processor set, the portion of the source code in the first version based on the number of matches for review.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, wherein updating, by the processor set, at least the portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version comprises:
presenting, by the processor set, the number of matches in a graphical user interface;
selecting, by the processor set based on a user input, a subset of matches from the number of matches; and
updating, by the processor set, the portion of the source code in the first version to the second version based on the selected subset of matches to generate the source code in the second version.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein identifying, by the processor set, the number of matches based on the comparisons comprises:
organizing, by the processor set, the number of optimization paths in a hierarchical manner such that the identification for the number of matches can be proceeded from first optimization paths from the number of optimization paths to a last optimization from the number of optimization paths; and
terminating, by the processor set, identification for the number of matches upon identifying the first match.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein comparing, by the processor set, the intermediate representation for the source code in the first version to a number of optimization paths comprises:
comparing, by the processor set, each section of the intermediate representation to each optimization path from the number of optimization paths.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, wherein the intermediate representation and the number of optimization paths are in the same syntax specified by a complier vendor.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the intermediate representation excludes information related to variable names in the source code.

### Claim 8

A computer system comprising:
a processor set;
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations:
receive a source code in a first version;
compile the source code in the first version to generate an intermediate representation for the source code in the first version;
compare the intermediate representation for the source code in the first version to a number of optimization paths, wherein the number of optimization paths are data structures that comprise information for converting the source code in the first version to a second version;
identify a number of matches based on the comparisons, wherein each match from the number of matches comprises a fragment of the intermediate representation and corresponding portion of the source code for the fragment of the intermediate representation in the second version based on an optimization path from the number of optimization paths; and
update at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version.

### Claim 9 (depends on 8)

The computer system of claim 8, wherein the program instructions, collectively stored in the set of one or more storage media, cause the processor set to further perform the following computer operations:
tag the portion of the source code in the first version based on the number of matches for review.

### Claim 10 (depends on 8)

The computer system of claim 8, wherein as part of updating at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:
present the number of matches in a graphical user interface;
select a subset of matches from the number of matches based on a user input; and
update the portion of the source code in the first version to the second version based on the selected subset of matches to generate the source code in the second version.

### Claim 11 (depends on 8)

The computer system of claim 8, wherein as part of identifying the number of matches based on the comparisons, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:
organize the number of optimization paths in a hierarchical manner such that the identification for the number of matches can be proceeded from first optimization paths from the number of optimization paths to a last optimization from the number of optimization paths; and
terminate identification for the number of matches upon identifying the first match.

### Claim 12 (depends on 8)

The computer system of claim 8, wherein comparing the intermediate representation for the source code in the first version to a number of optimization paths, the program instructions, collectively stored in the set of one or more storage media, cause the processor set to perform the following computer operations:
compare each section of the intermediate representation to each optimization path from the number of optimization paths.

### Claim 13 (depends on 8)

The computer system of claim 8, wherein the intermediate representation and the number of optimization paths are in the same syntax specified by a complier vendor.

### Claim 14 (depends on 8)

The computer system of claim 8, wherein the intermediate representation excludes information related to variable names in the source code.

### Claim 15

A computer program product for optimizing source code, the computer program product comprising:
a set of one or more computer-readable storage media;
program instructions, collectively stored in the set of one or more storage media, cause a processor set to perform the following computer operations:
receive a source code in a first version;
compile the source code in the first version to generate an intermediate representation for the source code in the first version;
compare the intermediate representation for the source code in the first version to a number of optimization paths, wherein the number of optimization paths are data structures that comprise information for converting the source code in the first version to a second version;
identify a number of matches based on the comparisons, wherein each match from the number of matches comprises a fragment of the intermediate representation and corresponding portion of the source code for the fragment of the intermediate representation in the second version based on an optimization path from the number of optimization paths; and
update at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein program instructions, collectively stored in the set of one or more storage media further cause the processor set to:
tag the portion of the source code in the first version based on the number of matches for review.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein as part of updating at least a portion of the source code in the first version to the second version based on the number of matches to generate the source code in the second version, the operation performed by the processor set comprises:
present the number of matches in a graphical user interface;
select a subset of matches from the number of matches based on a user input; and
update the portion of the source code in the first version to the second version based on the selected subset of matches to generate the source code in the second version.

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein as part of identifying the number of matches based on the comparisons, the operation performed by the processor set comprises:
organize the number of optimization paths in a hierarchical manner such that the identification for the number of matches can be proceeded from first optimization paths from the number of optimization paths to a last optimization from the number of optimization paths; and
terminate identification for the number of matches upon identifying the first match.

### Claim 19 (depends on 15)

The computer program product of claim 15, wherein comparing the intermediate representation for the source code in the first version to a number of optimization paths, the operation performed by the processor set comprises:
compare each section of the intermediate representation to each optimization path from the number of optimization paths.

### Claim 20 (depends on 15)

The computer program product of claim 15, wherein the intermediate representation and the number of optimization paths are in the same syntax specified by a complier vendor.
