Variable Assignment Sinking in Compiler Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for variable assignment sinking in computer programs are impractical due to the complexity of partial redundancy dataflow analysis and are not effective in emulation environments, especially when targeting multiple processors.

Innovation Solution

A computer-implemented method that identifies live variable assignments and moves them closer to their points of use, optimizing register efficiency by eliminating unnecessary assignments and simplifying dataflow analysis, suitable for both compiler and binary translator environments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If partial redundancy dataflow analysis is used to identify exact locations for variable assignment sinking, then variable assignment optimization is improved, but compile time complexity increases significantly

Engineering Contradiction:
Improvevariable assignment optimizationVSAvoidcompile time complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the complex partial redundancy dataflow analysis into simpler components by using basic reachability analysis instead. Rather than performing comprehensive redundancy analysis, the system divides the problem into identifying live variables through simple reachability checks, which can be done independently for each variable without the complex interdependencies of full partial redundancy analysis.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the essential functionality needed for variable assignment sinking by removing the complex partial redundancy analysis component. It keeps only the critical reachability analysis that determines whether a variable is live at a given point, discarding the unnecessary complexity of full redundancy detection while maintaining the core optimization capability.

Inventive Principle:
Principle #2Taking out (Extraction)

2Productivity

If processor-specific mechanisms are used to remove assignments in emulation environment, then optimization for specific architecture is improved, but adaptability to multiple processors deteriorates

Engineering Contradiction:
Improveoptimization efficiencyVSAvoidmulti-processor compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements a universal variable assignment sinking mechanism that works across multiple processor architectures. By using generic reachability analysis and control flow graph techniques rather than processor-specific instructions, the system achieves multi-functionality that can optimize code for different target architectures without requiring architecture-specific implementation details.

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

Solution Approach 2:

The patent changes the approach from fixed processor-specific parameters to flexible, architecture-agnostic parameters. The reachability analysis and control flow representation use standardized concepts that can be mapped to different processor architectures, allowing the same optimization algorithm to adapt to various target platforms by changing only the backend code generation parameters.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS8555266B2Managing variable assignments in a program
Publication Date: 2013.10.08 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8555266B2 patent drawing
  • US8555266B2 patent drawing
  • US8555266B2 patent drawing

AI summary

A computer-implemented method, apparatus, and computer program product to manage variable assignments in a program. The process identifies a set of variable assignments that is live on a portion of paths to form a set of identified variable assignments. Each of the set of identified variable assignments assign a value to at least one variable of a set of variables. The process determines a set of program points at which the set of identified variable assignments is live on all paths. The process also moves the set of identified variable assignments to the set of program points in response to determining that the set of identified variable assignments is movable to the set of program points.