Selective Branch Prediction Blocking for Pipeline Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Processors face inefficiencies due to incorrect branch prediction, leading to idle pipeline stages and wasted processing cycles when predicting next instructions, especially for conditional branch instructions that are not taken.

Innovation Solution

A computer system and method that detects a branch-prediction blocking instruction in a stream of instructions, allowing the processor to selectively block branch prediction for a predetermined number of subsequent branch instructions, thereby preventing unnecessary pipeline processing and resuming prediction after the specified number is reached.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If branch prediction is performed for all branch instructions to increase processing efficiency, then instruction stream processing speed is improved, but incorrect predictions cause pipeline stages to stand idle and processing efficiency decreases

Engineering Contradiction:
Improveinstruction stream processing speedVSAvoididle pipeline cycles
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent applies local quality by making branch prediction capability selective rather than universal. A special instruction type (branch prediction control instruction) is introduced that can locally disable prediction for specific subsequent branch instructions. This allows the system to maintain prediction for most branches (preserving speed) while selectively disabling it for problematic branches (reducing idle cycles), thus resolving the contradiction between overall speed improvement and local time loss.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements dynamics by making the branch prediction function adjustable and changeable during execution. The branch prediction control instruction dynamically modifies the prediction behavior for subsequent branches based on runtime conditions. This dynamic control allows the system to adapt prediction behavior to actual branch patterns, maintaining high speed when prediction is accurate and avoiding idle cycles when prediction would be incorrect.

Inventive Principle:
Principle #15Dynamics

2Productivity

If branch prediction is enabled for conditional branch instructions, then processing throughput is increased, but incorrect predictions result in pipeline clearing and new instructions being fetched

Engineering Contradiction:
Improveprocessing throughputVSAvoidwasted processing cycles
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent applies local quality by enabling selective disabling of branch prediction for specific instructions using a control instruction inserted in the instruction stream. This allows high productivity to be maintained for branches where prediction is accurate, while wasting energy is avoided for specific problematic branches where prediction would fail, thus resolving the contradiction between overall productivity and local energy waste.

Inventive Principle:
Principle #3Local quality

3Reliability

If a blocking instruction is inserted to prevent branch prediction for specific instructions, then prediction accuracy is improved by avoiding incorrect predictions, but device complexity increases due to additional instruction types

Engineering Contradiction:
Improveprediction accuracyVSAvoidinstruction stream complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary element (branch prediction control instruction) that mediates between the branch prediction mechanism and the branch instructions. This control instruction acts as a signal to the prediction logic, enabling it to selectively suppress predictions without fundamentally altering the prediction hardware. The added complexity is minimal (one additional instruction type) while achieving the goal of improved prediction accuracy for critical branches.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10025592B2Selectively blocking branch prediction for a predetermined number of instructions
Publication Date: 2018.07.17 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10025592B2 patent drawing
  • US10025592B2 patent drawing
  • US10025592B2 patent drawing

AI summary

Embodiments relate to selectively blocking branch instruction predictions. An aspect includes a computer system for performing selective branch prediction. The system includes memory and a processor, and the system is configured to perform a method. The method includes detecting a branch-prediction blocking instruction in a stream of instructions and blocking branch prediction of a predetermined number of branch instructions following the branch-prediction blocking instruction based on the detecting the branch-prediction blocking instruction.