【24h】

A register allocation algorithm

机译:寄存器分配算法

获取原文

摘要

This paper proposes a global register allocation algorithm that makes decisions on register allocation based on the cost of spilling variables in linear scan allocation. The algorithm assumes registers are initially allocated based on linear scan algorithm. When there is a need to spill variables, either the allocated or the new variable is spilled based on the cost incurred in allocation. The cost is calculated as a function of number of definitions and uses of a variable for the rest of its live range. The variable with minimum number of uses that gives optimal cost is replaced. A mathematical model for determining the cost is proposed which decides register allocation. Given the live ranges of the variables the time complexity of the algorithm is derived. Simulations on an arbitrary program showed an improvement when compared to linear scan algorithm.
机译:本文提出了一种全局寄存器分配算法,该算法根据线性扫描分配中溢出变量的成本来决定寄存器分配。该算法假定寄存器是根据线性扫描算法初始分配的。当需要溢出变量时,将根据分配产生的成本来溢出已分配变量或新变量。成本是根据定义数量和变量在其有效范围的其余部分中使用的函数计算的。具有最小使用次数的变量可以提供最佳成本,该变量将被替换。提出了一种确定成本的数学模型,该模型决定了寄存器分配。给定变量的有效范围,可以得出算法的时间复杂度。与线性扫描算法相比,在任意程序上的仿真均显示出了改进。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号