期刊文献+

基于RISC-V架构的寄存器分配研究 被引量:1

Research on register allocation based on RISC-V architecture
在线阅读 下载PDF
导出
摘要 本文设计了一种针对RISC-V架构特性的寄存器分配方法。该方法基于寄存器分配与指令调度优化间的信息交互,结合历史分配策略来调整寄存器分配的结果,旨在减少寄存器分配后的指令依赖,从而更利于后续的指令调度优化,减少指令延迟,提高指令的执行效率。在RISC-V架构下,由于指令集精简,所有计算操作都依赖于寄存器,因此寄存器分配对性能影响显著,合理的分配策略则能充分利用硬件优势。本文方法的核心在于建立了寄存器分配优化与指令调度优化的反馈编译框架,并且通过全局的分配记录指导寄存器分配,实现更具适应性的寄存器分配优化。本方法不仅优化了寄存器分配,减少了对内存访问的需求,还提高了指令执行的连续性。本文基于RISC-V架构对SPECCPU2006基准测试集进行了测试,在整数基准程序上取得了平均1.4%的性能提升,相比于传统LLVM寄存器分配方法有明显改进。本文方法不仅有效提升了寄存器利用效率,还进一步验证了寄存器全局优化策略在提升RISC-V架构性能方面的潜力,为未来RISC-V编译器优化提供了有益的参考。 This paper designs a register allocation method tailored to the characteristics of the RISC-V architecture.The method is based on the information interaction between register allocation and instruction scheduling optimization,combined with historical allocation strategies to adjust the register allocation results.The aim is to reduce instruction dependencies after register allocation,thereby facilitating subsequent instruction scheduling optimization,reducing instruction latency,and improving execution efficiency.In the RISC-V architecture,due to the simplified instruction set,all computational operations depend on registers,register allocation has a significant impact on performance.A reasonable allocation strategy can fully leverage hardware advantages.The core of the method in this paper is the establishment of a feedback compilation framework between register allocation optimization and instruction scheduling optimization.By guiding register allocation through global allocation records,the method achieves more adaptable register allocation optimization.This approach not only optimizes register allocation and reduces memory access requirements,but also improves instruction execution continuity.Based on the RISC-V architecture,the SPECCPU2006 benchmark suite is tested,achieving an average 1.4%performance improvement on integer benchmark programs,demonstrating significant improvement over the traditional LLVM register allocation method.This method effectively improves register utilization,and further validates the potential of global register optimization strategies in enhancing the performance of the RISC-V architecture,providing valuable reference for future RISC-V compiler optimizations.
作者 朱珂 何先波 滕芊芊 ZHU Ke;HE Xianbo;TENG Qianqian(School of Electronic and Information Engineering,China West Normal University,Nanchong 637009,Sichuan,China)
出处 《智能计算机与应用》 2025年第5期61-67,共7页 Intelligent Computer and Applications
关键词 寄存器分配 编译器 指令调度 线性扫描算法 register allocation compiler instruction scheduling linear scan algorithm
  • 相关文献

参考文献2

二级参考文献22

  • 1吴圣宁,李思昆.嵌入式处理器寄存器分配的一种混合演化算法[J].计算机科学,2007,34(8):278-280. 被引量:1
  • 2Poletto M. Linear scan register allocation[J].ACM Transactions on Programming Languages and Systems,1999,(05):895-913.
  • 3Sagonas K,Stenman E. Experimental evaluation and improvements to linear scan register allocation[J].Software:Practice and Experience,2003,(11):1003-1034.doi:10.1002/spe.533.
  • 4Kempe A B. On the geographical problem of the four colors[J].American Journal of Mathematics,1979,(03):193-200.
  • 5Chaitin G J. Register allocation and spilling via graph coloring[J].Symposium on Compiler Construction,1982,(06):98-105.
  • 6Gregory J C,Mark A A,Ashok K C. Register allocation via coloring[J].Computer Languages,1981,(01):47-57.
  • 7Cytron R,Ferrante J,Rosen B K. Efficiently computing static single assignment form and the control dependence graph[J].ACM Transactions on Programming Languages and Systems,1991,(04):451-490.
  • 8Hack S,Grund D,Goos G. Register allocation for programs in SSA-form[A].Heidelberg,2006.247-262.
  • 9Gavril F. Algorithms for minimum coloring,maximum clique,minimum covering by cliques,and maximum independent set of a chordal graph[J].SIAM Journal on Computing(SICOMP),1972,(02):180-187.
  • 10Wimmer C,Franz M. Linear scan register allocation on SSA form[A].Toronto,Ontario,Canada,2010.170-179.

共引文献4

同被引文献1

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部