Skip to main content

Nearly Optimal Register Allocation with PBQP

  • Conference paper
Modular Programming Languages (JMLC 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4228))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Moore, G.: 40th Anniversary of Moore’s Law. In: Press Conference (2005)

    Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. Briggs, P., Cooper, K.D., Torczon, L.: Improvements to graph coloring register allocation. ACM Trans. Program. Lang. Syst. 16(3), 428–455 (1994)

    Article  Google Scholar 

  4. Briggs, P., Cooper, K.D., Torczon, L.: Coloring register pairs. ACM Lett. Program. Lang. Syst. 1(1), 3–13 (1992)

    Article  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Chapter  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 

  8. 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)

    Chapter  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 

  10. Murty, K.G.: Operations Research: Deterministic Optimization Models. Prentice-Hall, Englewood Cliffs (1995)

    MATH  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 

  13. 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)

    Chapter  Google Scholar 

  14. 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)

    Chapter  Google Scholar 

  15. 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)

    Article  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 

  17. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics