Compiler Loop Frequency Collection Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compiler technologies require a long time to process the collection of execution path frequencies in programs, despite being able to adequately collect this data.

Innovation Solution

A compiler apparatus and method that includes a loop process detection portion, loop process frequency collection portion, in-loop process frequency collection portion, in-loop execution information generating portion, and optimization portion to efficiently collect and optimize program execution frequencies, generating in-loop execution information for optimizing the program based on collected frequencies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If path profiling technology is used to collect execution path frequencies, then measurement precision is improved, but loss of time increases

Engineering Contradiction:
Improveexecution path frequency collection accuracyVSAvoidcompilation processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the program into loop processes and in-loop processes, collecting frequencies at different levels. The loop process frequency collection portion collects frequencies for loop structures, while the in-loop process frequency collection portion collects frequencies for processes within loops. This segmentation allows efficient collection by focusing on critical loop regions rather than profiling the entire program, thus reducing time loss while maintaining measurement precision.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary identification of loop processes before frequency collection. The loop process detection portion identifies loop structures in advance, allowing the compiler to prepare appropriate collection strategies for these critical regions. This preliminary action enables more efficient frequency collection by pre-organizing the program structure and determining which regions require detailed profiling.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If comprehensive path profiling is performed to accurately measure execution frequencies, then measurement precision is improved, but device complexity increases

Engineering Contradiction:
Improveexecution frequency measurement accuracyVSAvoidcompiler apparatus complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The compiler apparatus is segmented into specialized portions with distinct responsibilities: loop process detection portion identifies loops, loop process frequency collection portion collects loop frequencies, in-loop process frequency collection portion collects internal process frequencies, and in-loop execution information generating portion synthesizes the data. This segmentation reduces device complexity by creating modular, focused components rather than a monolithic complex system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The in-loop execution information generating portion acts as an intermediary that synthesizes data from both the loop process frequency collection and in-loop process frequency collection portions. This intermediary component integrates information from multiple sources to produce comprehensive execution frequency data, simplifying the overall system architecture by providing a centralized point for data synthesis and optimization decision-making.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS7398522B2Compilation and runtime information generation and optimization
Publication Date: 2008.07.08 META PLATFORMS INC
  • US7398522B2 patent drawing
  • US7398522B2 patent drawing
  • US7398522B2 patent drawing

AI summary

To collect frequencies with which processes of a program are executed at high speed. A compiler apparatus for optimizing a program based on frequencies with which each process is executed has a loop process detection portion for detecting a repeatedly executed loop process of the program, a loop process frequency collection portion for collecting loop process frequencies with which the loop process is executed in the program, an in-loop process frequency collection portion for collecting in-loop process frequencies with which, as against times of execution of loop process, each of a plurality of in-loop processes included in the loop process is executed, an in-loop execution information generating portion for generating in-loop execution information indicating the frequencies with which each of the plurality of in-loop processes is executed in the case where the program is executed, and an optimization portion for optimizing the program based on the in-loop execution information.