skip to main content
10.1145/1542452.1542462acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
research-article

Live-range unsplitting for faster optimal coalescing

Published:19 June 2009Publication History

ABSTRACT

Register allocation is often a two-phase approach: spilling of registers to memory, followed by coalescing of registers. Extreme live-range splitting (i.e. live-range splitting after each statement) enables optimal solutions based on ILP, for both spilling and coalescing. However, while the solutions are easily found for spilling, for coalescing they are more elusive. This difficulty stems from the huge size of interference graphs resulting from live-range splitting.

This paper focuses on coalescing in the context of extreme live-range splitting. It presents some theoretical properties that give rise to an algorithm for reducing interference graphs. This reduction consists mainly in finding and removing useless splitting points. It is followed by a graph decomposition based on clique separators. The reduction and decomposition are general enough, so that any coalescing algorithm can be applied afterwards.

Our strategy for reducing and decomposing interference graphs preserves the optimality of coalescing. When used together with an optimal coalescing algorithm (e.g. ILP), optimal solutions are much more easily found. The strategy has been tested on a standard benchmark, the optimal coalescing challenge. For this benchmark, the cutting-plane algorithm for optimal coalescing (the only optimal algorithm for coalescing) runs 300 times faster when combined with our strategy. Moreover, we provide all the optimal solutions of the optimal coalescing challenge, including the three instances that were previously unsolved.

References

  1. Andrew W. Appel. Modern Compiler Implementation in ML. Cambridge University Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andrew W. Appel and Lal George. Optimal coalescing challenge, 2000. http://www.cs.princeton.edu/ appel/coalesceGoogle ScholarGoogle Scholar
  3. Andrew W. Appel and Lal George. Optimal spilling for {CISC} machines with few registers. In PLDI'01, pages 243--253, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Peter Bergner, Peter Dahl, David Engebretsen, et al. Spill code minimization via interference region spilling. In PLDI '97, pages 287--295, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Florent Bouchez. A Study of Spilling and Coalescing in Register Allocation as Two Separate Phases. PhD thesis, ENS Lyon, France, dec 2008.Google ScholarGoogle Scholar
  6. Florent Bouchez, Alain Darte, and Fabrice Rastello. On the complexity of register coalescing. In CGO'07, mar 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Preston Briggs. Register Allocation via Graph Coloring. PhD thesis, Rice University, april 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Philip Brisk, F.Dabiri, J.Macbeth, et al. Polynomial time graph coloring register allocation. In Workshop on Logic and Synthesis, 2005.Google ScholarGoogle Scholar
  9. G J Chaitin. Register allocation and spilling via graph coloring. Symposium on Compiler Construction, 17(6):98--105, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Fred C. Chow and John L. Hennessy. The priority-based coloring approach to register allocation. ACM TOPLAS, 12(4):501--536, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Keith D. Cooper and L. Taylor Simpson. Live range splitting in a graph coloring register allocator. In CC '98, pages 174--187, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Changqing Fu and Kent Wilken. A faster optimal register allocator. In MICRO 35, pages 245--256, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Lal George and Andrew W. Appel. Iterated register coalescing. ACM TOPLAS, 18(3):300--324, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. David Goodwin and Kent Wilken. Optimal and near-optimal global register allocations using 0-1 integer programming. Softw. Pract. Exper., 26(8):929--965, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. David W. Goodwin. Optimal and near-optimal global register allocation. PhD thesis, University of California, 1996.Google ScholarGoogle Scholar
  16. Daniel Grund and Sebastian Hack. A fast cutting-plane algorithm for optimal coalescing. In CC'07, LNCS, pages 111--125, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Rajiv Gupta, Mary Lou Soffa, and Denise Ombres. Efficient register allocation via coloring using clique separators. ACM TOPLAS., 16(3):370--386, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Priyadarshan Kolte and Mary Jean Harrold. Load/store range analysis for global register allocation. In PLDI'93, pages 268--277, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Guei-Yuan Lueh and Thomas Gross. Fusion-based register allocation. ACM TOPLAS, 22:2000, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jinpyo Park and Soo-Mook Moon. Optimistic register coalescing. In PACT '98, page 196, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Vivek Sarkar and Rajkishore Barik. Extended linear scan: An alternate foundation for global register allocation. In CC'07, LNCS, pages 141--155, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Robert Endre Tarjan. Decomposition by clique separators. In Discrete Mathematics, 55(2):221--232, 1985.Google ScholarGoogle ScholarCross RefCross Ref
  23. Douglas B. West. Introduction to Graph Theory (2nd Edition). Prentice Hall, August 2000.Google ScholarGoogle Scholar
  24. Mihalis Yannakakis and Fanica Gavril. The maximum k-colorable subgraph problem for chordal graphs. Inf. Process. Lett., 24(2):133--137, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Live-range unsplitting for faster optimal coalescing

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        LCTES '09: Proceedings of the 2009 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systems
        June 2009
        188 pages
        ISBN:9781605583563
        DOI:10.1145/1542452
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 7
          LCTES '09
          July 2009
          176 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543136
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 19 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        LCTES '09 Paper Acceptance Rate18of81submissions,22%Overall Acceptance Rate116of438submissions,26%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader