Thread-Local Object Split-Scalarization for Heap Access Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing object-oriented languages face significant performance penalties due to dereferencing objects and memory overheads, particularly in managing thread-local objects, as traditional scalarization methods are limited to method-local objects, restricting their application.

Innovation Solution

Perform split-scalarization of thread-local objects by identifying critical points and regions within a method, using thread-local analysis, alias analysis, and cost analysis to determine and optimize field accesses, thereby reducing heap access overheads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional scalarization methods are used for method-local objects, then memory overhead is reduced for those objects, but thread-local objects cannot be optimized and continue to incur significant performance penalties

Engineering Contradiction:
Improveexecution efficiencyVSAvoidmemory overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the scalarization optimization into two distinct parts: scalarized fields (stored in local variables) and non-scalarized fields (stored in heap memory). This segmentation allows thread-local objects to be partially optimized through split-scalarization, where only the scalarizable portion benefits from reduced memory overhead while the non-scalarizable portion maintains heap storage. This resolves the contradiction by enabling selective optimization of thread-local objects without requiring complete scalarization.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by differentiating between scalarizable and non-scalarizable fields within the same object. Each field is analyzed independently to determine its scalarization eligibility based on whether it is accessed exclusively within a single thread. This allows the optimizer to apply different storage strategies (local variable vs. heap memory) to different fields, achieving memory overhead reduction for thread-local fields while maintaining correctness for shared fields.

Inventive Principle:
Principle #3Local quality

2Loss of energy

If complete scalarization is applied to all fields of thread-local objects, then memory overhead is reduced, but correctness is compromised when fields are accessed by multiple threads

Engineering Contradiction:
Improvememory overheadVSAvoidthread safety
Core Design Contradiction:
Loss of energyVSReliability

Solution Approach 1:

The patent introduces dynamic analysis through escape analysis that determines at compile time whether each field is thread-local or shared. The scalarization decision is not static but dynamically adapted based on the actual access patterns detected during analysis. Fields that escape the current method (potentially shared by multiple threads) are marked as non-scalarizable and stored in heap memory, while fields that remain confined to a single thread are scalarized. This dynamic approach ensures thread safety while maximizing memory overhead reduction.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent employs feedback through iterative analysis passes that examine field access patterns and determine scalarization eligibility. The escape analysis feedback loop identifies which fields are accessed by multiple threads and prevents their scalarization, while allowing scalarization of purely thread-local fields. This feedback mechanism ensures that the optimization maintains thread safety correctness while achieving memory overhead reduction for eligible fields.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS12578939B2Split-scalarization of thread-local objects in optimized object code
Publication Date: 2026.03.17 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12578939B2 patent drawing
  • US12578939B2 patent drawing
  • US12578939B2 patent drawing

AI summary

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 a programmed method and a reference within the programmed method that accesses a field of an object. Then, the method includes determining that the field of the object is scalarizable over a region of the programmed method and performing scalarization of the field of the object over the region of the programmed method. Finally, the method includes outputting optimized object code with the field of the object scalarized over the region of the programmed method and with another field of the object unscalarized in a different region of the programmed method.