Abstract
Just-in-time compilers are becoming ubiquitous, spurring the design of more efficient algorithms and more elaborate intermediate representations. They rely on continuous, feedback-directed (re-)compilation frameworks to adaptively select a limited set of hot functions for aggressive optimization. To date, (quasi-)linear complexity has remained a driving force in the design of just-in-time optimizers.
This paper describes a split register allocator showing that linear complexity does not imply reduced code quality. We present a split compiler design, where more expensive ahead-of-time analyses guide lightweight just-in-time optimizations. A split register allocator can be very aggressive in its offline stage, producing a semantic summary through bytecode annotations that can be processed by a lightweight online stage. The challenges are fourfold: (sub-)linear-size annotation, linear-time online processing, minimal loss of code quality, and portability of the annotation.
We propose a split register allocator meeting these challenges. A compact annotation derived from an optimal integer linear program (ILP) formulation of register allocation drives a linear-time algorithm near optimality. We study the robustness of this algorithm to variations in the number of physical registers. Our method is implemented in JikesRVM and evaluated on standard benchmarks.
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
Chaitin, G.J., Auslander, M.A., Cocke, A.K.C.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)
Krintz, C., Calder, B.: Using annotations to reduce dynamic optimization time. In: PLDI 2001, pp. 156–167. ACM Press, New York (2001)
Alpern, B., et al.: The Jikes RVM project: Building an open source research community. IBM Systems Journal 44(2), 399–418 (2005)
Jones, J., Kamin, S.N.: Annotating java class files with virtual registers for performance. Concurrency – Practice and Experience 12(6), 389–406 (2000)
Bouchez, F., Darte, A., Rastello, F.: On the complexity of spill everywhere under ssa form. In: LCTES 2007, pp. 103–112 (2007)
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)
Blackburn, S.M.: The dacapo benchmarks: java benchmarking development and analysis. In: OOPSLA 2006, pp. 169–190. ACM, New York (2006)
Georges, A., Eeckhout, L., Buytaert, D.: Java performance evaluation through rigorous replay compilation. SIGPLAN Not. 43(10), 367–384 (2008)
Serrano, M., Bordawekar, R., Midkiff, S., Gupta, M.: Quicksilver: A quasi-static compiler for java. In: OOPSLA 2000 (2000)
Azevedo, A., Nicolau, A., Hummel, J.: Java annotation-aware just-in-time (ajit) compilation system. In: Proc. ACM 1999 Conf. on Java Grande, pp. 142–151 (1999)
Lesnicki, P., Cohen, A., Cornero, M., Fursin, G., Ornstein, A., Rohou, E.: Split compilation: an application to just-in-time vectorization. In: GREPS 2007, Brasov, Romania (September 2007)
Appel, A.W., George, L.: Optimal spilling for CISC machines with few registers. In: PLDI 2001, Snowbird, Utah, USA, June 2001, pp. 243–253. ACM Press, New York (2001)
Hack, S., Grund, D., Goos, G.: Register allocation for program s in SSA-form. In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 247–262. Springer, Heidelberg (2006)
Bouchez, F., Darte, A., Guillon, C., Rastello, F.: Register allocation: What does the NP-completeness proof of Chaitin et al. really prove? In: Almási, G.S., Caşcaval, C., Wu, P. (eds.) KSEM 2006. LNCS, vol. 4382, pp. 283–298. Springer, Heidelberg (2007)
Wimmer, C., Mössenböck, H.: Optimized interval splitting in a linear scan register allocator. In: VEE 2005, pp. 132–141. ACM, New York (2005)
Sarkar, V., Barik, R.: Extended linear scan: An alternate foundation for global register allocation. In: Krishnamurthi, S., Odersky, M. (eds.) CC 2007. LNCS, vol. 4420, pp. 141–155. Springer, Heidelberg (2007)
Pominville, P., Qian, F., Vallée-Rai, R., Hendren, L.J., Verbrugge, C.: A framework for optimizing java using attributes. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 334–354. Springer, Heidelberg (2001)
Cavazos, J., Moss, J.E.B., Boyle, M.F.O.: Hybrid optimizations: Which optimization algorithm to use? In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 124–138. Springer, Heidelberg (2006)
Necula, G.: Proof-carrying code. In: PoPL 1997 (January 1997)
Touati, S., Eisenbeis, C.: Early periodic register allocation on ilp processors. Parallel Processing Letters 14(2) (June 2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Diouf, B., Cohen, A., Rastello, F., Cavazos, J. (2010). Split Register Allocation: Linear Complexity Without the Performance Penalty. In: Patt, Y.N., Foglia, P., Duesterwald, E., Faraboschi, P., Martorell, X. (eds) High Performance Embedded Architectures and Compilers. HiPEAC 2010. Lecture Notes in Computer Science, vol 5952. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11515-8_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-11515-8_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11514-1
Online ISBN: 978-3-642-11515-8
eBook Packages: Computer ScienceComputer Science (R0)