Chapitre D'ouvrage Année : 2022

Register Allocation

Résumé

Register allocation maps the variables of a program to physical memory locations: usually either CPU registers or the main memory. As there is only a small number of registers available in a CPU, the task of register allocation is also to decide which variables should be evicted from registers and at which program points to store and load them from memory (spilling). Furthermore, register allocation has to remove spurious copy instructions (copy coalescing) inserted by previous phases in the compilation process and to deal with allocation restrictions that the instruction set architecture and the runtime system impose (register targeting). Classical register allocation algorithms address these different issues with either complex and sometimes expensive schemes (usually graph-based), or simpler and faster (but less efficient) algorithms such as linear scan. The goal of this chapter is to illustrate how SSA form can help in designing both simpler and faster schemes with similar or even better quality than the most complex existing ones.
Fichier non déposé

Dates et versions

hal-04816493 , version 1 (03-12-2024)

Identifiants

Citer

Florent Bouchez Tichadou, Fabrice Rastello. Register Allocation. SSA-based Compiler Design, Springer International Publishing, pp.303-328, 2022, ⟨10.1007/978-3-030-80515-9_22⟩. ⟨hal-04816493⟩
11 Consultations
0 Téléchargements

Altmetric

Partager

More