Skip to main content

Optimal Bitwise Register Allocation Using Integer Linear Programming

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2006)

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

Abstract

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.

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. http://gcc.gnu.org/ (2004)

  2. Appel, A.W., George, L.: Optimal spilling for cisc machines with few registers. In: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation, pp. 243–253. ACM Press, New York (2001)

    Chapter  Google Scholar 

  3. Briggs, P., Cooper, K.D., Torczon, L.: Rematerialization. In: Proceedings of the Conference on Programming Language Design and Implementation (PLDI), vol. 27, pp. 311–321. ACM Press, New York (1992), citeseer.ist.psu.edu/briggs92rematerialization.html

    Google Scholar 

  4. Briggs, P., Cooper, K.D., Torczon, L.: Improvements to graph coloring register allocation. ACM Transactions on Programming Languages and Systems 16(3), 428–455 (1994), citeseer.ist.psu.edu/briggs94improvements.html

    Article  Google Scholar 

  5. Chaitin, G.J.: Register allocation and spilling via graph coloring. In: Proceedings of the ACM SIGPLAN ’82 Symposium on Compiler Construction, Jun. 1982, pp. 98–105. ACM Press, New York (1982)

    Chapter  Google Scholar 

  6. Chaitin, G.J., et al.: Register allocation via coloring. Computer Languages 6, 47–57 (1981)

    Article  Google Scholar 

  7. Fu, C., Wilken, K.: A faster optimal register allocator. In: MICRO 35: Proceedings of the 35th annual ACM/IEEE international symposium on Microarchitecture, Istanbul, Turkey, pp. 245–256. IEEE Computer Society Press, Los Alamitos (2002)

    Google Scholar 

  8. George, L., Appel, A.W.: Iterated register coalescing. ACM Transactions on Programming Languages and Systems 18(3), 300–324 (1996), citeseer.ist.psu.edu/george96iterated.html

    Article  Google Scholar 

  9. Goodwin, D.W., Wilken, K.D.: Optimal and Near-Optimal Global Register Allocation Using 0-1 Integer Programming (1996)

    Google Scholar 

  10. Lee, C., Potkonjak, M., Mangione-Smith, W.H.: Mediabench: A tool for evaluating and synthesizing multimedia and communicatons systems. In: International Symposium on Microarchitecture (1997)

    Google Scholar 

  11. Li, B., Gupta, R.: Bit section instruction set extension of arm for embedded applications. In: Proceedings of the international conference on Compilers, architecture, and synthesis for embedded systems, pp. 69–78. ACM Press, New York (2002)

    Chapter  Google Scholar 

  12. Li, B., Zhang, Y., Gupta, R.: Speculative subword register allocation in embedded processors. In: Eigenmann, R., Li, Z., Midkiff, S.P. (eds.) LCPC 2004. LNCS, vol. 3602, Springer, Heidelberg (2005)

    Google Scholar 

  13. Nazareth, J.L.: Computer Solution of Linear Programs. Oxford University Press, Oxford (1987)

    Google Scholar 

  14. Park, J., Moon, S.-M.: Optimistic register coalescing. In: Gaudiot, J.-L. (ed.) International Conference on Parallel Architectures and Compilation Techniques, Paris, October 1998, pp. 196–204. North-Holland, Amsterdam (1998)

    Google Scholar 

  15. Poletto, M., Sarkar, V.: Linear scan register allocation. ACM Transactions on Programming Languages and Systems 21(5), 895–913 (1999), citeseer.ist.psu.edu/poletto99linear.html

    Article  Google Scholar 

  16. Stephenson, M., Babb, J., Amarasinghe, S.: Bitwidth analysis with application to silicon compilation. http://cag.lcs.mit.edu/commit/papers/00/bitwise-pldi2k.pdf

  17. Tallam, S., Gupta, R.: Bitwidth aware global register allocation. ACM SIGPLAN Notices 38(1), 85–96 (2003)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

George Almási Călin Caşcaval Peng Wu

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Barik, R., Grothoff, C., Gupta, R., Pandit, V., Udupa, R. (2007). Optimal Bitwise Register Allocation Using Integer Linear Programming. In: Almási, G., Caşcaval, C., Wu, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2006. Lecture Notes in Computer Science, vol 4382. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72521-3_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-72521-3_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-72520-6

  • Online ISBN: 978-3-540-72521-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics