Architecturally Paired Spill and Reload Instructions for Register Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The high cost and inefficiency of saving and restoring registers in computing environments, particularly for short functions, due to the need for frequent memory access and the associated penalties like load-hit-store and forwarding penalties.

Innovation Solution

The introduction of a reload multiple instruction that restores a set of architected registers from a selected snapshot, reducing the need for memory access and eliminating the need to verify memory modifications between saving and restoring, thereby optimizing register management.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional save and restore operations are used for registers in short functions, then register values are preserved correctly, but processing performance deteriorates due to frequent memory access and associated penalties

Engineering Contradiction:
Improveregister value preservationVSAvoidprocessing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by saving register values to a stack buffer before the function executes (in the prolog), and then restoring them after execution (in the epilog). This pre-positioning of save/restore operations allows the function body to execute without repeated memory access, improving performance while ensuring register values are preserved correctly.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by creating a snapshot copy of register values in the stack buffer rather than repeatedly accessing original memory locations. The reload multiple instruction restores registers from this copied snapshot, eliminating the need for repeated memory reads and avoiding load-hit-store penalties while maintaining data integrity.

Inventive Principle:
Principle #26Copying

2Reliability

If register values are restored from memory, then correct values are recovered, but time is lost due to memory access latency and forwarding penalties

Engineering Contradiction:
Improveregister value correctnessVSAvoidrestore operation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs the memory access operation in advance by saving all required register values to the stack buffer during the prolog phase, before the function body executes. This preliminary saving eliminates the need for time-consuming memory access during the restore phase, as the reload multiple instruction can directly load from the already-prepared stack buffer.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the time-consuming memory access operation from the critical restore path by pre-loading register values into the stack buffer. The reload multiple instruction then extracts data from this local buffer rather than from remote memory, significantly reducing access latency and eliminating forwarding penalties.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If verification of memory modifications is performed between save and restore, then data integrity is ensured, but device complexity and overhead increase

Engineering Contradiction:
Improvedata integrityVSAvoidverification mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies self-service by using the stack buffer as a self-contained storage structure that automatically manages register value preservation. The architectural definition of the spill/reload multiple instructions ensures that the stack buffer serves as the sole source for restore operations, eliminating the need for external verification mechanisms while maintaining data integrity through the inherent LIFO (last-in, first-out) property of the stack.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11061684B2Architecturally paired spill/reload multiple instructions for suppressing a snapshot latest value determination
Publication Date: 2021.07.13 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11061684B2 patent drawing
  • US11061684B2 patent drawing
  • US11061684B2 patent drawing

AI summary

A reload multiple instruction is used to restore a set of architected registers saved by a spill multiple instruction. The reload multiple instruction is executed, and the executing includes determining the set of architected registers to be restored, which is specified by the reload multiple instruction. The set of architected registers is restored from a selected snapshot that maps architected registers to physical registers. The restoring replaces one or more physical registers currently assigned to one or more architected registers of the set of architected registers with one or more physical registers of the selected snapshot corresponding to the set of architected registers.