Skip to main content

A new approximation algorithm for the register allocation problem

  • Scheduling and Load Balancing
  • Conference paper
  • First Online:
  • 102 Accesses

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

Abstract

In this paper we study the problem of register allocation in the presence of parallel conditional branches with a given branching depth d. We start from a scheduled flow graph and the goal is to find an assignment of the variables in the flow graph to a minimum number of registers. This problem can be solved by coloring the corresponding conflict graph G=(V, E). We describe a new approximation algorithm with constant worst case rate for flow graphs with constant branching depth. The algorithm works in two steps. In the first step, the lifetimes are enlarged such that the lifetimes form one unique interval across the different possible execution paths for each variable. We prove that the conflict graph ¯G with enlarged lifetimes satisfies ω(¯G)≤(2d+1)ω(G) where ω(G) is the cardinality of a maximum clique in G. In the second step, we propose an algorithm with approximation bound (d+1)ξ(¯G) for ¯G, using its specific structure.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Aho, R. Sethi and J. Ullman: Compilers, Principles, Techniques and Tools, Addision Wesley, 1988.

    Google Scholar 

  2. R.A. Bergamaschi, R. Camposano and M. Payer: Data-path synthesis using path analysis, 28.th Design Automation Conference (1991), 591–595.

    Google Scholar 

  3. R. Camposano and W. Wolf: High-Level Synthesis, Kluwer, Dordrecht, 1992.

    Google Scholar 

  4. G.J. Chaitin: Register allocation and spilling via graph coloring, Symposium on Compiler Construction (1982), 98–101.

    Google Scholar 

  5. M.C. MacFarland, A.C. Parker and R. Camposano: Tutorial on high-level synthesis, 25.th Design Automation Conference (1988), 330–336.

    Google Scholar 

  6. D. Gajski, N. Dutt, A. Wu and S. Lin: High-Level Synthesis: Introduction to Chip and System Design, Kluwer, Dordrecht, 1992.

    Google Scholar 

  7. M.S. Hecht: Flow Analysis of Computer Programs, Elsevier, New York, 1977.

    Google Scholar 

  8. C.Y. Huang, Y.S. Chen, Y.L. Lin and Y.C. Hsu: Data path allocation based on bipartite weighted matching, 27.th Design Automation Conference (1990), 499–503.

    Google Scholar 

  9. K. Jansen: Processor-optimization for flow graphs, Theoretical Computer Science 104 (1992), 285–298.

    Google Scholar 

  10. K. Jansen: On the complexity of allocation problems in high level synthesis, Integration — the VLSI Journal 17 (1994), 241–252.

    Google Scholar 

  11. K. Jansen and J. Reiter, Approximation algorithms for register allocation, Universität Trier, Forschungsbericht 13 (1996).

    Google Scholar 

  12. S. Kannan and T. Proebsting, Register allocation in structured programs, Symposium on Discrete Algorithms (SODA), 1995, 360–368.

    Google Scholar 

  13. F. J. Kurdahi and A.C. Parker: Real: a program for register allocation, 24.th Design Automation Conference (1987), 210–215.

    Google Scholar 

  14. P. Michel, U. Lauther and P. Duzy: The Synthesis Approach to Digital System Design, Kluwer, Dordrecht, 1992.

    Google Scholar 

  15. C. Park, T. Kim and C.L. Liu: Register allocation for general data flow graphs, 2.nd European Design Automation Conference (1993), 232–237.

    Google Scholar 

  16. P. Pfahler: Automated datapath synthesis: a compilation approach, Microprocessing and Microprogramming 21 (1987), 577–584.

    Google Scholar 

  17. D.L. Springer and D.E. Thomas: Exploiting the special structure of conflict and compatibility graphs in high-level synthesis, International Conference on Computer Aided Design (1990), 254–257.

    Google Scholar 

  18. C.J. Tseng and D. Siewiorek: Automated synthesis of data paths in digital systems, IEEE Transactions on CAD 6 (1989), 379–395.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Gianfranco Bilardi Afonso Ferreira Reinhard Lüling José Rolim

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jansen, K., Reiter, J. (1997). A new approximation algorithm for the register allocation problem. In: Bilardi, G., Ferreira, A., Lüling, R., Rolim, J. (eds) Solving Irregularly Structured Problems in Parallel. IRREGULAR 1997. Lecture Notes in Computer Science, vol 1253. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-63138-0_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-63138-0_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63138-5

  • Online ISBN: 978-3-540-69157-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics