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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
http://gcc.gnu.org/ (2004)
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)
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
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
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)
Chaitin, G.J., et al.: Register allocation via coloring. Computer Languages 6, 47–57 (1981)
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)
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
Goodwin, D.W., Wilken, K.D.: Optimal and Near-Optimal Global Register Allocation Using 0-1 Integer Programming (1996)
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)
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)
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)
Nazareth, J.L.: Computer Solution of Linear Programs. Oxford University Press, Oxford (1987)
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)
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
Stephenson, M., Babb, J., Amarasinghe, S.: Bitwidth analysis with application to silicon compilation. http://cag.lcs.mit.edu/commit/papers/00/bitwise-pldi2k.pdf
Tallam, S., Gupta, R.: Bitwidth aware global register allocation. ACM SIGPLAN Notices 38(1), 85–96 (2003)
Author information
Authors and Affiliations
Editor information
Rights 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)