分支预测不是一个已解决的问题:度量、机会和未来方向
Branch Prediction Is Not a Solved Problem: Measurements, Opportunities, and Future Directions
摘要:
现代分支预测器以近乎完美的准确度预测绝大多数条件分支指令,允许超标量乱序处理器最大化推测效率,从而最大化性能。然而,这种令人印象深刻的整体效率掩盖了单线程指令/周期(IPC)中大量错失的机会。例如,我们表明,纠正SPECint 2017上最先进的TAGE-SC-L分支预测器所做的错误预测,将改善IPC,其幅度类似于工艺技术节点的进步。在这项工作中,我们测量和描述这些错误的预测。我们发现,它们明确地产生于(1)少量的系统性难以预测(H2 P)分支;或(2)具有低动态执行计数的罕见分支。使用SPECint 2017和其他大型代码占用量应用程序的数据,我们量化了这两个类别的发生率和IPC影响。然后,我们证明,增加资源提供给现有的分支预测并不能单独解决大多数预测失误的根本原因。这促使我们重新审视分支预测中的基本假设,并提出新的研究方向,例如,部署机器学习来改善H2 Ps的模式匹配,并使用片上相位学习来跟踪罕见分支的长期统计数据。
英文摘要:
Modern branch predictors predict the vast majority of conditional branch instructions with near-perfect accuracy, allowing superscalar, out-of-order processors to maximize speculative efficiency and thus performance. However, this impressive overall effectiveness belies a substantial missed opportunity in single-threaded instructions per cycle (IPC). For example, we show that correcting the mispredictions made by the state-of-the-art TAGE-SC-L branch predictor on SPECint 2017 would improve IPC by margins similar to an advance in process technology node. In this work, we measure and characterize these mispredictions. We find that they categorically arise from either (1) a small number of systematically hard-to-predict (H2P) branches; or (2) rare branches with low dynamic execution counts. Using data from SPECint 2017 and additional large code footprint applications, we quantify the occurrence and IPC impact of these two categories. We then demonstrate that increasing the resources afforded to existing branch predictors does not alone address the root causes of most mispredictions. This leads us to reexamine basic assumptions in branch prediction and to propose new research directions that, for example, deploy machine learning to improve pattern matching for H2Ps, and use on-chip phase learning to track long-term statistics for rare branches.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。