摘要
在国产多核处理器申威平台上,申威JDK的C2即时编译器通过图着色寄存器分配算法完成寄存器分配工作。即时编译器在分配寄存器时并没有考虑国产处理器的指令特征,导致编译器生成了过多的访存代码,从而无法更全面地发挥国产处理器的性能。为了更充分地发挥申威国产处理器的性能,提出了一种减少图着色寄存器分配时溢出代码的编译优化策略。优化策略基于图着色寄存器分配算法,根据在申威平台上特殊信息的寄存器规律,构造先验模型,并按照先验模型调整溢出策略,从而减少访存代码的生成。该策略在申威JDK上实现了优化,并基于基准测试集SPECjbb2015和SPECjvm2008验证了优化的效果。实验结果表明,优化后SPECjbb2015的max-jOPS和critical-jOPS分数分别提升了4.20%和5.98%,SPECjvm2008的总分数提升了2.02%。
The C2 just-in-time compiler implemented on the SWJDK allocates registers according to the graph coloring register allocation algorithm.The just-in-time compiler ignores the characteristics of the SW processor when allocating registers,which results in excessive memory access codes.In order to get the most out of SW processor,this paper proposes a compilation optimization algorithm.The optimization algorithm is based on the graph coloring register allocation algorithm.And the spill strategy is adjusted based on a priori assumptions about the characteristics of registers representing special information on the SW server.The proposed algorithm has been implemented in SWJDK.The optimization of the algorithm also has been verified based on the benchmark SPECjbb2015 and SPECjvm2008.After optimization,the max-jOPS of SPECjbb2015 increases by 4.20%and critical-jOPS of SPECjbb2015 increases by 5.98%.The SPECjvm2008 increases by 2.02%。
作者
蔡淳豪
梁淑萍
姜军
邵宁远
CAI Chunhao;LIANG Shuping;JIANG Jun;SHAO Ningyuan(Wuxi Institute of Advanced Technology,Wuxi,Jiangsu 214122,China)
出处
《计算机科学》
北大核心
2025年第6期82-87,共6页
Computer Science
基金
科技部重点支持项目(GG20210701)。
关键词
图着色寄存器分配
访存寻址
溢出代码
编译优化
Register allocation via graph coloring
Memory addressing
Spill code
Compiler optimization