Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1772954.1772978acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Coloring-based coalescing for graph coloring register allocation

Published: 24 April 2010 Publication History
  • Get Citation Alerts
  • Abstract

    Graph coloring register allocation tries to minimize the total cost of spilled live ranges of variables. Live-range splitting and coalescing are often performed before the coloring to further reduce the total cost. Coalescing of split live ranges, called sub-ranges, can decrease the total cost by lowering the interference degrees of their common interference neighbors. However, it can also increase the total cost because the coalesced sub-ranges can become uncolorable. In this paper, we propose coloring-based coalescing, which first performs trial coloring and next coalesces all copyrelated sub-ranges that were assigned the same color. The coalesced graph is then colored again with the graph coloring register allocation. The rationale is that coalescing of differently colored sub-ranges could result in spilling because there are some interference neighbors that prevent them from being assigned the same color. Experiments on Java programs show that the combination of live-range splitting and coloring-based coalescing reduces the static spill cost by more than 6% on average, comparing to the baseline coloring without splitting. In contrast, well-known iterated and optimistic coalescing algorithms, when combined with splitting, increase the cost by more than 20%. Coloring-based coalescing improves the execution time by up to 15% and 3% on average, while the existing algorithms improve by up to 12% and 1% on average.

    References

    [1]
    Appel, A. W. and George, L. Optimal spilling for CISC machines with few registers. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, pages 243--253, June 2001.
    [2]
    Bernstein, D., Golumbic, M. C., Mansour, Y., Pinter, R. Y., Goldin, D. Q., Krawczyk, H., and Nahshon, I. Spill code minimization techniques for optimizing compliers, In Proceedings of the ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation, pages 258--263, July 1989
    [3]
    Bouchez, F., Darte, A., and Rastello, F. Advanced conservative and optimistic register coalescing. In Proceedings of the 2008 International Conference on Compilers, Architectures and Synthesis for Embedded Systems, pages 147--156, 2008.
    [4]
    Bouchez, F., Darte, A., and Rastello, F. On the complexity of register coalescing. In Proceedings of the International Symposium on Code Generation and Optimization 2007, pages 102--114, March 2007.
    [5]
    Briggs, P. Register Allocation via Graph Coloring. PhD thesis, Rice University, April 1992.
    [6]
    Briggs, P., Cooper, K. D., and Torczon, L. Improvements to graph coloring register allocation. ACM Transactions on Programming Languages and Systems, Vol. 16, No. 3, pages 428--455, May 1994.
    [7]
    Chaitin, G. J. Register allocation and spilling via graph coloring. In Proceedings of the ACM SIGPLAN 1982 Symposium on Compiler Construction, pages 201--207, SIGPLAN Notices Vol. 17, No. 6, pages 98--105, June 1982.
    [8]
    Chaitin, G. J., Auslander, M. A., Chandra, A. K., Cocke, J., Hopkins, M. E., and Markstein, P. W. Register allocation via coloring. Computer Languages, Vol. 6, No. 1, pages 47--57, January 1981.
    [9]
    DaCapo Benchmarks, http://dacapobench.org/.
    [10]
    George, L. and Appel, A. W. Iterated register coalescing. ACM Transactions on Programming Languages and Systems, Vol. 18, No. 3, pages 300--324, May 1996.
    [11]
    Grcevski, N., Kilstra, A., Stoodley, K., Stoodley, M., and Sundaresan, V. Java just-in-time compiler and virtual machine improvements for server and middleware applications. In Proceedings of the 3rd Virtual Machine Research and Technology Symposium, pages 151--162, May, 2004.
    [12]
    Hack, S. and Goos, G. Copy coalescing by graph recoloring. In Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, pages 227--237, June 2008.
    [13]
    Hack, S., Grund, D., and Goos, G. Register allocation for programs in SSA-form. In International Conference on Compiler Construction (CC'06), Vol. 3923 of LNCS, pages 247--262, Springer Verlag, 2006.
    [14]
    Hailperin, M. Comparing conservative coalescing criteria. ACM Transactions on Programming Languages and Systems, Vol. 27, No. 3, pages 571--582, May 2005.
    [15]
    IBM System z9. IBM Journal of Research and Development Vol. 51, Number 1/2, 2007.
    [16]
    Kolte, P. and Harrold, M. J. Load/store range analysis for global register allocation. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pages 268--277, June 1993.
    [17]
    Leung, A. and George, L. A new MLRISC register allocator. Standard ML of New Jersey compiler implementation notes, 1998.
    [18]
    Nakaike, T., Inagaki, T., Komatsu, H., and Nakatani, T. Profile-based global live-range splitting. In Proceedings the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation, pages 216--227, June 2006.
    [19]
    Park, J. and Moon, S. Optimistic Register Coalescing. ACM Transactions on Programming Languages and Systems, Vol. 26, No. 4, pages 735--765, July 2004.
    [20]
    Vegdahl, S. R. Using node merging to enhance graph coloring. In Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pages 150--154, May 1999.
    [21]
    Standard Performance Evaluation Corporation. SPECjvm98 Benchmarks, http://www.spec.org/osg/jvm98/.

    Cited By

    View all
    • (2022)Energy Reduction Method by Compiler OptimizationArtificial Intelligence and Security10.1007/978-3-031-06794-5_54(672-683)Online publication date: 15-Jul-2022
    • (2021)Graphs based on IR as Representation of CodeProceedings of the 25th Brazilian Symposium on Programming Languages10.1145/3475061.3475063(75-82)Online publication date: 27-Sep-2021
    • (2019)IGC: the open source Intel graphics compilerProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314902(254-265)Online publication date: 16-Feb-2019
    • Show More Cited By

    Index Terms

    1. Coloring-based coalescing for graph coloring register allocation

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization
      April 2010
      300 pages
      ISBN:9781605586359
      DOI:10.1145/1772954
      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]

      Sponsors

      In-Cooperation

      • IEEE CS uArch

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 24 April 2010

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. register allocation
      2. register coalescing

      Qualifiers

      • Research-article

      Conference

      CGO '10

      Acceptance Rates

      Overall Acceptance Rate 312 of 1,061 submissions, 29%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)3
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 09 Aug 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2022)Energy Reduction Method by Compiler OptimizationArtificial Intelligence and Security10.1007/978-3-031-06794-5_54(672-683)Online publication date: 15-Jul-2022
      • (2021)Graphs based on IR as Representation of CodeProceedings of the 25th Brazilian Symposium on Programming Languages10.1145/3475061.3475063(75-82)Online publication date: 27-Sep-2021
      • (2019)IGC: the open source Intel graphics compilerProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314902(254-265)Online publication date: 16-Feb-2019
      • (2019)IGC: The Open Source Intel Graphics Compiler2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661189(254-265)Online publication date: Feb-2019
      • (2018)Improving on Linear Scan Register AllocationInternational Journal of Automation and Computing10.1007/s11633-017-1100-015:2(228-238)Online publication date: 1-Apr-2018
      • (2016)A fast greedy sequential heuristic for the vertex colouring problem based on bitwise operationsJournal of Combinatorial Optimization10.1007/s10878-015-9862-131:4(1665-1677)Online publication date: 1-May-2016
      • (2011)Graph-coloring and treescan register allocation using repairingProceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems10.1145/2038698.2038708(45-54)Online publication date: 9-Oct-2011

      View Options

      Get Access

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media