Local Entry Point for Indirect Function Calls

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computer systems face inefficiencies in using indirect function calls due to the need for recalculating global entry points, which is less efficient than using local entry points when the caller and callee share the same TOC pointer value, leading to increased processor resource utilization and reduced performance.

Innovation Solution

A method is implemented to configure indirect function calls by determining if a function pointer value is for local-use-only, allowing the use of a local entry point instead of a global entry point, thereby optimizing function calls by saving and restoring the TOC pointer only when necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If global entry points are used for indirect function calls, then compatibility across different modules is ensured, but processor resource utilization increases due to recalculation overhead

Engineering Contradiction:
ImprovecompatibilityVSAvoidprocessor resource utilization
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies local quality by differentiating between global and local entry points based on the specific calling context. When the caller and callee share the same TOC pointer value, the system uses local entry points that eliminate recalculation overhead. This localized optimization maintains compatibility where needed while reducing processor resource utilization in appropriate contexts.

Inventive Principle:
Principle #3Local quality

2Productivity

If local entry points are used for function calls, then processor efficiency is improved, but compatibility is reduced when caller and callee have different TOC pointer values

Engineering Contradiction:
Improveprocessor efficiencyVSAvoidcompatibility
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements dynamics by making the entry point selection adaptive rather than static. The system dynamically determines whether to use global or local entry points based on runtime conditions, specifically whether the caller and callee share the same TOC pointer value. This dynamic approach allows the system to optimize for processor efficiency when conditions permit while maintaining compatibility when conditions require it.

Inventive Principle:
Principle #15Dynamics

3Measurement precision

If global entry points are recalculated for each indirect call, then correct addressing is ensured, but execution time increases

Engineering Contradiction:
Improveaddressing accuracyVSAvoidexecution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-establishing local entry points that encode addressing information in a form that does not require recalculation during execution. When the caller and callee share the same TOC pointer value, the local entry point is prepared in advance to directly provide the correct address, eliminating the recalculization step and thus reducing execution time while maintaining addressing accuracy.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10223087B2Comparisons in function pointer localization
Publication Date: 2019.03.05 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10223087B2 patent drawing
  • US10223087B2 patent drawing
  • US10223087B2 patent drawing

AI summary

Embodiments relate to using a local entry point with an indirect call function. More specifically, an indirect call function configuration comprises a first application module having a target function of the indirect function call, a second application module with a symbolic reference to the target function of the indirect function call, and a third application module to originate an indirect function call. A compiler determines and indicates, in the program code, that the function pointer value resulting from a non-call reference of a function symbol is solely used to perform indirect calls in the same module or comparisons against function pointers. A linker or loader can read the indication the compiler made in the program code. The linker or loader use the local entry point associated with the target function if the target function is defined in the same module as the reference and is local-use-only.