SSA to Data Flow Graph Mapping via PHI Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional methods for converting static single assignment (SSA) formatted software instructions to data flow graphs are error-prone and often impossible for certain architectures, as they require transforming SSA code out of its format to eliminate PHI nodes and handle multiple uses of variables, which is not directly feasible in data flow architectures.

Innovation Solution

A compiler with a mapping manager that includes a variable handler and a PHI handler to modify SSA instructions by renaming variables, inserting copy and control flow instructions, and mapping PHI instructions to PICK instructions, allowing direct conversion to a data flow graph without transforming out of the SSA format.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional methods are used to convert SSA instructions to data flow graphs by transforming out of SSA format, then PHI nodes and multiple variable uses can be handled, but the conversion becomes error-prone and impossible for certain architectures

Engineering Contradiction:
Improveconversion accuracyVSAvoidconversion process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Instead of transforming SSA code out of SSA format to eliminate PHI nodes, the patent inverts the approach by directly mapping PHI instructions to PICK instructions in the data flow graph while maintaining SSA format throughout the compilation process. This allows accurate handling of multiple variable uses without leaving the SSA representation.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The patent introduces PICK instructions as an intermediary mechanism that enables direct mapping of PHI instructions to data flow graph operations. The PICK instruction serves as a mediator that selects values based on control flow conditions without requiring transformation out of SSA format, thereby maintaining reliability while simplifying the conversion process.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Manufacturing precision

If SSA format is maintained throughout conversion, then accuracy and efficiency are preserved, but direct mapping to data flow graph is not feasible due to PHI nodes

Engineering Contradiction:
Improveinstruction conversion precisionVSAvoidconversion feasibility
Core Design Contradiction:
Manufacturing precisionVSEase of manufacture

Solution Approach 1:

The PICK instruction acts as an intermediary that bridges SSA format requirements with data flow graph execution needs. It enables direct mapping of PHI instructions by providing a mechanism to select values based on control flow without breaking SSA format, thus maintaining both precision and feasibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the representation parameter of control flow instructions by mapping PHI instructions to PICK instructions with specific operands and control conditions. This parameter transformation allows SSA format to be directly compatible with data flow graph execution semantics.

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If PHI instructions are directly mapped to PICK instructions, then conversion accuracy improves, but the mapping process becomes more complex

Engineering Contradiction:
Improvemapping accuracyVSAvoidmapping process complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the mapping process into distinct phases: analyzing SSA instructions to identify PHI nodes, generating corresponding PICK instructions with appropriate operands, and integrating them into the data flow graph. This segmentation improves accuracy by systematically handling each aspect while managing complexity through structured processing.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The compiler performs preliminary analysis of SSA instructions to identify PHI nodes and determine their mapping to PICK instructions before generating the final data flow graph. This preliminary action ensures accurate mapping by pre-computing necessary information about control dependencies and operand selections.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10346144B2Methods and apparatus to map single static assignment instructions onto a data flow graph in a data flow architecture
Publication Date: 2019.07.09 INTEL CORP
  • US10346144B2 patent drawing
  • US10346144B2 patent drawing
  • US10346144B2 patent drawing

AI summary

Methods, apparatus, systems and articles of manufacture to map a set of instructions onto a data flow graph are disclosed herein. An example apparatus includes a variable handler to modify a variable in the set of instructions. The variable is used multiple times in the set of instructions and the set of instructions are in a static single assignment form. The apparatus also includes a PHI handler to replace a PHI instruction contained in the set of instructions with a set of control data flow instructions and a data flow graph generator to map the set of instructions modified by the variable handler and the PHI handler onto a data flow graph without transforming the instructions out of the static single assignment form.