Abstract
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.
This work has been supported by the ARC Discovery Project Grant “Compilation Techniques for Embedded Systems” under Contract DP 0560190.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Moore, G.: 40th Anniversary of Moore’s Law. In: Press Conference (2005)
Chaitin, G.J., Auslander, M.A., Chandra, A.K., Cocke, J., Hopkins, M.E., Markstein, P.W.: Register allocation via coloring. Computer Languages 6, 47–57 (1981)
Briggs, P., Cooper, K.D., Torczon, L.: Improvements to graph coloring register allocation. ACM Trans. Program. Lang. Syst. 16(3), 428–455 (1994)
Briggs, P., Cooper, K.D., Torczon, L.: Coloring register pairs. ACM Lett. Program. Lang. Syst. 1(1), 3–13 (1992)
Smith, M.D., Ramsey, N., Holloway, G.: A generalized algorithm for graph-coloring register allocation. In: PLDI 2004: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, pp. 277–288. ACM Press, New York (2004)
Kong, T., Wilken, K.D.: Precise register allocation for irregular architectures. In: MICRO 31: Proceedings of the 31st annual ACM/IEEE international symposium on Microarchitectures, pp. 297–307. IEEE Computer Society Press, Los Alamitos, CA, USA (1998)
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)
Scholz, B., Eckstein, E.: Register allocation for irregular architectures. In: LCTES/SCOPES 2002: Proceedings of the joint conference on Languages, compilers and tools for embedded systems, pp. 139–148. ACM Press, New York (2002)
Eckstein, E.: Code Optimizations for Digital Signal Processors. Ph.D thesis, Institute of Computer Languages, Compilers and Languages Group, Vienna University of Technology (2003)
Murty, K.G.: Operations Research: Deterministic Optimization Models. Prentice-Hall, Englewood Cliffs (1995)
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)
Briggs, P.: Register allocation via graph coloring. Technical Report TR92-183, Department of Computer Science, Rice University (1998)
Runeson, J., Nyström, S.: Retargetable Graph-Coloring Register Allocation for Irregular Architectures. In: Krall, A. (ed.) SCOPES 2003. LNCS, vol. 2826, pp. 240–254. Springer, Heidelberg (2003)
Koseki, A., Komatsu, H., Nakatani, T.: Preference-directed graph coloring. In: PLDI 2002: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pp. 33–44. ACM Press, New York (2002)
Goodwin, D.W., Wilken, K.D.: Optimal and near-optimal global register allocations using 0–1 integer programming. Softw. Pract. Exper. 26(8), 929–965 (1996)
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)
Pereira, F.M.Q., Palsberg, J.: Register allocation via coloring of chordal graphs. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 315–329. Springer, Heidelberg (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hames, L., Scholz, B. (2006). Nearly Optimal Register Allocation with PBQP . In: Lightfoot, D.E., Szyperski, C. (eds) Modular Programming Languages. JMLC 2006. Lecture Notes in Computer Science, vol 4228. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11860990_21
Download citation
DOI: https://doi.org/10.1007/11860990_21
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40927-4
Online ISBN: 978-3-540-40928-1
eBook Packages: Computer ScienceComputer Science (R0)