# US 2025/0224938 A1 · Runtime check compiler optimization

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

- Number: US 2025/0224938 A1
- Document ID: US20250224938A1
- Status: Published application
- Kind: A1
- Application number: 18/407,670
- Filed: 2024-01-09
- Published: 2025-07-10
- Earliest claimed: 2024-01-09
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Zheng CHEN; Ke Wen LIN; Jiu Fu GUO; Kai LUO
- Web page: https://patentgrep.com/patent/US20250224938A1

## CPC

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

## Abstract

Methods, computer program products, and systems are presented. The method computer program products, and systems can include, for instance: performing static analysis of program source code defining a computer program, wherein the computer program comprises a pointer operation callee and at least one caller that can pass a pointer parameter to the pointer operation callee; generating, in dependence on the static analysis of program source code, binary code executable so that the pointer operation callee, in runtime, performs a runtime check for determining pointer alias status of the pointer operation callee; and generating, in dependence on the static analysis of program source code, executable binary code executable so that the pointer operation callee, in runtime, performs selecting and activating an executable code path in dependence on a result of the runtime check.

## Claims

### Claim 1

A computer implemented method comprising:
performing static analysis of program source code defining a computer program, wherein the computer program comprises a pointer operation callee and at least one caller that can pass a pointer parameter to the pointer operation callee;
generating, in dependence on the static analysis of the program source code, binary code executable so that the pointer operation callee, in runtime, performs a runtime check for determining pointer alias status of the pointer operation callee; and
generating, in dependence on the static analysis of the program source code, executable binary code executable so that the pointer operation callee, in runtime, performs selecting and activating an executable code path in dependence on a result of the runtime check.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, wherein the runtime check for determining the pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding a pointer alias status that has been encoded into a tagged pointer.

### Claim 4 (depends on 1)

The computer implemented method of claim 1, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer, wherein the runtime check for determining pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding the pointer alias status.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein the at least one caller includes first and second callers that can pass a pointer parameter to the pointer operation callee.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths, wherein the selecting and activating the executable code path in dependence on the result of the runtime check includes selecting and activating one of the first or second executable first and second alternative executable code paths in dependence on the result of the runtime check.

### Claim 8 (depends on 1)

The computer implemented method of claim 1, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer, wherein the runtime check for determining pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding the pointer alias status, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths, wherein the selecting and activating the executable code path in dependence on a result of the runtime check includes selecting and activating one of the first or second executable first and second alternative executable code paths in dependence on the result of the runtime check.

### Claim 9 (depends on 1)

The computer implemented method of claim 1, wherein the at least one caller includes first and second callers that can pass a pointer parameter to the pointer operation callee, wherein the method includes determining, based on the performing static analysis of program source code defining a computer program, that a pointer alias status of the pointer operation callee is dependent on which of the first or second callers calls the pointer operation callee in runtime.

### Claim 10 (depends on 1)

The computer implemented method of claim 1, wherein the at least one caller includes first and second callers that can pass a pointer parameter to the pointer operation callee, wherein the method includes determining, based on the performing static analysis of program source code defining a computer program, that a pointer alias status of the pointer operation callee is dependent on which of the first or second callers calls the pointer operation callee in runtime, and wherein the generating the executable binary code executable so that the pointer operation callee, in runtime, performs the runtime check for determining pointer alias status of the pointer operation callee is performed responsively to the determining.

### Claim 11 (depends on 1)

The computer implemented method of claim 1, wherein the at least one caller includes first and second callers that can pass a pointer parameter to the pointer operation callee, wherein the method includes determining, based on the performing static analysis of program source code defining a computer program, that a pointer alias status of the pointer operation callee is dependent on which of the first or second callers calls the pointer operation callee in runtime, and wherein the method includes responsively to the determining that the pointer alias status of the pointer operation callee is dependent on which of the first or second callers calls the pointer operation callee in runtime, (a) generating caller binary code executable so that the first and second callers, in runtime, can encode alias status of first and second pointers in a tagged pointer, (b) generating callee binary code executable so that the pointer operation callee, in runtime, performs a runtime check to decode the alias status of the first and second pointers encoded in the tagged pointer, (c) generating first and second alternative executable code paths, one executable code path for a “not aliased” alias status, and one executable code path for a “may aliased” alias status, and (d) generating callee executable binary code executable so that the pointer operation callee, in runtime, selects and activates one of the first or second alternative executable code paths in dependence on the alias status decoded from the tagged pointer.

### Claim 12

A system comprising:
a memory;
at least one processor in communication with the memory; and
program instructions executable by one or more processor via the memory to perform a method comprising:
performing static analysis of program source code defining a computer program, wherein the computer program comprises a pointer operation callee and at least one caller that can pass a pointer parameter to the pointer operation callee;
generating, in dependence on the static analysis of program source code, binary code executable so that the pointer operation callee, in runtime, performs a runtime check for determining pointer alias status of the pointer operation callee; and
generating, in dependence on the static analysis of program source code, executable binary code executable so that the pointer operation callee, in runtime, performs selecting and activating an executable code path in dependence on a result of the runtime check.

### Claim 13 (depends on 12)

The system of claim 12, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer.

### Claim 14 (depends on 12)

The system of claim 12, wherein the runtime check for determining the pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding a pointer alias status that has been encoded into a tagged pointer.

### Claim 15 (depends on 12)

The system of claim 12, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer, wherein the runtime check for determining pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding the pointer alias status.

### Claim 16 (depends on 12)

The system of claim 12, wherein the at least one caller includes first and second callers that can pass a pointer parameter to the pointer operation callee.

### Claim 17 (depends on 12)

The system of claim 12, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths.

### Claim 18 (depends on 12)

The system of claim 12, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths, wherein the selecting and activating the executable code path in dependence on the result of the runtime check includes selecting and activating one of the first or second executable first and second alternative executable code paths in dependence on the result of the runtime check.

### Claim 19 (depends on 12)

The system of claim 12, wherein the method includes generating, in dependence on the static analysis of the program source code, caller binary code executable so that the at least one caller, in runtime, encodes pointer alias status into a tagged pointer, wherein the runtime check for determining pointer alias status of the pointer operation callee includes the pointer operation callee, in runtime, decoding the pointer alias status, wherein the method includes generating, in dependence on the static analysis of the program source code, first and second alternative executable code paths, wherein the selecting and activating the executable code path in dependence on a result of the runtime check includes selecting and activating one of the first or second executable first and second alternative executable code paths in dependence on the result of the runtime check.

### Claim 20

A computer program product comprising:
a computer readable storage medium readable by one or more processing circuit and storing instructions for execution by one or more processor for performing a method comprising:
performing static analysis of program source code defining a computer program, wherein the computer program comprises a pointer operation callee and at least one caller that can pass a pointer parameter to the pointer operation callee;
generating, in dependence on the static analysis of program source code, binary code executable so that the pointer operation callee, in runtime, performs a runtime check for determining pointer alias status of the pointer operation callee; and
generating, in dependence on the static analysis of program source code, executable binary code executable so that the pointer operation callee, in runtime, performs selecting and activating an executable code path in dependence on a result of the runtime check.
