Multi-Level Branch Classification for Hard-to-Predict Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern processors face performance bottlenecks due to misprediction of hard-to-predict branch instructions, which do not exhibit repeatable patterns and are difficult to predict using traditional branch predictors, leading to reduced pipeline efficiency.

Innovation Solution

A multi-level branch classification system that includes a branch classification unit and a branch classification table to classify branch instructions into various types based on their behavior, using a confusion matrix to track actual and predicted outcomes, and update classifier parameters to improve prediction accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional branch predictors are used, then device complexity is kept low, but branch prediction accuracy deteriorates for hard-to-predict branches

Engineering Contradiction:
Improvebranch prediction accuracyVSAvoidpredictor complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments branch predictors into multiple specialized predictors (local predictor, global predictor, hybrid predictor), each designed to handle specific types of branches. The branch classification unit categorizes branches into different types, and appropriate predictors are selected for each type, improving overall accuracy without requiring a single complex predictor to handle all cases.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic branch classification that adapts to different branch behaviors. The system dynamically selects which predictor to use based on the classified branch type, and the predictors themselves use dynamic history tracking and pattern recognition to adapt to changing branch patterns, resolving the contradiction between accuracy and complexity.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If simple 2-bit counter schemes are used, then device complexity is low, but branch prediction accuracy deteriorates to 85-90%

Engineering Contradiction:
Improveprediction accuracyVSAvoidpredictor structure
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies local quality by creating specialized prediction structures for different branch types. Instead of using a uniform simple counter for all branches, the system employs local predictors with tailored structures (e.g., pattern history tables for local branches, global history for inter-related branches) that match the specific characteristics of each branch category, achieving higher accuracy without uniform complexity increase.

Inventive Principle:
Principle #3Local quality

3Productivity

If branch classification into multiple types is implemented, then branch prediction accuracy improves, but device complexity increases

Engineering Contradiction:
Improveprocessor performanceVSAvoidclassification system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements preliminary branch classification before prediction, categorizing branches into types (local, global, indirect, etc.) upfront. This preliminary action allows the system to select the most appropriate predictor for each branch type, improving prediction accuracy and processor performance by avoiding misprediction penalties, while the classification structure itself remains relatively simple.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11579886B2System and method for multi-level classification of branches
Publication Date: 2023.02.14 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11579886B2 patent drawing
  • US11579886B2 patent drawing
  • US11579886B2 patent drawing

AI summary

A processor including a processor pipeline having one or more execution units configured to execute branch instructions, a branch predictor coupled to the processor pipeline and configured to predict a branch instruction outcome, and a branch classification unit coupled to the processor pipeline and the branch prediction unit. The branch classification unit is configured to, in response to detecting a branch instruction, classify the branch instruction as at least one of the following: static taken branch, static not-taken branch, simple easy-to-predict branch, flip flop hard-to-predict (HTP) branch, dynamic HTP branch, biased positive HTP branch, biased negative HTP branch, and other HTP branch.