Local Entry Points 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 reside in the same module, leading to increased processor resource utilization and memory usage.

Innovation Solution

A system and method that allow the use of local entry points for indirect function calls by determining if a function pointer value is local-use-only, enabling the compiler, linker, and loader to resolve symbolic references using local entry points instead of global ones, optimizing function calls within the same module.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If global entry points are used for indirect function calls, then compatibility and correctness are ensured, but processor resource utilization and memory usage increase

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

Solution Approach 1:

The patent applies local quality by providing different entry point implementations for different usage scenarios: local entry points for intra-module calls and global entry points for inter-module calls. The compiler determines the module location of function pointers and selects appropriate entry points, enabling optimized local calls while maintaining correct global calls, thus reducing processor resource utilization for local calls while preserving compatibility.

Inventive Principle:
Principle #3Local quality

2Reliability

If global entry points are used for indirect function calls, then correctness is maintained, but memory usage increases

Engineering Contradiction:
ImprovecorrectnessVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements local quality by creating separate local entry point code segments for functions within the same module. These local entry points contain only the essential code to jump to the function body, eliminating the need for global entry point infrastructure (TOC register management, relocation entries) for intra-module calls, thus reducing memory usage while maintaining correctness.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments the entry point functionality into global and local variants. Global entry points handle inter-module calls with full ABI compliance, while local entry points handle intra-module calls with optimized direct jumps. This segmentation allows the system to use the minimal necessary memory structure for each call type, reducing overall memory usage.

Inventive Principle:
Principle #1Segmentation

3Productivity

If local entry points are used for indirect function calls, then processor efficiency improves, but compatibility and correctness may be compromised

Engineering Contradiction:
Improveprocessor efficiencyVSAvoidcompatibility
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies dynamics by making the entry point selection dynamic based on the module location of the function pointer. The compiler analyzes which modules define the target functions and selects local entry points for same-module targets and global entry points for other modules. This dynamic selection ensures processor efficiency for local calls while maintaining compatibility for external calls.

Inventive Principle:
Principle #15Dynamics

4Quantity of substance

If local entry points are used for indirect function calls, then memory usage decreases, but device complexity increases

Engineering Contradiction:
Improvememory usageVSAvoidcompiler complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by having the compiler perform advance analysis to determine the module location of each function pointer target. During compilation, the system identifies which functions are defined in the current module versus external modules and encodes this information into the generated code. This preliminary analysis enables the runtime system to efficiently select between local and global entry points without adding complex runtime decision logic.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10585652B2Compiling optimized entry points for local-use-only function pointers
Publication Date: 2020.03.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10585652B2 patent drawing
  • US10585652B2 patent drawing
  • US10585652B2 patent drawing

AI summary

Embodiments relate to using a local entry point with an indirect call function. A compiler is provided to determine and indicate 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, e.g. local-use-only. The compiler loads an address of a function through use of a symbolic reference. When the compiler determines that the value employed by the symbolic reference is used exclusively to perform an indirect function call, the compiler proceeds to resolve a local entry point address of the function, thereby reducing a quantity of operations to be executed.