• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2025, Vol. 47 ›› Issue (8): 1364-1380.

• 高性能计算 • 上一篇    下一篇

基于TAGE与基于神经网络分支预测器的比较与分析

郑伟巍,郑重,陈微,陆洪毅


  

  1. (国防科技大学计算机学院, 湖南 长沙 410073)
  • 收稿日期:2024-07-19 修回日期:2024-08-23 出版日期:2025-08-25 发布日期:2025-08-27

Comparison and analysis of TAGE-based and neural-based branch predictors

ZHENG Weiwei,ZHENG Zhong,CHEN Wei,LU Hongyi   

  1. (College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China)

  • Received:2024-07-19 Revised:2024-08-23 Online:2025-08-25 Published:2025-08-27

摘要: 随着处理器性能需求的不断增长,超标量和深度流水线技术被广泛应用于现代微处理器中,从而提升指令执行的并行性。然而,程序中的条件分支指令对流水线的连续执行构成了挑战,限制了指令并行执行的能力。为解决这一控制冒险问题,分支预测技术应运而生,其核心在于预先推测分支指令的跳转方向和地址,进而最小化因分支指令引起的流水线停顿延迟。基于统一的性能评估框架,对比分析了当前主流的基于TAGE的分支预测器和基于神经网络的分支预测器。实验结果表明,不同分支预测器对特定轨迹存在不同的偏好性,融合多种预测机制或可以进一步挖掘预测潜能。同时,执行任务上下文对分支预测性能的影响不容忽视,特别是在多进程环境中。此外,实验还发现当前CNN预测器在处理复杂分支时的性能不稳定,整体表现未能超越基准TAGE-SC-L预测器,仍需继续优化。

关键词: 分支预测, TAGE, 神经网络, 感知机, CNN模型

Abstract: With the increasing demand for processor performance,superscalar and deeply pipelined techniques have been widely adopted in modern microprocessors to enhance instruction-level parallelism.However,conditional branch instructions in programs pose a challenge to continuous pipeline execution,limiting the potential for parallel instruction processing.To address this control hazard,branch prediction techniques have been developed,with the core objective of speculatively determining the direction and target address of branch instructions,thereby minimizing pipeline stalls caused by branch instructions.This paper presents a comparative analysis of two mainstream branch predictors—TAGE-based and Neural-based approaches—under a unified performance evaluation framework.Experimental results demonstrate that different branch predictors exhibit distinct preferences for specific traces,suggesting that hybrid prediction mechanisms could further unlock prediction potential.Additionally,the influence of execution context on branch prediction performance cannot be overlooked,particularly in multi-process environments.Furthermore,this paper reveals that current CNN-based predictors exhibit unstable performance when handling complex branch patterns,with their overall accuracy yet to surpass the baseline TAGE-SC-L predictor,indicating a need for further optimization.

Key words: branch prediction, tagged geometric history length(TAGE), neural network, perceptron, convolutional neural network(CNN) model

中图分类号: