Speculative Branch Resolution via Compare Register Inference

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conditional branch instructions in data processing systems lead to performance reduction due to the need to wait for each instruction in a Compare Immediate-Conditional Branch sequence to execute, causing delays and latency, especially when processing speculative work that may need to be discarded upon misprediction.

Innovation Solution

A method that infers the branch prediction from a branch predictor and auto-finishes the Compare Immediate and Conditional Branch instructions without executing them, allowing the processor to continue processing without waiting for each instruction to execute, using a compare register to store and compare result values and flush instructions only when necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If the processor waits for each instruction in the Compare Immediate-Conditional Branch sequence to execute before executing the subsequent instruction, then the instructions are executed in correct order, but the processing speed and throughput are reduced due to delays and latency

Engineering Contradiction:
Improveprocessing speedVSAvoidlatency
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The processor performs preliminary actions by speculatively executing the conditional branch instruction before the Compare Immediate instruction completes. The branch predictor infers the branch outcome in advance, allowing the processor to fetch and execute instructions along the predicted path without waiting for the actual comparison result, thereby reducing latency and improving processing speed

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The processor skips the waiting period by rushing through the conditional branch resolution using speculative execution. Instead of pausing to wait for the Compare Immediate instruction to complete, the processor proceeds with execution based on predicted outcomes, only correcting course if the prediction is wrong through subsequent validation and flush operations

Inventive Principle:
Principle #21Skipping (Rushing through)

2Productivity

If the processor speculatively executes instructions before branch resolution, then the processing throughput is improved, but mispredicted branches require flushing of speculative work which causes delays

Engineering Contradiction:
Improveprocessing throughputVSAvoidflushing delay
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The processor implements feedback mechanisms where the actual comparison result from the Compare Immediate instruction is compared against the predicted branch outcome. When a mismatch is detected indicating a misprediction, the system provides feedback to flush the incorrectly executed instructions. This feedback loop allows the system to maintain high throughput through speculation while correcting errors efficiently

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The processor performs partial speculative execution by only speculatively executing instructions that are likely to be needed based on branch prediction, rather than always executing full sequences. This partial action approach maintains productivity while minimizing the amount of work that needs to be flushed upon misprediction, reducing the flushing delay

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If the processor executes the Compare Immediate and Conditional Branch instructions in sequence, then the branch outcome is accurately determined, but the processing efficiency is reduced due to sequential execution delays

Engineering Contradiction:
Improvebranch outcome accuracyVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The processor creates a copy of the branch prediction logic and executes it speculatively in parallel with the actual Compare Immediate instruction. The branch predictor generates a predicted outcome that is used for speculative execution, while the actual comparison proceeds independently. This copying approach maintains reliability by having the actual comparison serve as validation while improving productivity through parallel speculative execution

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11868773B2Inferring future value for speculative branch resolution in a microprocessor
Publication Date: 2024.01.09 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11868773B2 patent drawing
  • US11868773B2 patent drawing
  • US11868773B2 patent drawing

AI summary

A system, processor, programming product and/or method including: an instruction dispatch unit configured to dispatch instructions of a compare immediate-conditional branch instruction sequence; and a compare register having at least one entry to hold information in a plurality of fields. Operations include: writing information from a first instruction of the compare immediate-conditional branch instruction sequence into one or more of the plurality of fields in an entry in the compare register; writing an immediate field and the ITAG of a compare immediate instruction into the entry in the compare register; writing, in response to dispatching a conditional branch instruction, an inferred compare result value into the entry in the compare register; comparing a computed compare result value to the inferred compare result value stored in the entry in the compare register; and not execute the compare immediate instruction or the conditional branch instruction.