Optimal Bitwise Register Allocation Using Integer Linear Programming

This paper addresses the problem of optimal global register allocation. The register allocation problem is expressed as an integer linear programming problem and solved optimally. The model is more flexible than previous graph-coloring based methods and thus allows for register allocations with significantly fewer moves and spills. The formulation can also model complex architectural features, such as bit-wise access to registers. With bit-wise access to registers, multiple subword temporaries can be stored in a single register and accessed efficiently, resulting in a register allocation problem that cannot be addressed effectively with simple graph coloring. The paper describes techniques that can help reduce the problem size of the ILP formulation, making the algorithm feasible in practice. Preliminary empirical results from an implementation prototype are reported.

[1]  Gregory J. Chaitin,et al.  Register allocation and spilling via graph coloring , 2004, SIGP.

[2]  Michael F. P. O'Boyle,et al.  Automatic performance model construction for the fast software exploration of new hardware designs , 2006, CASES '06.

[3]  Miodrag Potkonjak,et al.  MediaBench: a tool for evaluating and synthesizing multimedia and communications systems , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[4]  Andrew W. Appel,et al.  Optimal spilling for CISC machines with few registers , 2001, PLDI '01.

[5]  Rudolf Eigenmann,et al.  Languages and Compilers for High Performance Computing, 17th International Workshop, LCPC 2004, West Lafayette, IN, USA, September 22-24, 2004, Revised Selected Papers , 2005, LCPC.

[6]  J. L. Nazareth Computer solution of linear programs , 1987 .

[7]  Gregory J. Chaitin,et al.  Register allocation & spilling via graph coloring , 1982, SIGPLAN '82.

[8]  John Cocke,et al.  Register Allocation Via Coloring , 1981, Comput. Lang..

[9]  Keith D. Cooper,et al.  Improvements to graph coloring register allocation , 1994, TOPL.

[10]  Mark Stephenson,et al.  Bidwidth analysis with application to silicon compilation , 2000, PLDI '00.

[11]  Rajiv Gupta,et al.  Bit section instruction set extension of ARM for embedded applications , 2002, CASES '02.

[12]  Kent D. Wilken,et al.  Optimal and Near-Optimal Global Register Allocation Using 0-1 Integer Programming , 1996, Software, Practice & Experience.

[13]  Rajiv Gupta,et al.  Bitwidth aware global register allocation , 2003, POPL '03.

[14]  Vivek Sarkar,et al.  Linear scan register allocation , 1999, TOPL.

[15]  John Cocke,et al.  A methodology for the real world , 1981 .

[16]  Andrew W. Appel,et al.  Iterated register coalescing , 1996, POPL '96.

[17]  Kent D. Wilken,et al.  Optimal and Near‐optimal Global Register Allocation Using 0–1 Integer Programming , 1996, Softw. Pract. Exp..

[18]  Erik R. Altman,et al.  Proceedings of the 35th annual ACM/IEEE international symposium on Microarchitecture , 2002, MICRO 2002.

[19]  Soo-Mook Moon,et al.  Optimistic register coalescing , 2004, TOPL.

[20]  Rajiv Gupta,et al.  Speculative Subword Register Allocation in Embedded Processors , 2004, LCPC.