JIT Compiler Branch Optimization for Execution Stalls
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Just-in-time (JIT) compilers produce native code that often results in stalls or bubbles during processor execution due to branching instructions, particularly in customized processors like those in handheld devices, leading to suboptimal performance.
Innovation Solution
A Java virtual machine equipped with a JIT compiler that includes optimizers capable of recognizing patterns in Java byte code, such as branching instructions, and optimizing them into native code conditional instructions to produce optimized native code that executes more efficiently on specific processing platforms.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If branching instructions are used in Java byte code compilation, then control flow is achieved, but execution stalls and bubbles occur in the processor pipeline
Solution Approach 1:
The patent transforms branching instructions into conditional instructions by changing the operational parameters of the code. Instead of using traditional branch instructions that cause pipeline stalls, the compiler generates conditional instructions that evaluate conditions and execute corresponding operations without disrupting the processor pipeline, thereby eliminating execution stalls while maintaining control flow.
Solution Approach 2:
The patent substitutes the mechanical branching mechanism with a conditional instruction mechanism. Rather than relying on branch instructions that require pipeline flushing and cause stalls, the system uses conditional instructions that can be executed continuously in the pipeline, replacing the stall-prone branching mechanism with a streamlined conditional execution approach.
2Productivity
If standard JIT compilation is used, then Java byte code is converted to native code, but the generated native code cannot be efficiently executed on customized processors
Solution Approach 1:
The patent applies local quality by tailoring the code generation to the specific characteristics of the target processor. The JIT compiler analyzes the processor's instruction set and capabilities, then generates native code optimized for that specific platform. This includes selecting appropriate conditional instructions and optimization strategies that match the processor's architecture, thereby maximizing execution efficiency on customized processors while avoiding generic code that would underperform.
Data Source
AI summary
A Java virtual machine includes a just in time (JIT) Java compiler. The JIT compiler includes at least one optimizer. Each of the at least one optimizer includes logic for recognizing a pattern in a received Java byte code, logic for optimizing the recognized pattern to produce optimized native code and logic for outputting optimized native code. A method of producing optimized native code is also provided.

