摘要
在现代高性能数字信号处理器(DSP)中,许多指令把寄存器偶对作为操作数。为了优化寄存器偶对的使用,文中针对寄存器偶对的使用约束条件,提出了一种基于弱约束指派的DSP寄存器偶对分配算法。该算法在寄存器指派过程中优先指派空闲寄存器偶对给符号寄存器对。如果无法指派寄存器偶对给符号寄存器对,则指派两个不能组成寄存器偶对的寄存器。为了确保目标代码中寄存器偶对操作数最终获得的寄存器偶对符合寄存器偶对的使用约束条件,提供了一种指令操作数修正方法。采用6种经典的算法作为测试用例进行实验,结果表明所提算法的实验效果较好。
In modern high performance digital signal processors(DSP),many instructions regard register pairs as operands.To optimize register pair usage,this paper presents a register pairs allocation algorithm for DSP based on weak constraint assignment for the rules of using register pairs.In the process of register assignment,the priority of this algorithm is to assign idle register pairs to symbol register pairs.If it is not possible to assign register pairs to symbol register pairs,two registers that cannot be made up of a register pair are assigned.In order to ensure that the register pairs in the target code are consistent with the rules of register pairs,this paper provides an instruction operand correction method.This paper uses six classical algorithms as test cases.The experimental results show that the proposed algorithm is effective.
作者
唐镇
胡勇华
陆浩松
王书盈
TANG Zhen;HU Yong-hua;LU Hao-song;WANG Shu-ying(School of Computer Science and Engineering,Hunan University of Science and Technology,Xiangtan,Hunan 411201,China)
出处
《计算机科学》
CSCD
北大核心
2021年第S01期587-595,共9页
Computer Science
基金
湖南省自然科学基金(2017JJ3087)
国家自然科学基金资(61308001,61872138)。
关键词
DSP
编译优化
全局寄存器分配
图着色方法
寄存器偶对
DSP
Compiler optimization
Global register allocation
Graph coloring method
Register pairs