基于LLVM的RISC-V向量扩展栈帧布局优化  被引量:1

Optimization of RISC-V Vector Extension Stack Frame Layout Based on LLVM

在线阅读下载全文

作  者:陆旭凡 胡海根[2] 邢明杰 LU Xu-Fan;HU Hai-Gen;XING Ming-Jie(Institute of Software,Chinese Academy of Sciences,Beijing 100190,China;College of Computer Science and Technology,Zhejiang University of Technology,Hangzhou 310012,China)

机构地区:[1]中国科学院软件研究所,北京100190 [2]浙江工业大学计算机科学与技术学院,杭州310012

出  处:《计算机系统应用》2021年第11期27-32,共6页Computer Systems & Applications

基  金:中国科学院战略性先导科技专项(C类)(XDC05040200)。

摘  要:为了能够生成正确、优化的机器指令代码,需要在编译器后端代码的生成阶段,设计和使用合适的程序栈帧布局.由于RISC-V向量扩展架构具有可伸缩性、其向量寄存器的长度在编译时不可知,传统的栈帧布局无法适用.之前LLVM中针对向量扩展实现的栈帧布局虽然能够生成正确的机器指令,但存在访存指令较多,栈帧空间较大,以及预留寄存器较多等问题.我们对原有实现所存在的问题进行分析,在此基础上提出了新的布局方式以及向量对象地址计算方式,并通过巴塞罗那超算中心开发的测试集进行验证.实验表明新的栈帧布局能够有效减少访存指令数和栈空间大小.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.

关 键 词:LLVM RISC-V 向量扩展 栈帧布局 

分 类 号:TP332[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象