Skip to main content

Register Allocation Based on a Reference Flow Analysis

  • Conference paper
  • 276 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2895))

Abstract

The graph-coloring approach for register allocation has been widely used but its formulation is too abstract to generate efficient spill code. Recently, a new register allocation based on the analysis of variable reference flow was proposed [13]. This register allocation leads to more efficient spill code (i.e, reduced spill instructions) than the graph-coloring approach, but requires a large amount of computation. For the trade-off between the computation amount and code efficiency, this paper proposes two variations of the register allocation proposed in [13]. The first register allocation technique reduces computation time by employing a simplified graph-coloring algorithm for variable register allocation. The second technique generates more efficient code with aggressive variable flow analysis demanding a large amount of computation than [13]. Experimental results show that the first allocation reduces the amount of spill code by 22.2% and the amount of computation by 20.4% when compared to the Briggs’ allocator. The second allocator improves the efficiency by 6.2% with the increase of the computation by 4.6 times when compared to the register allocation in [13].

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley Publishing Company, Reading (1986)

    Google Scholar 

  2. Advanced RISC Machines Ltd: ARM Architecture Reference Manual. Document Number: ARM DDI 0100B, Advanced RISC Machines Ltd. (ARM) (1996)

    Google Scholar 

  3. Bergner, P., Dahl, P., Engebretsen, D., O’Keefe, M.: Spill code minimization via interference region spilling. In: Proceedings of the ACM PLDI 1997, June 1997, pp. 287–295 (1997)

    Google Scholar 

  4. Briggs, P., Cooper, K.D., Torczon, L.: Rematerialization. In: Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, June 1992. SIGPLAN Notices, vol. 27(7), pp. 311–321 (1992)

    Google Scholar 

  5. Briggs, P., Cooper, K.D., Kennedy, K., Torczon, L.: Coloring heuristics for register allocation. In: Proceedings of the ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation, June 1989. SIGPLAN Notices, vol. 24(6), pp. 275–284 (1989)

    Google Scholar 

  6. Chaitin, G.J.: Register allocation and spilling via coloring. In: Proceedings of the ACM SIGPLAN 1982 Symposium on Compiler Construction, June 1982. SIGPLAN Notices, vol. 17(6), pp. 98–105 (1982)

    Google Scholar 

  7. Chaitin, G.J., Auslander, M.A., Chandra, A.K.: Register allocation via coloring. Computer Languages 6, 47–57 (1981)

    Article  Google Scholar 

  8. Fraser, C.W., Hanson, D.R.: A Retargetable C Compiler: Design and Implementation. Benjamin/Cummings, Redwood City, CA (1995)

    MATH  Google Scholar 

  9. Farach, M., Liberatore, V.: On local register allocation. In: Proceedings of the 9th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 564–573 (1998)

    Google Scholar 

  10. Goodwin, D.W., Wilken, K.D.: Optimal and near-optimal global register allocation using 0-1 integer programming. Software-Practice and Experience 26(8), 929–965 (1996)

    Article  Google Scholar 

  11. Hsu, W.-C., Fischer, C.N., Goodman, J.R.: On the minimization of loads/stores in local register allocation. IEEE Transactions on Software Engineering 15(10), 1252–1260 (1989)

    Article  Google Scholar 

  12. Kim, D.H.: Advanced compiler optimization for CalmRISC8 low-end embedded processor. In: Watt, D.A. (ed.) CC 2000. LNCS, vol. 1781, pp. 173–188. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  13. Kim, D.H., Lee, H.-J.: Fine-Grain Register Allocation Based on a Global Spill Costs Analysis. In: Proceedings of the 7th Int. Workshop on Software and Compilers for Embedded Systems (September 2003)

    Google Scholar 

  14. Kolte, P., Harrold, M.J.: Load/store range analysis for global register allocation. In: Proceedings of the ACM PLDI 1993, June 1993, pp. 268–277 (1993)

    Google Scholar 

  15. Mushnick, S.S.: Advanced compiler design and implementation. Morgan Kaufmann, SanFrancisco (1997)

    Google Scholar 

  16. Proebsting, T.A., Fischer, C.N.: Demand-driven register allocation. ACM Transactions on Programming Languages and Systems 18(6), 683–710 (1996)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kim, DH., Lee, HJ. (2003). Register Allocation Based on a Reference Flow Analysis. In: Ohori, A. (eds) Programming Languages and Systems. APLAS 2003. Lecture Notes in Computer Science, vol 2895. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-40018-9_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-40018-9_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20536-4

  • Online ISBN: 978-3-540-40018-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics