Speculative Execution Outcome Storage for Pipeline Flush Recovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Speculative execution in data processing systems incurs a significant performance cost due to the need to flush and re-execute instructions when the prediction of a control flow path is incorrect, especially when the correct path includes similar instructions, leading to wasted time and processing power.

Innovation Solution

The system employs storage circuitry to store the outcome of later instructions, allowing these outcomes to be reused as predictions during re-execution, reducing the time and processing power required for re-execution, and includes permission circuitry to control the reuse of predictions based on conditions such as loop iterations or branch conditions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If speculative execution is used to improve performance by executing instructions before prediction confirmation, then system throughput increases, but performance is significantly degraded when predictions are incorrect due to pipeline flushes and re-execution

Engineering Contradiction:
Improvesystem throughputVSAvoidre-execution time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary action by executing instructions speculatively before the prediction is confirmed. The outcome storage circuitry captures results from speculative execution, and when a misprediction is detected, these stored outcomes are reused to avoid re-execution, thus applying preliminary action to prevent the harmful re-execution delay

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system converts the harm of speculative execution (wasted work on mispredicted paths) into a benefit by storing the outcomes of instructions executed on the mispredicted path. When a misprediction occurs, these stored outcomes are reused, transforming what would be wasted computation into useful results that improve subsequent execution efficiency

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

2Reliability

If instructions are flushed from the pipeline when prediction is incorrect, then correctness is maintained, but processing power is wasted on re-execution

Engineering Contradiction:
Improveexecution correctnessVSAvoidprocessing power
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The system applies discarding and recovering by discarding the need to re-execute instructions after a misprediction. The outcome storage circuitry recovers the results from the mispredicted execution path and makes them available for reuse, eliminating the energy-wasting re-execution while maintaining correctness through the permission circuitry's validation

Inventive Principle:
Principle #34Discarding and recovering

3Productivity

If outcomes of later instructions are stored for reuse, then re-execution efficiency improves, but device complexity increases due to additional storage and permission circuitry

Engineering Contradiction:
Improvere-execution efficiencyVSAvoidcircuitry complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The outcome storage circuitry is designed with multi-functionality, serving both as a cache for speculative execution results and as a source for recovering outcomes after mispredictions. This universal component reduces the need for separate storage structures, thereby limiting the increase in device complexity while maintaining improved re-execution efficiency

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

Data Source

PatentUS11157284B1Predicting an outcome of an instruction following a flush
Publication Date: 2021.10.26 ARM LTD
  • US11157284B1 patent drawing
  • US11157284B1 patent drawing
  • US11157284B1 patent drawing

AI summary

An apparatus is described, comprising processing circuitry to speculatively execute an earlier instruction and a later instruction by generating a prediction of an outcome of the earlier instruction and a prediction of an outcome of the later instruction, wherein the prediction of the outcome of the earlier instruction causes a first control flow path to be executed. The apparatus also comprises storage circuitry to store the outcome of the later instruction in response to the later instruction completing, and flush circuitry to generate a flush in response to the prediction of the outcome of the earlier instruction being incorrect. Permission circuitry permits the generating of the prediction by the processing circuitry. When re-executing the later instruction in a second control flow path following the flush, the processing circuitry is adapted to perform the generating the prediction of the outcome of the later instruction as the outcome stored in the storage circuitry during execution of the first control flow path. The permission circuitry is adapted to permit or inhibit generating the prediction of the outcome of the later instruction as the outcome stored in the storage circuitry in dependence on a condition.