Store Instruction Coalescing via Register Snapshots

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The high cost and inefficiency of saving and restoring registers during function calls in computing environments, particularly for short functions, due to the expense of saving and restoring callee-saved and caller-saved registers, which incur additional penalties like load-hit-store and forwarding penalties.

Innovation Solution

A method that uses register renaming to optimize the saving and restoring of registers by taking snapshots of architected registers and mapping them to physical registers, allowing for bulk operations and reducing the need for memory access during restoration.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If registers are saved and restored using traditional stack methods, then register values are preserved correctly, but processing efficiency deteriorates due to load-hit-store and forwarding penalties

Engineering Contradiction:
Improveregister preservationVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a snapshot (copy) of the register state at the function entry point and restores from this snapshot at the function exit point. This copying approach avoids the traditional load-hit-store penalty by directly restoring register values from the snapshot without requiring sequential memory loads, thereby improving processing efficiency while maintaining register preservation reliability

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent performs the register save operation in advance by creating a snapshot of all register states at the function prolog stage. This preliminary action captures the complete register state before any modifications occur, allowing for efficient restoration without needing to track individual register changes throughout the function execution

Inventive Principle:
Principle #10Preliminary action

2Ease of manufacture

If individual register save and restore operations are performed, then precise register management is achieved, but device complexity increases due to multiple stack operations

Engineering Contradiction:
Improveregister managementVSAvoidstack operations
Core Design Contradiction:
Ease of manufactureVSDevice complexity

Solution Approach 1:

The patent merges multiple individual register save and restore operations into a single snapshot operation. By capturing all register states in one atomic snapshot at function entry and restoring all registers from this single snapshot at function exit, the patent simplifies the control logic and reduces the complexity of managing multiple separate stack operations while maintaining precise register management

Inventive Principle:
Principle #5Merging (Combining)

3Ease of operation

If snapshots are created for every store request, then register restoration is simplified, but processing overhead increases due to unnecessary snapshot creation

Engineering Contradiction:
Improveregister restorationVSAvoidprocessing overhead
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies snapshot creation selectively based on the local context of the store request. Snapshots are created only when specifically needed (e.g., at function entry points or when certain conditions are met), rather than for every store request. This localized application of snapshot creation simplifies register restoration where needed while avoiding unnecessary processing overhead in other contexts

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10540184B2Coalescing store instructions for restoration
Publication Date: 2020.01.21 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10540184B2 patent drawing
  • US10540184B2 patent drawing
  • US10540184B2 patent drawing

AI summary

Stores and/or loads are coalesced. In one example, a store request to store an architected register is obtained. A determination is made as to whether the store request is a potential start of a store sequence. Based on determining the store request is a potential start of a store sequence, a snapshot request to create a snapshot is initiated. The snapshot is to map architected registers with physical registers. Based on determining the store request is not a potential start of the store sequence, the store is performed.