Skip to main content
QUICK REVIEW

[论文解读] The Renewed Case for the Reduced Instruction Set Computer: Avoiding ISA Bloat with Macro-Op Fusion for RISC-V

Christopher Celio, Palmer Dabbelt|arXiv (Cornell University)|Jul 8, 2016
Parallel Computing and Optimization Techniques参考文献 1被引用 15
一句话总结

本文主张通过宏操作融合(macro-op fusion)技术,RISC-V 可在不扩展指令集架构(ISA)的前提下,将常见指令序列合并为单个内部操作,从而实现与 x86-64 等 CISC 架构相当的性能和代码密度。通过融合诸如比较-跳转等常见模式,RISC-V 在结合压缩指令集后,有效指令数减少 5.4%,动态指令字节数比 x86-64 少 8%,证明了通过微架构创新而非指令集膨胀,一个精简、开放的 ISA 也能超越复杂 ISA 的表现。

ABSTRACT

This report makes the case that a well-designed Reduced Instruction Set Computer (RISC) can match, and even exceed, the performance and code density of existing commercial Complex Instruction Set Computers (CISC) while maintaining the simplicity and cost-effectiveness that underpins the original RISC goals. We begin by comparing the dynamic instruction counts and dynamic instruction bytes fetched for the popular proprietary ARMv7, ARMv8, IA-32, and x86-64 Instruction Set Architectures (ISAs) against the free and open RISC-V RV64G and RV64GC ISAs when running the SPEC CINT2006 benchmark suite. RISC-V was designed as a very small ISA to support a wide range of implementations, and has a less mature compiler toolchain. However, we observe that on SPEC CINT2006 RV64G executes on average 16% more instructions than x86-64, 3% more instructions than IA-32, 9% more instructions than ARMv8, but 4% fewer instructions than ARMv7. CISC x86 implementations break up complex instructions into smaller internal RISC-like micro-ops, and the RV64G instruction count is within 2% of the x86-64 retired micro-op count. RV64GC, the compressed variant of RV64G, is the densest ISA studied, fetching 8% fewer dynamic instruction bytes than x86-64. We observed that much of the increased RISC-V instruction count is due to a small set of common multi-instruction idioms. Exploiting this fact, the RV64G and RV64GC effective instruction count can be reduced by 5.4% on average by leveraging macro-op fusion. Combining the compressed RISC-V ISA extension with macro-op fusion provides both the densest ISA and the fewest dynamic operations retired per program, reducing the motivation to add more instructions to the ISA. This approach retains a single simple ISA suitable for both low-end and high-end implementations, where high-end implementations can boost performance through microarchitectural techniques.

研究动机与目标

  • 评估精简、开放的 RISC-V ISA 是否能够匹配或超越商业 CISC 架构(如 x86-64 和 ARM)的性能与代码密度。
  • 探究宏操作融合是否能在不扩展 ISA 的前提下减少 RISC-V 的有效指令数,从而避免 ISA 膨胀。
  • 证明微架构技术(如宏操作融合)可弥补 RISC-V 相较于 CISC 架构更高的动态指令数。
  • 展示将宏操作融合与 RISC-V 压缩指令集(RV64GC)结合,可在所有研究的 ISA 中实现最高的指令获取密度与执行效率。
  • 倡导采用单一、简洁、可扩展的 ISA,通过微架构优化支持低端与高端处理器,而非依赖 ISA 复杂化。

提出的方法

  • 作者使用 SPEC CINT2006 基准测试套件,对比了六种 ISA(ARMv7、ARMv8、IA-32、x86-64、RV64G 和 RV64GC)的动态指令数与获取的指令字节数。
  • 识别出导致 RISC-V 指令数偏高的常见指令模式,如比较-跳转序列,这些是宏操作融合的理想候选。
  • 论文提出利用 GCC 中现有的编译器钩子(如 TARGET_SCHED_MACRO_FUSION_PAIR_P),在代码生成阶段检测并融合兼容的指令对。
  • 采用改进的寄存器分配策略,以实现更积极的寄存器复用,从而增加可融合的指令对数量。
  • 通过测量相对于 x86-64 微操作数的指令数与动态指令字节数减少量,评估宏操作融合的有效性。
  • 将 RISC-V 压缩指令集(RV64GC)与宏操作融合结合,评估其在代码密度与执行效率上的累积优势。

实验结果

研究问题

  • RQ1宏操作融合能否使 RISC-V 的有效指令数减少至与 x86-64 等 CISC 架构相当的水平?
  • RQ2与 x86-64 及其他 ISA 相比,RISC-V 压缩指令集(RV64GC)在代码密度方面提升了多少?
  • RQ3在不扩展 RISC-V ISA 的前提下,宏操作融合能带来多大的性能提升?
  • RQ4编译器感知的宏操作融合对 RISC-V 代码中可融合指令对数量有何影响?
  • RQ5能否通过微架构优化而非 ISA 扩展,使单一、精简的 RISC-V ISA 同时支持低端与高端处理器?

主要发现

  • RV64G 的指令数比 x86-64 多 16%,指令字节数多 23%,但其指令数仅比 x86-64 的退休微操作数低 2%。
  • RV64GC(RISC-V 的压缩变体)的动态指令字节数比 x86-64 少 8%,是本研究中代码密度最高的 ISA。
  • 宏操作融合使 RISC-V 的有效指令数平均减少 5.4%,使其有效指令数比 x86-64 的微操作数少 4.2%。
  • 研究发现,超过一半的潜在宏操作融合机会因编译器限制而未被利用,表明存在显著的未开发性能潜力。
  • 宏操作融合与 RISC-V 压缩指令集的结合,使单一、简洁的 ISA 实现了高性能与高代码密度,且无 ISA 膨胀。
  • 结果表明,微架构技术(如宏操作融合)可有效弥补 RISC-V 较高的动态指令数,使其在不扩展 ISA 的前提下,与 CISC 架构保持竞争力。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。