Intermediate Language Directed Graph Meta-Node Insertion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compiler technologies face inefficiencies in modifying and analyzing intermediate language code, particularly during just-in-time compilation, due to the need for multiple passes over the code and repeated computation of offsets, which slows down program execution.

Innovation Solution

A system and method that utilize a directed graph representation of the function, including meta-nodes and meta-edges, to efficiently locate and modify instructions, allowing for single-pass insertion of meta-nodes and meta-edges, thereby avoiding the need for additional scans and minimizing computational overhead during execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If multiple passes over the IL are performed to insert instructions, then the inserted instructions are included in the native language, but the execution time increases due to repeated computation of offsets

Engineering Contradiction:
Improvecorrectness of instruction insertionVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent pre-calculates and stores offset information in a lookup table during the first pass over the intermediate language. This preliminary action allows subsequent instruction insertions to reference pre-computed offsets without recalculating them, thereby reducing execution time while maintaining correctness of instruction insertion.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the intermediate language representation with offset information extracted and stored separately in a lookup table. This copying approach allows the original IL to be modified without repeatedly computing offsets, as the lookup table provides direct access to offset values needed for instruction insertion.

Inventive Principle:
Principle #26Copying

2Productivity

If instructions are inserted during JIT compilation, then the program can be executed, but the operations performed during execution are slow

Engineering Contradiction:
Improveprogram execution capabilityVSAvoidexecution speed
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The patent performs offset pre-computation and instruction insertion准备工作 during the JIT compilation phase before the program is executed. By completing these operations in advance, the actual program execution can proceed at full speed without the overhead of repeated offset calculations and multiple IL passes.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts offset calculation operations from the execution path and places them in the compilation phase. The lookup table stores pre-computed offset values that can be directly used during execution, separating the time-consuming computational work from the performance-critical execution path.

Inventive Principle:
Principle #2Taking out (Extraction)

3Manufacturing precision

If repeated computation of offsets is performed, then instructions can be inserted at correct positions, but computational overhead increases

Engineering Contradiction:
Improveinstruction positioning accuracyVSAvoidcomputational overhead
Core Design Contradiction:
Manufacturing precisionVSUse of energy by moving object

Solution Approach 1:

The patent creates a lookup table that copies and stores offset information extracted from the intermediate language during the first pass. This copied offset data can be referenced multiple times without recomputation, ensuring accurate instruction positioning while minimizing computational overhead during subsequent operations.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent pre-computes all offset values needed for instruction insertion and stores them in the lookup table before the program is executed. This preliminary computation ensures that instructions are positioned accurately when inserted, while the stored offset values eliminate the need for repeated computation during execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8875111B2Intermediate language representation and modification
Publication Date: 2014.10.28 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8875111B2 patent drawing
  • US8875111B2 patent drawing
  • US8875111B2 patent drawing

AI summary

A system and method for facilitating analysis and modification of a computer program. A directed graph is generated from an intermediate language representation of a computer program function, with a node representing each instruction. Meta-edges or meta-nodes are inserted into the directed graph to facilitate location of instruction nodes. One type of meta-edge is a back edge that identifies branch instruction nodes. Some meta-nodes may identify instructions of a specific type. Some meta-nodes may identify exception blocks and corresponding handlers. Analysis of a program function may include insertion of new instructions prior to execution of the function.