首页 | 本学科首页   官方微博 | 高级检索  
     

基于LLVM的RISC-V向量扩展栈帧布局优化
引用本文:陆旭凡,胡海根,邢明杰.基于LLVM的RISC-V向量扩展栈帧布局优化[J].计算机系统应用,2021,30(11):27-32.
作者姓名:陆旭凡  胡海根  邢明杰
作者单位:中国科学院软件研究所,北京100190;浙江工业大学计算机科学与技术学院,杭州310012;浙江工业大学计算机科学与技术学院,杭州310012;中国科学院软件研究所,北京100190
基金项目:中国科学院战略性先导科技专项(C类)(XDC05040200)
摘    要:为了能够生成正确、优化的机器指令代码,需要在编译器后端代码的生成阶段,设计和使用合适的程序栈帧布局.由于RISC-V向量扩展架构具有可伸缩性、其向量寄存器的长度在编译时不可知,传统的栈帧布局无法适用.之前LLVM中针对向量扩展实现的栈帧布局虽然能够生成正确的机器指令,但存在访存指令较多,栈帧空间较大,以及预留寄存器较多等问题.我们对原有实现所存在的问题进行分析,在此基础上提出了新的布局方式以及向量对象地址计算方式,并通过巴塞罗那超算中心开发的测试集进行验证.实验表明新的栈帧布局能够有效减少访存指令数和栈空间大小.

关 键 词:LLVM  RISC-V  向量扩展  栈帧布局
收稿时间:2021/4/28 0:00:00
修稿时间:2021/5/21 0:00:00

Optimization of RISC-V Vector Extension Stack Frame Layout Based on LLVM
LU Xu-Fan,HU Hai-Gen,XING Ming-Jie.Optimization of RISC-V Vector Extension Stack Frame Layout Based on LLVM[J].Computer Systems& Applications,2021,30(11):27-32.
Authors:LU Xu-Fan  HU Hai-Gen  XING Ming-Jie
Affiliation:Institute of Software, Chinese Academy of Sciences, Beijing 100190, China;College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310012, China
Abstract:For correct and optimized machine instructions, it is necessary to design and use a suitable program stack frame layout during the code generation stage of the compiler back-end. Due to the scalability of the RISC-V vector extension architecture and the unknown length of its vector register at compile time, the traditional stack frame layout cannot be applied. Although the previous stack frame layout implemented for vector extension in LLVM can generate correct machine instructions, it has problems such as many load/store instructions and reserved registers as well as large stack frame sizes. We analyze the problems existing in the previous implementation and propose a new layout and vector object calculation method on this basis. Then we verify it through the test set developed by the Barcelona Supercomputing Center. Experiments show that the new stack frame layout can greatly reduce the number of load/store instructions and stack space.
Keywords:LLVM  RISC-V  vector extension  stack frame layout
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机系统应用》浏览原始摘要信息
点击此处可从《计算机系统应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号