arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.13900cs.AR
收藏

剖析 Apple Firestorm 与 Qualcomm Oryon 的条件分支预测器以用于软件优化与架构分析

Dissecting Conditional Branch Predictors of Apple Firestorm and Qualcomm Oryon for Software Optimization and Architectural Analysis

Jiajie Chen, Peng Qu, Youhui Zhang

AI总结:

本文提出一种更通用的分支预测逆向工程流程,成功恢复 Apple Firestorm 与 Qualcomm Oryon 的条件分支预测器并构建精确模型,揭示两项未披露的预测精度损害效应并提出解决方案,实现最高 14% MPKI 降低和 7% 性能提升。

摘要:

分支预测器(BP)是现代处理器的关键组件,其精确建模对编译器和应用程序至关重要。然而,处理器厂商对其 BP 实现披露的细节十分有限。近年来,对通用处理器 BP 进行逆向工程的进展使得构建更精确的 BP 模型成为可能。尽管如此,我们发现现有方法存在严重缺陷。例如,它们对分支历史更新函数以及关键 BP 组件的索引/标签函数施加了强假设,这限制了它们适用于更广泛的处理器,包括来自 Apple 和 Qualcomm 的处理器。本文设计了一种更通用的分支预测逆向工程流程,能够额外恢复 Apple Firestorm 和 Qualcomm Oryon 微架构的条件分支预测器(CBP),并随后构建精确的 CBP 模型。利用这些模型,我们揭示了两项此前未被披露的会损害分支预测准确性的效应,并提出相关解决方案,在代表性应用程序中实现了最高 14% 的 MPKI 降低和 7% 的性能提升。此外,我们使用统一的独立分支预测器模拟器对已知的 Intel/Apple/Qualcomm CBP 进行了全面比较,有助于更深入地理解 CBP 行为。

英文摘要:

Branch predictor (BP) is a critical component of modern processors, and its accurate modeling is essential for compilers and applications. However, processor vendors have disclosed limited details about their BP implementations. Recent advancements in reverse engineering the BP of general-purpose processors have enabled the creation of more accurate BP models. Nonetheless, we have identified critical deficiencies in the existing methods. For instance, they impose strong assumptions on the branch history update function and the index/tag functions of key BP components, limiting their applicability to a broader range of processors, including those from Apple and Qualcomm. In this paper, we design a more general branch prediction reverse engineering pipeline that can additionally recover the conditional branch predictors (CBPs) of Apple Firestorm and Qualcomm Oryon microarchitectures, and subsequently build accurate CBP models. Leveraging these models, we uncover two previously undisclosed effects that impair branch prediction accuracy and propose related solutions, resulting in up to 14% MPKI reduction and 7% performance improvement in representative applications. Furthermore, we conduct a comprehensive comparison of the known Intel/Apple/Qualcomm CBPs using a unified standalone branch predictor simulator, which facilitates a deeper understanding of CBP behavior.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑