KIT | KIT-Bibliothek | Impressum | Datenschutz

Register Spilling and Live-Range Splitting for SSA-Form Programs

Braun, Matthias; Hack, Sebastian

Abstract:

Register allocation decides which parts of a variable's live range are held in registers and which in memory. The compiler inserts spill code to move the values of variables between registers and memory. Since fetching data from memory is much slower than reading directly from a register, careful spill code insertion is critical for the performance of the compiled program.
In this paper, we present a spilling algorithm for programs in SSA form. Our algorithm generalizes the well-known furthest-first algorithm, which is known to work well on straight-line code, to control-flow graphs.
We evaluate our technique by counting the executed spilling instructions in the CINT2000 benchmark on an x86 machine. The number of executed load (store) instructions was reduced by 54% (61.5%) compared to a state-of-the-art linear scan allocator and reduced by 58.2% (41.9%) compared to a standard graph-coloring allocator. The runtime of our algorithm is competitive with standard linear-scan allocators.


Zugehörige Institution(en) am KIT Institut für Programmstrukturen und Datenorganisation (IPD)
Publikationstyp Proceedingsbeitrag
Publikationsjahr 2009
Sprache Englisch
Identifikator ISBN: 978-3-642-00721-7
KITopen-ID: 1000017591
Erschienen in ETAPS 2009 - Proceedings of the 18th International Conference on Compiler Construction: Held as Part of the Joint European Conferences on Theory and Practice of Software, York, UK, March 22 - 29, 2009. Ed.: O. Moor
Verlag Association for Computing Machinery (ACM)
Seiten 174 - 189
Serie Lecture Notes In Computer Science
KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft
KITopen Landing Page