Compiler Selective Function Conversion for Branch Argument Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilation technologies face challenges in improving software execution performance, particularly when handling case statements, as they often result in increased access times due to argument handling on the stack rather than registers, and may lead to larger object code sizes and memory resource consumption.

Innovation Solution

An information processing device that selectively converts functions with branch instructions, determining whether arguments are passable through registers, and converting them if so, to reduce stack access times and maintain efficient memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the processing content of case statements is functionalized, then the software execution performance may be improved, but the access time to arguments increases due to handling on the stack

Engineering Contradiction:
Improvesoftware execution performanceVSAvoidaccess time to arguments
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies local quality by making different parts of the code have different argument passing strategies. Specifically, it identifies that certain functions within branch destinations can have their arguments passed through registers while others use stack, based on local analysis of argument usage patterns. This allows optimal argument passing mode to be applied locally where it matters most, improving access time without compromising overall execution performance gains from functionalization.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the parameter of argument passing mode from a fixed stack-based approach to a dynamic selection between register and stack based on analysis results. By analyzing which arguments are actually used in each branch destination and changing the passing mode parameter accordingly, the system reduces access time for frequently used arguments while maintaining the performance benefits of functionalization.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If functions with branch instructions are converted by functionalizing branch destinations, then software execution performance is improved, but the object code size and memory resource consumption increase

Engineering Contradiction:
Improvesoftware execution performanceVSAvoidobject code size
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent extracts only the necessary functional components from branch destinations for conversion. Instead of converting all branch destinations uniformly, it analyzes and extracts only those functions whose arguments can be efficiently passed through registers, leaving other parts unchanged. This selective extraction approach maintains execution performance improvements while minimizing the increase in object code size and memory consumption.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by performing functionalization selectively rather than completely. It converts only the portion of functions that benefit from register-based argument passing, avoiding unnecessary conversion of other parts. This partial conversion strategy achieves sufficient performance improvement without the full overhead of complete functionalization, thus controlling object code size growth.

Inventive Principle:
Principle #16Partial or excessive action

3Loss of time

If arguments are passed through registers instead of stack, then argument access time is reduced, but the complexity of determining passability increases

Engineering Contradiction:
Improveargument access timeVSAvoidcomplexity of determining argument passability
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by performing static analysis of argument usage patterns before code generation. It pre-determines which arguments can be passed through registers by analyzing their usage in branch destinations ahead of time, storing this information for use during compilation. This preliminary determination simplifies the actual argument passing decision during code generation, reducing the complexity of real-time decisions while achieving fast register-based access.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary analysis phase that acts as a mediator between source code and compiled code. This intermediary step analyzes argument usage patterns and generates metadata about which arguments are suitable for register passing. This intermediary layer simplifies the complexity by separating the difficult analysis task from the code generation task, allowing the compiler to make informed decisions without directly handling the full complexity of argument passability determination.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10445095B2Information processing device, compiler method, and recording medium recording compiler program
Publication Date: 2019.10.15 FUJITSU LTD
  • US10445095B2 patent drawing
  • US10445095B2 patent drawing
  • US10445095B2 patent drawing

AI summary

An information processing device includes: a memory; and a processor coupled to the memory, the processor specifies a function including a branch instruction including one or more branch destinations in a program code; determines, based on a first number of arguments which are referenced in one branch destination among the one or more branch destinations, whether or not an argument of one function obtained by functionalizing the one branch destination are passable through a register; and converts, when determining to be passable, the specified function using one or more functions obtained by functionalizing the one or more branch destinations and does not convert, when determining not to be passable, the specified function.