Skip to main content

A randomized heuristic approach to register allocation

  • Session: Compiler Construction II
  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1991)

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

Abstract

We present a randomized algorithm to generate contiguous evaluations for expression DAGs representing basic blocks of straight line code with nearly minimal register need. This heuristic may be used to reorder the statements in a basic block before applying a global register allocation scheme like Graph Coloring. Experiments have shown that the new heuristic produces results which are about 30% better on the average than without reordering.

research partially funded by the Leibniz program of the DFG

research partially funded by DFG, SFB 124

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

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

    Google Scholar 

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

    Google Scholar 

  3. Keßler, C.W.: Code—Optimierung quasiskalarer vektorieller Grundblöcke für Vektorrechner. Master thesis (1990), Universität Saarbrücken.

    Google Scholar 

  4. Keßler, C.W., Paul, W.J., Rauber, T.: Scheduling Vector Straight Line Code on Vector Processors. Submitted to: First International Conference of the Austrian Center for Parallel Computation, Sept. 30–Oct. 2, 1991, Salzburg (Austria).

    Google Scholar 

  5. Mehlhorn, K.: Data Structures and Algorithms 2: Graph Algorithms and NP-Completeness. (1984)

    Google Scholar 

  6. Paul, W.J., Tarjan, R.E., Celoni, J.R.: Space bounds for a game on graphs. Math. Systems Theory 10, 239–251 (1977)

    Google Scholar 

  7. Rauber, Thomas: An Optimizing Compiler for Vector Processors. Proc. ISMM International Conference on Parallel and Distributed Computing and Systems, New York 1990, Acta press, 97–103

    Google Scholar 

  8. Sethi, R., Ullman, J.D.: The generation of optimal code for arithmetic expressions. J. ACM, Vol. 17, 715–728 (1970)

    Google Scholar 

  9. Sethi, R.: Complete register allocation problems. SIAM J. Comput. 4, 226–248 (1975)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Maluszyński Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Keßler, C.W., Paul, W.J., Rauber, T. (1991). A randomized heuristic approach to register allocation. In: Maluszyński, J., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1991. Lecture Notes in Computer Science, vol 528. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54444-5_99

Download citation

  • DOI: https://doi.org/10.1007/3-540-54444-5_99

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54444-9

  • Online ISBN: 978-3-540-38362-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics