# US 2025/0085938 A1 · Split-scalarization of thread-local objects in optimized object code

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

- Number: US 2025/0085938 A1
- Document ID: US20250085938A1
- Status: Published application
- Kind: A1
- Application number: 18/464,636
- Filed: 2023-09-11
- Published: 2025-03-13
- Earliest claimed: 2023-09-11
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation; Indian Institute of Technology Madras (Iit Madras)
- Inventors: Vijay SUNDARESAN; Daryl James MAIER; Krishna NANDIVADA VENKATA; Manas THAKUR
- Web page: https://patentgrep.com/patent/US20250085938A1

## CPC

- G06F 8/41: Compilation
- G06F 8/315: {Object-oriented languages}
- G06F 8/443: {Optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of the present disclosure relate to split-scalarization of thread-local objects in optimized object code. A computer-implemented method includes receiving source code including at least one programmed method and at least one reference within the at least one programmed method that accesses at least one field of at least one object; determining that the at least one field of the at least one object is scalarizable over a region of the at least one programmed method; performing scalarization of the at least one field of the at least one object over the region of the at least one programmed method; and outputting optimized object code with the at least one field of the at least one object scalarized over the region of the at least one programmed method and with another field of the at least one object unscalarized in a different region of the at least one programmed.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving, by a processor set, source code including at least one programmed method and at least one reference within the at least one programmed method that accesses at least one field of at least one object;
determining, by the processor set, that the at least one field of the at least one object is scalarizable over a region of the at least one programmed method;
performing, by the processor set, scalarization of the at least one field of the at least one object over the region of the at least one programmed method; and
outputting, by the processor set, optimized object code with the at least one field of the at least one object scalarized over the region of the at least one programmed method and with another field of the at least one object unscalarized in a different region of the at least one programmed method.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising identifying that the at least one object is a thread-local object.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein the identifying comprises performing inter-procedural analysis of the at least one programmed method.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, further comprising identifying that the at least one object is referenced by local variables with singleton points-to sets.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein the identifying comprises performing points-to analysis that identifies a set of objects the local variables can point to.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the determining comprises determining that the at least one object is not accessed via a field of another object.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising determining that the another field of the at least one object is not scalarizable in the different region of the at least one programmed method.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising determining that a cost of scalarizing the at least one field of the at least one object does not exceed a cost of not scalarizing the at least one field.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein the determining comprises determining that the at least one field is accessed at least twice.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, further comprising determining that a cost of scalarizing the another field of the at least one object exceeds a cost of not scalarizing the another field.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein the determining comprises identifying critical points comprising a start-point and a set of endpoints for the at least one object within the at least one programmed method.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the identifying comprises identifying a critical predecessor set for the set of endpoints of the critical points.

### Claim 13

A computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:
receive source code including at least one programmed method and at least one reference within the at least one programmed method that accesses at least one field of at least one object;
identify critical points comprising a start-point and a set of endpoints for the at least one object within the at least one programmed method;
identify a critical predecessor set for the set of endpoints of the critical points of the at least one object within the at least one programmed method;
determine that at least one field access of the at least one object in the critical predecessor set of the at least one programmed method is scalarizable;
perform scalarization of the at least one field access of the at least one object in the critical predecessor set of the at least one programmed method; and
output optimized object code with the at least one field access of the at least one object scalarized in the critical predecessor set of the at least one programmed method and with another field access of the at least one object not scalarized in the at least one programmed method that is not in the critical predecessor set in the at least one programmed method.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the program instructions are further executable to determine that a cost of scalarizing the at least one field access of the at least one object in the critical predecessor set of the at least one programmed method does not exceed a cost of not scalarizing the at least one field access.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the determining comprises determining that the another field access of the at least one object not in the critical predecessor set is not scalarizable.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein the determining comprises:
determining the another field access is not thread-escaping;
determining the another field access is not referenced by local variables with non-singleton points-to sets; and
determining the another field access is not accessed via a field of another object.

### Claim 17

A system comprising:
a processor set, a computer readable memory, one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable to:
receive source code including at least one programmed method and at least one reference within the at least one programmed method that accesses at least one field of at least one object;
determine that the at least one field of the at least one object is scalarizable over a region of the at least one programmed method;
determine that a cost of scalarizing the at least one field of the at least one object does not exceed a cost of not scalarizing the at least one field;
perform scalarization of the at least one field of the at least one object over the region of the at least one programmed method; and
output optimized object code with the at least one field of the at least one object scalarized over the region of the at least one programmed method and with another field of the at least one object unscalarized in a different region of the at least one programmed method.

### Claim 18 (depends on 17)

The system of claim 17, wherein the program instructions are further executable to identify that the another field of the at least one object is a thread-escaping.

### Claim 19 (depends on 17)

The system of claim 17, wherein the program instructions are further executable to identify that the another field of the at least one object is referenced by local variables with non-singleton points-to sets.

### Claim 20 (depends on 17)

The system of claim 17, wherein the program instructions are further executable to identify that the another field of the at least one object is accessed via a field of another object.
