Binary Translation for Efficient Parameter Passing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for compiling applications often result in inefficient parameter passing between functions due to the use of outdated binary interface rules, leading to increased overhead and reduced compatibility with modern hardware and operating system improvements.

Innovation Solution

A system and method that analyze a binary executable to identify and modify selected caller/callee pairs to adopt more efficient parameter passing conventions by updating the binary interface rules, reducing the number of instructions required for parameter passing, and utilizing a function cloner to maintain compatibility with unmodified caller functions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a compiler works on individual modules using ABI-defined parameter passing conventions, then compatibility between modules from different vendors is ensured, but execution efficiency is reduced due to suboptimal parameter passing methods

Engineering Contradiction:
ImprovecompatibilityVSAvoidexecution efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system segments the binary executable into individual function units and identifies specific caller/callee pairs for optimization. By working at the function pair level rather than entire modules, the system can apply optimized parameter passing conventions to specific functions while maintaining ABI compliance at the module level, thus resolving the contradiction between compatibility and efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the parameter passing conventions from traditional ABI-defined methods to more efficient alternatives for selected function pairs. By modifying how parameters are passed (e.g., changing register allocation, stack frame usage) for specific optimized functions while keeping other functions unchanged, the system achieves both compatibility preservation and execution efficiency improvement.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If optimized parameter passing conventions are applied to improve execution efficiency, then fewer instructions are required for parameter passing, but compatibility with unmodified modules may be compromised

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcompatibility
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system applies different parameter passing conventions to different parts of the program. Selected caller/callee pairs receive optimized parameter passing treatment while other functions continue to use traditional ABI conventions. This localized optimization approach ensures that efficiency improvements are achieved where possible without compromising overall compatibility with unmodified modules.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system creates copies of functions when needed to apply optimized parameter passing conventions. By cloning selected functions and applying optimizations to the clones while leaving originals unchanged, the system can improve execution efficiency for specific function pairs without affecting compatibility with code that expects the original ABI-compliant behavior.

Inventive Principle:
Principle #26Copying

3Reliability

If manual review of all caller and callee function pairs is performed to ensure consistent parameter passing assumptions, then compatibility is maintained, but development time and complexity increase significantly

Engineering Contradiction:
Improveparameter passing consistencyVSAvoiddevelopment complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system automatically analyzes the binary executable, identifies suitable caller/callee pairs for optimization, and applies optimized parameter passing conventions without requiring manual review. The automated process includes searching for function pairs, determining optimization opportunities, applying transformations, and verifying consistency, thereby eliminating the need for manual intervention while maintaining parameter passing consistency.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system incorporates feedback mechanisms to verify that optimized parameter passing conventions maintain consistency across caller/callee pairs. By automatically checking and validating the optimized code, the system ensures parameter passing consistency without manual review, reducing development complexity while maintaining reliability.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS7861234B1System and method for binary translation to improve parameter passing
Publication Date: 2010.12.28 ORACLE AMERICAN INC
  • US7861234B1 patent drawing
  • US7861234B1 patent drawing
  • US7861234B1 patent drawing

AI summary

An application compiled to a binary executable according to a first set of binary interface rules has selected caller/callee pairs that present parameter passing improvement possibilities modified from compliance with the first set of binary interface rules to compliance with a second set of binary interface rules to improve the efficiency of parameter passing, such as by reducing the number of instructions used to pass the parameters. A binary executable search engine searches the binary executable to locate functions having parameter passing improvement possibilities. Identified caller/callee function pairs are updated with a function modifier to pass the parameters more efficiently. Selected of the identified callee functions are cloned so that a cloned function is modified instead of the original function, thus leaving the original function to pass parameters with functions beyond the view of the binary executable search engine.