Hybrid JIT Load Module Compiler for Legacy Code Translation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing load module compilers face challenges in efficiently translating legacy programs from one architecture to another, particularly with self-modifying code and proprietary intermediate representations, which limits flexibility and performance.

Innovation Solution

A method and system for constructing a library of transformation functions to translate legacy programs by converting legacy instructions into an intermediate representation, allowing for the generation of executable code that can run on a different architecture, including support for self-modifying applications through dynamic compilation and caching of compiled basic blocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a conventional emulator is used to translate legacy instructions, then compatibility with legacy programs is achieved, but performance deteriorates due to multiple layers of translation

Engineering Contradiction:
ImprovecompatibilityVSAvoidperformance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent segments the translation process by dividing legacy code into basic blocks and translating them individually into intermediate representation, then selectively compiling to native code. This segmentation allows partial optimization while maintaining compatibility for the remaining emulated portions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediate representation as a mediator between legacy instructions and target architecture. This intermediary layer enables efficient translation and optimization without requiring full emulation, thus improving performance while preserving compatibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If proprietary intermediate representations are used in load module compilers, then translation capability is achieved, but flexibility deteriorates

Engineering Contradiction:
Improvetranslation capabilityVSAvoidflexibility
Core Design Contradiction:
Ease of manufactureVSAdaptability or versatility

Solution Approach 1:

The patent employs a universal intermediate representation that can represent instructions from multiple legacy architectures and can be compiled to multiple target architectures. This universal IR provides both the translation capability needed for legacy support and the flexibility to adapt to different targets.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The intermediate representation serves as a flexible intermediary that decouples the legacy instruction set from the target architecture. This mediator layer provides translation capability while simultaneously enabling flexibility in choosing different target architectures and optimization strategies.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If static compilation is used for legacy programs, then execution speed is improved, but adaptability to runtime conditions deteriorates

Engineering Contradiction:
Improveexecution speedVSAvoidadaptability to runtime conditions
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements dynamic compilation where basic blocks are compiled to native code at runtime based on actual execution patterns. This dynamic approach allows the system to adapt to runtime conditions while still achieving the execution speed benefits of compilation for frequently executed code.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent performs preliminary compilation of basic blocks to intermediate representation during program execution, allowing optimization decisions to be made with actual runtime information available. This preliminary action enables both speed improvement through compilation and adaptability through runtime awareness.

Inventive Principle:
Principle #10Preliminary action

4Productivity

If entire programs are compiled at once, then optimization opportunities are maximized, but compilation time and memory usage increase

Engineering Contradiction:
Improveoptimization effectivenessVSAvoidcompilation time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments the program into basic blocks and compiles them individually or in small groups rather than compiling the entire program at once. This segmentation maintains optimization effectiveness within each block while significantly reducing compilation time and memory requirements.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial compilation by selecting and compiling only the most frequently executed basic blocks or critical paths. This partial action provides sufficient optimization effectiveness for the hot paths while avoiding the overhead of compiling less important code sections.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20240231864A9Hybrid just in time load module compiler with performance optimizations
Publication Date: 2024.07.11 LZLABS GMBH
  • US20240231864A9 patent drawing
  • US20240231864A9 patent drawing
  • US20240231864A9 patent drawing

AI summary

The disclosure provides methods for generating libraries of transformation functions and for executing programs compiled for a source architecture on machines having a different target architecture using a hybrid just-in-time load module compiler, a non-transitory computer-readable medium to store instructions for performing such methods, and systems for performing such methods. The systems and methods may enable effective operation of the load module compiler with self-modifying code, and may apply optimizations in the selections of basic blocks for just-in-time compilation, and in the use of optimized library functions to improve system performance.