Compiler Pass Manager Time Budget Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Compilers often face lengthy optimization times during the compilation process, leading to delays in user experience, particularly in applications like computer games and mobile devices, where excessive processing can consume battery life and result in unacceptable wait times.

Innovation Solution

Implementing a pass manager that allocates a time budget for optimization passes, allowing more complex passes to exceed this budget while reducing time for simpler passes, and dynamically configuring the compiler by reordering or eliminating optimization passes based on program-specific characteristics and goals such as power saving or memory optimization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If comprehensive optimization passes are executed to improve code quality, then code optimization quality is improved, but compilation time increases excessively

Engineering Contradiction:
Improvecode optimization qualityVSAvoidcompilation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent segments the optimization process into multiple passes with different priorities and resource requirements. The pass manager divides comprehensive optimization into staged execution, allowing critical optimization passes to complete while less critical passes are suspended or terminated when time limits are exceeded, thus balancing code quality improvement with compilation time control

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameter of optimization pass execution by introducing time budget constraints and dynamic allocation mechanisms. The pass manager adjusts execution parameters of optimization passes based on remaining time budgets, systematically transitioning from full execution to selective execution as time constraints are approached, thereby resolving the contradiction between optimization quality and compilation time

Inventive Principle:
Principle #35Parameter changes

2Speed

If complex optimization passes are executed to achieve better code performance, then code execution speed is improved, but processor and memory resources are excessively consumed

Engineering Contradiction:
Improvecode execution speedVSAvoidprocessor and memory resources
Core Design Contradiction:
SpeedVSPower

Solution Approach 1:

The patent introduces dynamic resource allocation and adjustment mechanisms where the pass manager continuously monitors processor and memory resource consumption during optimization pass execution. Based on real-time resource availability and pre-configured thresholds, the system dynamically adjusts which optimization passes execute and for how long, enabling better code performance when resources are abundant while preventing excessive resource consumption when resources are limited

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent applies partial action by executing only a subset of available optimization passes within resource constraints. Rather than executing all optimization passes regardless of resource availability, the system selectively executes passes that provide the most benefit within the allocated processor and memory budgets, achieving satisfactory code performance without excessive resource consumption

Inventive Principle:
Principle #16Partial or excessive action

3Manufacturing precision

If optimization passes are executed to improve code quality, then code performance is improved, but user waiting time increases

Engineering Contradiction:
Improvecode qualityVSAvoiduser waiting time
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent implements preliminary action by pre-configuring time budgets and priority levels for different optimization passes before compilation begins. The pass manager uses these pre-established parameters to make real-time decisions about which passes to execute and when to terminate execution, ensuring that critical optimization passes complete within acceptable time frames while less critical passes are suspended or skipped, thereby improving code quality without excessive user waiting time

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP2965198B1Reducing excessive compilation times
Publication Date: 2019.04.17 QUALCOMM INC
  • EP2965198B1 patent drawingFigure 1
  • EP2965198B1 patent drawingFigure 2
  • EP2965198B1 patent drawingFigure 3

AI summary

In one example, a device includes one or more processors configured to determine an allocated time for execution of an optimization pass for optimizing code for a software program, execute at least some instructions of the optimization pass on the code, and, in response to determining that an actual time for execution of the optimization pass has exceeded the allocated time for execution, preventing execution of subsequent instructions of the optimization pass.