Conference Papers: Register Spilling and Live-Range Splitting for SSA-Form Programs

[braun09cc]Matthias Braun, Sebastian Hack, Register Spilling and Live-Range Splitting for SSA-Form Programs, Proceedings of the International Conference on Compiler Construction, pp. 174--189, Springer, March 2009.


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.


  [PDF]   [DOI]

Original article available at springerlink.com.


Authors at the institute

Former Staff Member
Dipl.-Inform. Matthias Braun