Context-Tagged Branch Predictors for Misprediction Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Branch predictors in processors often share information across contexts, leading to mispredictions and performance and power issues due to unrelated branches and lack of constructive aliasing between contexts, especially in branch target predictions.

Innovation Solution

Implementing a processor method that tags branch predictors with context information and uses index modification to prevent contention, allowing for late stop fetch on tag mismatch, thereby optimizing branch prediction operations by ensuring correct context usage and reducing resource allocation and power consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If branch predictors share information across contexts, then prediction coverage is improved, but misprediction rate increases and power consumption increases

Engineering Contradiction:
Improveprediction accuracyVSAvoidpower consumption
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The branch predictor is segmented into context-specific instances, where each context (thread, privilege level) has its own dedicated predictor. This is achieved by using context identifiers to select appropriate predictor instances, preventing cross-context contamination while maintaining prediction coverage within each context.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A context identifier acts as an intermediary between the branch instruction and the predictor instance selection. The context ID mediates the mapping between branches and predictors, ensuring that only context-appropriate predictors are used, thereby eliminating mispredictions caused by cross-context information sharing.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If branch predictors share information across contexts, then resource utilization is improved, but prediction accuracy deteriorates

Engineering Contradiction:
Improveresource allocationVSAvoidprediction accuracy
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The predictor resources are segmented by context, with each context having its own predictor instance or partitioned portion of the predictor structure. This segmentation ensures that predictor resources are dedicated to specific contexts, preventing accuracy degradation from cross-context interference while maintaining efficient resource utilization within each context.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different predictor instances or predictor portions are optimized for specific local contexts (threads, privilege levels). Each predictor instance has local quality tailored to its context's branch behavior patterns, improving prediction accuracy for context-specific branches without compromising overall resource efficiency.

Inventive Principle:
Principle #3Local quality

3Reliability

If context tagging is implemented with index modification, then misprediction reduction is achieved, but device complexity increases

Engineering Contradiction:
Improveprediction accuracyVSAvoidprocessor complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Context tagging is implemented by adding a context dimension to the existing predictor index structure. Instead of modifying the core predictor logic, the context ID is integrated as an additional indexing dimension, allowing context-specific predictor selection without fundamentally changing the predictor architecture or significantly increasing complexity.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The predictor index parameters are extended to include context identifiers. By changing the indexing parameters to incorporate context information, the system achieves context-aware prediction without requiring complex additional logic, as the context parameter naturally integrates with existing index-based predictor structures.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10740104B2Tagging target branch predictors with context with index modification and late stop fetch on tag mismatch
Publication Date: 2020.08.11 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10740104B2 patent drawing
  • US10740104B2 patent drawing
  • US10740104B2 patent drawing

AI summary

A processor-implemented method is provided. The processor-implemented includes reading, by a processor, an instruction stream by fetching instructions from an instruction cache of the processor. The processor then executes a branch prediction operation based on a context of the instruction stream and an index when one of the instructions includes a branch instruction. The branch prediction operation output a prediction and a context. The processor then compares the context of the instruction stream and the context from the branch prediction operation to determine whether to execute a stop fetch.