The Design and Implementation of a SSA-based Register Allocator
The Design and Implementation of a SSA-based Register Allocator
复制标题
基于SSA的寄存器分配器的设计与实现
DOI:
--
复制
发表时间:
2007
期刊:
影响因子:
--
通讯作者:
Fernando Magno Quintão Pereira
中科院分区:
文献类型:
--
作者:
Fernando Magno Quintão Pereira
A state-of-the-art register allocator is among the most complicated parts of a compiler, partly because register allocation is NPcomplete in general. Surprisingly, Bouchez, Brisk et al., and Hack independently discovered in 2005 that if a program is in single static assignment (SSA) form, then a core register allocation problem can be solved in polynomial time. This result enables what we call SSA-based register allocation. In this report we present the first design and implementation of an SSA-based register allocator, integrated into LLVM. Compared to state of the art, our register allocator is much simpler and generates code of equivalent quality. We show the new static analyses we use for philifting, spilling, and coalescing, and we explain that the choice of those analyses influence how we must do SSA deconstruction.