Adaptive Compiler Optimization via Segment-Level Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Advanced compilers apply a subset of optimizations indiscriminately across all code segments, leading to sub-optimal performance due to incorrect application of speculative optimizations and lack of precision in applying non-speculative optimizations, making it difficult for developers to selectively apply optimizations to specific functions.

Innovation Solution

A rule-based optimization analyzer (RUBOA) that compiles source code in a canonical manner, generates annotations to associate compiled code with source code segments, and uses performance data to apply tailored optimizations to specific code segments, automatically generating optimization control data for re-compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If compilers apply optimizations indiscriminately across all code segments, then the compilation process covers all functions, but the performance is sub-optimal due to incorrect application of speculative optimizations

Engineering Contradiction:
Improveoptimization correctnessVSAvoidcompilation performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the code base into distinct code segments with unique performance characteristics, allowing different optimization strategies to be applied to each segment based on its specific needs rather than applying a uniform optimization approach across the entire program

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements local quality by tailoring optimization parameters and strategies to match the specific performance characteristics of each code segment, ensuring that speculative optimizations are only applied where appropriate and that each segment receives the most suitable optimization treatment

Inventive Principle:
Principle #3Local quality

2Productivity

If speculative optimizations are applied to selected functions, then performance can be improved, but it is difficult for users to instruct the compiler to perform speculative optimizations on specific functions

Engineering Contradiction:
Improveexecution performanceVSAvoidoptimization control
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The patent implements self-service by automatically analyzing performance data from code segment execution and autonomously determining which speculative optimizations should be applied to which code segments, eliminating the need for manual user configuration while still achieving performance improvements

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent uses feedback from performance data collected during code segment execution to dynamically adjust and determine the appropriate speculative optimizations, creating a closed-loop system that continuously improves based on actual runtime characteristics

Inventive Principle:
Principle #23Feedback

3Device complexity

If non-speculative optimizations are applied in a one-size-fits-all manner, then the compilation process is simple, but the performance is sub-optimal due to lack of precision

Engineering Contradiction:
Improvecompilation complexityVSAvoidcode execution performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent introduces dynamics by making the optimization process adaptive and responsive to measured performance characteristics, allowing the compiler to dynamically adjust optimization parameters based on actual code segment behavior rather than using static, predetermined optimization settings

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20160085528A1Automated adaptive compiler optimization
Publication Date: 2016.03.24 ORACLE INT CORP
  • US20160085528A1 patent drawing
  • US20160085528A1 patent drawing
  • US20160085528A1 patent drawing

AI summary

Embodiments of the invention provide systems and methods for automatically and adaptively optimizing compilation of application code using a rule-based optimization analyzer (RUBOA) that can command a compiler to apply and adapt optimizations at the code segment level according to gathered performance data. For example, source code can be canonically compiled, and annotations can associate compiled code sections with source code sections. The generated binary can then be executed and monitored to gather performance characteristics. The RUBOA can apply the gathered performance characteristics and annotations to a pre-defined rule set to generate compiler optimizations, each associated with and parametrically tailored to respective source code segments. The RUBOA can automatically generate optimization control data from the generated compiler optimizations, and the source application code can be re-compiled according to the set of optimization control data to generate executable code that is adaptively optimized at the code segment level.