Predicting Table of Contents Pointer Values for Subroutine Branches

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In computing environments, accessing variables through a Global Offset Table (GOT) or Table of Contents (TOC) can be delayed due to the reliance on computed registers that are not always readily available, leading to performance issues.

Innovation Solution

A computer program product that predicts the value of a pointer to a reference data structure before executing the sequence of instructions to compute it, using a Set TOC Register instruction and a TOC cache to facilitate early access, with mechanisms for recovery from mispredictions and verification of predicted values.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If a sequence of instructions is used to compute the TOC pointer value, then the pointer value can be accurately obtained, but the access time is delayed due to dependency on computed registers

Engineering Contradiction:
Improvepointer value accuracyVSAvoidaccess time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent predicts the TOC pointer value in advance before the actual computation is completed. The prediction mechanism estimates the pointer value based on available information, allowing the system to proceed with operations that would otherwise be blocked by the computation dependency, thereby reducing access time while maintaining accuracy through subsequent verification

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a prediction mechanism as an intermediary between the instruction sequence and the TOC pointer computation. This intermediary provides estimated pointer values that enable earlier access to variables, bridging the gap between the need for immediate access and the delayed availability of computed register values

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of time

If the TOC pointer value is predicted before computation, then access time is reduced, but the risk of misprediction increases

Engineering Contradiction:
Improveaccess timeVSAvoidprediction accuracy
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The patent implements a feedback mechanism where the actual computed TOC pointer value is compared with the predicted value. When a misprediction is detected, the system recovers by using the correctly computed value, ensuring reliability while maintaining the performance benefits of prediction for correct cases

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent prepares recovery mechanisms in advance for potential mispredictions. By pre-establishing correction paths and alternative computation routes, the system cushions against the negative effects of misprediction, allowing it to recover quickly without significant performance penalty

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

3Measurement precision

If computed registers are used to calculate the TOC pointer, then the pointer value is dynamically accurate, but the registers are not always readily available

Engineering Contradiction:
Improvepointer value accuracyVSAvoidprocessing efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent uses inexpensive prediction mechanisms that do not rely on expensive or unavailable computed registers. The prediction can be performed using readily available information, providing a quick and efficient alternative that sacrifices some computational rigor for speed, with correction applied only when necessary

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS11010164B2Predicting a table of contents pointer value responsive to branching to a subroutine
Publication Date: 2021.05.18 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11010164B2 patent drawing
  • US11010164B2 patent drawing
  • US11010164B2 patent drawing

AI summary

Predicting a Table of Contents (TOC) pointer value responsive to branching to a subroutine. A subroutine is called from a calling module executing on a processor. Based on calling the subroutine, a value of a pointer to a reference data structure, such as a TOC, is predicted. The predicting is performed prior to executing a sequence of one or more instructions in the subroutine to compute the value. The value that is predicted is used to access the reference data structure to obtain a variable value for a variable of the subroutine.