TOC Register Prediction for Pointer Access Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computing systems face performance degradation due to the expensive and delayed access to variables that depend on a Table of Contents (TOC) or Global Offset Table (GOT), as they require sequences of instructions to compute pointer values which are not always readily available in processors.

Innovation Solution

A computer-implemented method that replaces instruction sequences for computing TOC or GOT pointers with a Set TOC Register (STR) instruction, predicting the pointer value and using a TOC cache for high-speed access, thereby reducing the need for expensive computation and interlocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If instruction sequences are used to compute TOC/GOT pointer values, then the pointer can be accurately calculated, but the access time increases and processing speed decreases

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

Solution Approach 1:

The patent pre-computes and stores TOC/GOT pointer values in a dedicated register (TOC register) before they are needed for variable access. The compiler generates code that loads the TOC pointer into a register upfront, so that subsequent variable accesses can directly use this pre-computed value without re-calculating it, thereby reducing access time while maintaining accuracy

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a dedicated TOC register as an intermediary between the instruction sequence and the variable access operations. This register holds the pre-computed TOC/GOT pointer value and serves as a mediator that eliminates the need for repeated computation sequences, thus reducing access time while preserving pointer value accuracy

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of information

If computed registers are used for pointer calculation, then the pointer value can be obtained, but the registers are not always readily available causing delays

Engineering Contradiction:
Improvepointer value availabilityVSAvoidprocessing speed
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent creates a dedicated TOC register that serves multiple purposes: it stores the TOC/GOT base address, provides the basis for all variable accesses in the current scope, and eliminates the need to repeatedly use general-purpose computed registers. This universal register is always readily available and eliminates delays associated with computing register availability

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The TOC register is self-sufficient in that it directly holds the pointer value needed for variable access without requiring additional computation or dependency on other registers. The register serves itself by providing the base address that all subsequent variable accesses can directly utilize, eliminating the need to wait for computed registers to be available

Inventive Principle:
Principle #25Self-service

3Reliability

If sequences of instructions are used to access variables depending on TOC, then the variables can be accessed, but the access process becomes expensive and delayed

Engineering Contradiction:
Improvevariable access correctnessVSAvoidaccess efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the expensive computation sequence from the variable access path and separates it into a preliminary initialization phase. The TOC pointer is computed once and stored in a dedicated register, while subsequent variable accesses only require simple register operations. This extraction removes the computational burden from the critical access path, improving efficiency while maintaining correctness

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs the expensive TOC pointer computation in advance and stores the result in a dedicated register before any variable accesses occur. This preliminary action ensures that the pointer value is ready and available when needed, eliminating delays during actual variable access operations while ensuring correctness through proper initialization

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10713051B2Replacing table of contents (TOC)-setting instructions in code with TOC predicting instructions
Publication Date: 2020.07.14 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10713051B2 patent drawing
  • US10713051B2 patent drawing
  • US10713051B2 patent drawing

AI summary

Table of Contents (TOC)-setting instructions are replaced in code with TOC predicting instructions. A determination is made as to whether code includes an instruction sequence to compute a value of a pointer to a reference data structure, such as a TOC. Based on determining the code includes the instruction sequence, the instruction sequence in the code is replaced with a set instruction. The set instruction predicts the value of the pointer to the reference data structure.