2FAR: A 2bcgskew Predictor Fused by an Alloyed Redundant History Skewed Perceptron Branch Predictor

Veerle Desmet, Hans Vandierendonck, Koen De BosschereJ. Instr. Level Parallelism 2005

Abstract

Modern high-performance processors rely heavily on accurate branch prediction to maintain instruction throughput and energy efficiency. As single-structure predictors face diminishing returns, hybrid designs have emerged as a viable alternative. This paper presents 2FAR, a predictor that integrates a 2bcgskew component with an Alloyed Redundant History Skewed Perceptron (RHSP). By leveraging the internal confidence states of sub-predictors as inputs to a neural fusion layer, 2FAR achieves significant accuracy gains, reducing branch mispredictions by up to 40% over traditional baselines.

Introduction

Branch prediction is the process of speculatively determining the outcome of conditional branches before they are executed. Mispredictions lead to pipeline flushes, wasting cycles and power. While increasing hardware budgets initially improved accuracy, monolithic predictors have reached a plateau. Hybrid predictors, which combine multiple specialized sub-predictors, offer a path forward. However, the effectiveness of a hybrid predictor depends on the "meta-predictor" or fusion logic used to select the final outcome. Traditional selection methods often fail to capture the complex, non-linear correlations present in modern workloads.

Methods: The 2FAR Architecture

The 2FAR architecture combines two distinct prediction philosophies: the table-based 2bcgskew and the neural-based Perceptron.

The 2FAR architecture, showing the fusion of 2bcgskew components with a perceptron-based judge.

The Experts: 2bcgskew

The 2bcgskew component serves as the baseline expert. It consists of four tables: a Bimodal (BIM) table, two Gshare-like tables (G0, G1) for different history lengths, and a Meta-table. This structure provides a robust initial prediction by exploiting different types of branch correlation.

The Judge: Alloyed Redundant History Skewed Perceptron (RHSP)

Instead of a simple selection bit, 2FAR employs a Perceptron—a single-layer neural network—to fuse the outputs. The RHSP is "alloyed" because it combines global history, local history, and branch address bits. Key innovations include:

  • Internal State Fusion: The perceptron receives not just the final guess of the 2bcgskew sub-components, but also their internal "bias" and "hysteresis" (confidence) bits. This allows the judge to learn which components are most reliable in specific contexts.
  • Redundant History: By XORing history bits together, the authors provide "redundant" inputs that help the linear perceptron model non-linear branch behaviors.
  • Skewing: Hashing functions are used to "skew" the indices into the hardware tables, minimizing destructive aliasing where different branches overwrite each other's data.

Results and Evaluation

The 2FAR predictor was evaluated using CBP traces (Floating Point, Integer, Multimedia, and Server categories) and the SPEC INT 2000 benchmark suite. The primary metric is Mispredictions per Kilo Instructions (MPkI).

MPkI comparison across various benchmarks for gshare, 2bcgskew, RHSP, and the fused 2FAR predictor.

At a 64K-bit hardware budget, 2FAR achieved an average of 3.15 MPkI, significantly outperforming the standard gshare (5.3 MPkI) and the standalone 2bcgskew (3.87 MPkI). This represents a 40% improvement over gshare on CBP traces. The results demonstrate that the fusion of internal states provides a more accurate prediction than either component could achieve in isolation. Furthermore, 2FAR scales effectively; at a 768K-bit budget, the error rate further decreases to 2.26 MPkI.

Conclusion

The 2FAR predictor demonstrates the power of "fusion" in hybrid branch prediction. By treating the internal states of sub-predictors as features for a neural-like judge, 2FAR captures complex branch patterns that traditional meta-predictors miss. While the computational complexity of perceptron-based summation and the management of alloyed history present hardware implementation challenges, the substantial reduction in mispredictions makes 2FAR a compelling architecture for future high-performance processors.

Summary updated

BibTeX
@article{desmet2005far,
  author = {Veerle Desmet and Hans Vandierendonck and Koen De Bosschere},
  title = {{2FAR: A 2bcgskew Predictor Fused by an Alloyed Redundant History Skewed Perceptron Branch Predictor}},
  journal = {J. Instr. Level Parallelism},
  year = {2005},
}
Figure