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

Combinatorial spill code optimization and ultimate coalescing

Authors Info & Claims
Published:12 June 2014Publication History

ABSTRACT

This paper presents a novel combinatorial model that integrates global register allocation based on ultimate coalescing, spill code optimization, register packing, and multiple register banks with instruction scheduling (including VLIW). The model exploits alternative temporaries that hold the same value as a new concept for ultimate coalescing and spill code optimization.

The paper presents Unison as a code generator based on the model and advanced solving techniques using constraint programming. Thorough experiments using MediaBench and a processor (Hexagon) that are typical for embedded systems demonstrate that Unison: is robust and scalable; generates faster code than LLVM (up to 41% with a mean improvement of 7%); possibly generates optimal code (for 29% of the experiments); effortlessly supports different optimization criteria (code size on par with LLVM).

Unison is significant as it addresses the same aspects as traditional code generation algorithms, yet is based on a simple integrated model and robustly can generate optimal code.

References

  1. A. W. Appel and L. George. Optimal spilling for CISC machines with few registers. SIGPLAN Not., 36:243--253, May 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Bashford and R. Leupers. Phase-coupled mapping of data flow graphs to irregular data paths. Design Automation for Embedded Systems, pages 119--165, Mar. 1999.Google ScholarGoogle Scholar
  3. R. Castañeda Lozano, M. Carlsson, F. Drejhammar, and C. Schulte. Constraint-based register allocation and instruction scheduling. In CP, volume 7514 of LNCS, pages 750--766. Springer, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. G. J. Chaitin, M. A. Auslander, A. K. Chandra, J. Cocke, M. E. Hopkins, and P.W. Markstein. Register allocation via coloring. Computer Languages, 6(1):47--57, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C.-M. Chang, C.-M. Chen, and C.-T. King. Using integer linear programming for instruction scheduling and register allocation in multiissue processors. Computers Math. Applic., 34:1--14, Nov. 1997.Google ScholarGoogle ScholarCross RefCross Ref
  6. F. Chow and J. Hennessy. Register allocation by priority-based coloring. SIGPLAN Not., 19(6):222--232, June 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. V. Eriksson, O. Skoog, and C. W. Kessler. Optimal vs. heuristic integrated code generation for clustered VLIW architectures. In SCOPES, 2008. Google ScholarGoogle ScholarCross RefCross Ref
  8. C. H. Gebotys. An efficient model for DSP code generation: Performance, code size, estimated energy. In ISSS, pages 41--47. IEEE, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Gecode Team. Gecode: generic constraint development environment. www.gecode.org, 2006.Google ScholarGoogle Scholar
  10. D. W. Goodwin and K. D. Wilken. Optimal and near-optimal global register allocations using 0--1 integer programming. Software -- Practice and Experience, 26:929--965, Aug. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Kästner. PROPAN: A retargetable system for postpass optimisations and analyses. In LCTES, volume 1985 of LNCS, 2001.Google ScholarGoogle Scholar
  12. P. K. Krause. Optimal register allocation in polynomial time. In CC, volume 7791 of LNCS, pages 1--20. Springer, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Lee, M. Potkonjak, and W. H. Mangione-Smith. MediaBench: A tool for evaluating and synthesizing multimedia and communications systems. In MICRO-30, pages 330--335. IEEE, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. G. Nagarakatte and R. Govindarajan. Register allocation and optimal spill code scheduling in software pipelined loops using 0--1 integer linear programming formulation. In CC, volume 4420 of LNCS, pages 126--140. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hexagon V4 Programmer's Reference Manual. Qualcomm Technologies, Inc., Aug. 2013.Google ScholarGoogle Scholar
  16. B. R. Rau and J. A. Fisher. Instruction-level parallel processing: history, overview, and perspective. J. Supercomput., 7:9--50, May 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. F. Rossi, P. van Beek, and T. Walsh. Handbook of Constraint Programming. Elsevier, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. B. Scholz and E. Eckstein. Register allocation for irregular architectures. SIGPLAN Not., 37:139--148, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. V. Sreedhar, R. Ju, D. Gillies, and V. Santhanam. Translating out of static single assignment form. In SAS, volume 1694 of LNCS, pages 849--849. Springer, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. Wilson, G. Grewal, B. Halley, and D. Banerji. An integrated approach to retargetable code generation. In ISSS, pages 70--75. IEEE, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Wilson, G. Grewal, S. Henshall, and D. Banerji. An ILP-based approach to code generation. In Code Generation for Embedded Processors, pages 103--118. Springer, 2002.Google ScholarGoogle ScholarCross RefCross Ref
  22. S. Winkel. Optimal versus heuristic global code scheduling. In MICRO-40, pages 43--55. IEEE, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Combinatorial spill code optimization and ultimate 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 '14: Proceedings of the 2014 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems
        June 2014
        174 pages
        ISBN:9781450328777
        DOI:10.1145/2597809

        Copyright © 2014 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: 12 June 2014

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        LCTES '14 Paper Acceptance Rate16of51submissions,31%Overall Acceptance Rate116of438submissions,26%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader