Skip to main content

Split Register Allocation: Linear Complexity Without the Performance Penalty

  • Conference paper
High Performance Embedded Architectures and Compilers (HiPEAC 2010)

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

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.

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

    Article  Google Scholar 

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

  3. Krintz, C., Calder, B.: Using annotations to reduce dynamic optimization time. In: PLDI 2001, pp. 156–167. ACM Press, New York (2001)

    Chapter  Google Scholar 

  4. Alpern, B., et al.: The Jikes RVM project: Building an open source research community. IBM Systems Journal 44(2), 399–418 (2005)

    Article  Google Scholar 

  5. Jones, J., Kamin, S.N.: Annotating java class files with virtual registers for performance. Concurrency – Practice and Experience 12(6), 389–406 (2000)

    Article  Google Scholar 

  6. Bouchez, F., Darte, A., Rastello, F.: On the complexity of spill everywhere under ssa form. In: LCTES 2007, pp. 103–112 (2007)

    Google Scholar 

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

  8. Blackburn, S.M.: The dacapo benchmarks: java benchmarking development and analysis. In: OOPSLA 2006, pp. 169–190. ACM, New York (2006)

    Chapter  Google Scholar 

  9. Georges, A., Eeckhout, L., Buytaert, D.: Java performance evaluation through rigorous replay compilation. SIGPLAN Not. 43(10), 367–384 (2008)

    Article  Google Scholar 

  10. Serrano, M., Bordawekar, R., Midkiff, S., Gupta, M.: Quicksilver: A quasi-static compiler for java. In: OOPSLA 2000 (2000)

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  20. Necula, G.: Proof-carrying code. In: PoPL 1997 (January 1997)

    Google Scholar 

  21. Touati, S., Eisenbeis, C.: Early periodic register allocation on ilp processors. Parallel Processing Letters 14(2) (June 2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

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

Publish with us

Policies and ethics