JIT Function Generation for Compiler Development Bottlenecks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing Just-In-Time (JIT) compiler technology requires developers to manually write and test functions for generating machine language, which is time-consuming and labor-intensive, especially given the large number of instructions in modern processor instruction sets, leading to increased man-hours and potential errors.

Innovation Solution

A non-transitory computer-readable recording medium storing a function generation program that automatically generates mnemonic functions by referring to instruction information, including the mnemonic and number of operands for each instruction, allowing the program to create machine code emitter functions that write machine language directly to memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If JIT compiler technology is used to generate machine-language instruction sequences at runtime, then program execution speed is improved, but the man-hours required to manually write and test functions for each instruction are enormously increased

Engineering Contradiction:
Improveprogram execution speedVSAvoidman-hours for function generation and testing
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system enables automatic generation of mnemonic functions through self-service mechanisms. The function generation unit automatically creates functions by referencing instruction information, eliminating the need for manual writing and testing of each function. This self-service approach directly addresses the contradiction by maintaining runtime code generation speed while dramatically reducing development time投入

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary action by pre-preparing instruction information that contains all necessary details about processor instructions. This preliminary preparation enables the automatic function generation process to efficiently create runtime functions without manual intervention, thus improving execution speed while reducing development man-hours

Inventive Principle:
Principle #10Preliminary action

2Reliability

If manual function writing and testing is performed for each instruction, then correct machine language generation can be achieved, but the complexity of the development process is enormously increased

Engineering Contradiction:
Improvecorrectness of machine language generationVSAvoidcomplexity of function generation process
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system introduces an intermediary mechanism - the function generation unit that automatically generates mnemonic functions by referencing instruction information. This intermediary eliminates the need for complex manual processes while ensuring correctness through systematic generation, thus maintaining reliability while reducing process complexity

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The development process is segmented into distinct functional units: instruction information storage, function generation, and code emission. This segmentation allows each component to be independently developed and tested, reducing overall complexity while maintaining correctness through modular verification

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If a large number of mnemonic functions are manually created for modern processor instruction sets, then complete instruction coverage is achieved, but the time and effort required for function generation is enormously increased

Engineering Contradiction:
Improveinstruction set coverageVSAvoidfunction generation efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The function generation unit serves as a universal mechanism that can generate functions for any instruction in the processor instruction set by referencing instruction information. This multi-functional approach enables complete instruction coverage without manually creating each function, thus achieving versatility while maintaining high generation efficiency

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

Solution Approach 2:

The system changes the parameter of function generation from manual writing to automatic generation based on instruction information parameters. This parameter change enables the system to efficiently handle large numbers of instructions by systematically varying instruction parameters rather than manually creating each function, thus achieving complete coverage while maintaining productivity

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11886839B2Non-transitory computer-readable recording medium, function generation method, and information processing device
Publication Date: 2024.01.30 FUJITSU LTD
  • US11886839B2 patent drawing
  • US11886839B2 patent drawing
  • US11886839B2 patent drawing

AI summary

Provided is a non-transitory computer-readable recording medium storing a function generation program that causes a computer to execute a process, the process including referring to a storage unit that stores instruction information about an instruction to generate a first function that corresponds to the instruction and receives one or more arguments representing one or more operands of the instruction, generating first code inside the first function, where the first code calls a second function that returns machine language representing a process executed by the instruction for the one or more operands represented by the one or more arguments, and generating second code inside the first function, where the second code writes the machine language in a memory.