Nearly Optimal Register Allocation with PBQP
In this work we present a new heuristic for PBQP which significantly improves the quality of its register allocations and extends the range of viable target architectures. We also introduce a new branch-and-bound technique for PBQP that is able to find optimal register allocations.
We evaluate each of these methods, as well as a state of the art graph colouring method, using SPEC2000 and IA-32 as a testbed. Spill costs are used as a metric for comparison. We provide experimental evidence that our new heuristic allows PBQP to remain effective even for relatively regular architectures such as IA-32, generating results equal to those of a start-of-the-art graph colouring technique. Our method is shown to run 3–4 times slower than graph colouring, however it supports a wide range of irregularities.
Using our branch-and-bound solver for PBQP we were able to solve 97.4% of the functions in SPEC2000 optimally. These results are used as a yardstick to show that both PBQP and graph colouring produce results which are very close to optimal.
KeywordsCost Vector Register Allocation Register Exclusion Exhaustive Enumeration Interference Graph
Unable to display preview. Download preview PDF.
- 1.Moore, G.: 40th Anniversary of Moore’s Law. In: Press Conference (2005)Google Scholar
- 7.Koes, D., Goldstein, S.C.: A progressive register allocator for irregular architectures. In: CGO 2005: Proceedings of the international symposium on Code generation and optimization, Washington, DC, USA, pp. 269–280. IEEE Computer Society, Los Alamitos (2005)Google Scholar
- 9.Eckstein, E.: Code Optimizations for Digital Signal Processors. Ph.D thesis, Institute of Computer Languages, Compilers and Languages Group, Vienna University of Technology (2003)Google Scholar
- 11.Hirnschrott, U., Krall, A., Scholz, B.: Graph -coloring vs.optimal register allocation for optimizing compilers. In: Proceedings of the Joint Modular Language Conference, pp. 202–213 (2003)Google Scholar
- 12.Briggs, P.: Register allocation via graph coloring. Technical Report TR92-183, Department of Computer Science, Rice University (1998)Google Scholar
- 16.Koes, D., Goldstein, S.C.: A global progressive register allocator. In: PLDI 2006: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, Ottawa, ON, Canada. ACM Press, New York (to appear, 2006)Google Scholar