@techreport{TR-IC-08-27, number = {IC-08-27}, author = {Wesley Attrot and Guido Araújo}, title = {Hole Allocation in Spill Code Generation}, month = {September}, year = {2008}, institution = {Institute of Computing, University of Campinas}, note = {In English, 13 pages. \par\selectlanguage{english}\textbf{Abstract} Allocating variables to registers is a central task in program code generation. Though considered a well-studied and thoroughly scrutinized problem, register allocation sometimes reveals a new interesting facet. Spill code generation is part of any register allocation algorithm and its efficacy can have a direct impact in the final program performance. In this paper we present a dynamic programming algorithm to generate spill code, which tries to simultaneously reallocate spilled variables into two type of holes left by the register allocator: intervals between live ranges (called dead-holes), and low-density live ranges (called live-holes). As a post-pass optimization, this technique can be used by any register allocation algorithm. Experimental results reveal that a considerable reduction in memory traffic can be achieved. } }