Interactive Code Optimizer Pipeline for Compiler Visibility

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developers face challenges in understanding and optimizing program code due to limited visibility into compiler optimizer processes, lacking 'what-if' experimentation capabilities and inadequate representations of code transformations.

Innovation Solution

A computing device and method that allows interactive editing of intermediate optimizer representations during the optimization process, enabling users to select optimization pipelines, execute passes, and generate program code representations at each stage, facilitating experimentation and verification of code changes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a compiler optimizer executes multiple passes to optimize program code, then the code performance is improved, but the developer's understanding and control over the optimization process deteriorates due to limited visibility into intermediate transformations

Engineering Contradiction:
Improvecode performanceVSAvoiddeveloper understanding and control
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The optimization process is segmented into multiple discrete passes, each producing an intermediate representation of the code. Developers can inspect and interact with each pass's output separately, gaining visibility and control over the optimization transformations while maintaining the benefits of multiple optimization passes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An interactive interface acts as an intermediary between the compiler optimizer and the developer. This interface displays intermediate code representations after each pass and allows developers to input edits, which are then fed back into the optimization pipeline, enabling controlled interaction without disrupting the optimization process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the compiler provides limited representations of code during optimization passes, then the compilation process remains efficient, but the developer's ability to verify and debug code transformations deteriorates

Engineering Contradiction:
Improvecompilation efficiencyVSAvoidcode transformation verification
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The code representation system is made dynamic, allowing the level of detail and format of intermediate representations to be adjusted based on developer needs. The system can provide more detailed views when verification is needed while maintaining efficiency during routine compilation, adapting to the current operational context.

Inventive Principle:
Principle #15Dynamics

3Ease of operation

If developers manually inspect each optimization pass output, then visibility into code transformations is improved, but the time required for the compilation process increases

Engineering Contradiction:
Improvevisibility into code transformationsVSAvoidcompilation time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The system implements feedback mechanisms where the intermediate representations are automatically presented to developers in a structured manner, and developer inputs are automatically incorporated into subsequent optimization passes. This reduces the manual iteration time while maintaining comprehensive visibility into transformations.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP3989059B1Interactive code optimizer
Publication Date: 2024.05.22 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP3989059B1 patent drawingFigure 1
  • EP3989059B1 patent drawingFigure 2
  • EP3989059B1 patent drawingFigure 3

AI summary

Methods and devices for generating program code representations may include receiving program code or edited program code for an application executing on the computer device. The methods and devices may include receiving an identification of a selected pipeline from a plurality of pipelines that defines a plurality of passes of actions to execute on the program code or the edited program code to optimize the program code or the edited program code. The methods and devices may include running the selected pipeline and generate optimizer output with a program code representation of the program code.