skip to main content
10.1145/1254766.1254805acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
Article

Scratchpad allocation for data aggregates in superperfect graphs

Published:13 June 2007Publication History

ABSTRACT

Existing methods place data or code in scratchpad memory, i.e., SPM by either relying on heuristics or resorting to integer programming or mapping it to a graph coloring problem.

In this work, the SPM allocation problem is formulated as an interval coloring problem. The key observation is that in many embedded applications, arrays (including structs as a special case) are often related in the following way: For any two arrays, their live ranges are often such that one is either disjoint from or contains the other. As a result, array interference graphs are often superperfect graphs and optimal interval colorings for such array interference graphs are possible. This has led to the development of two new SPM allocation algorithms. While differing in whether live range splits and spills are done sequentially or together, both algorithms place arrays in SPM based on examining the cliques in an interference graph. In both cases, we guarantee optimally that all arrays in an interference graph can be placed in SPM if its size is no smaller than the clique number of the graph. In the case that the SPM is not large enough, we rely on heuristics to split or spill a live range until the graph is colorable. Our experiment results using embedded benchmarks show that our algorithms can outperform graph coloring when their interference graphs are superperfect or nearly so although graph coloring is admittedly more general and may also be effective to applications with arbitrary interference graphs.

References

  1. Christian Andersson. Register allocation by optimal graph coloring. In CC'03: Proceedings of the 12th International Conference on Compiler Construction. Springer-Verlag, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Oren Avissar, Rajeev Barua, and Dave Stewart. An optimal memory allocation scheme for scratch-pad-based embedded systems. ACM Transactions on Embedded Computing Systems, 1(1):6--26, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Rajeshwari Banakar, Stefan Steinke, Bo-Sik Lee, M. Balakrishnan, and Peter Marwedel. Scratchpad memory: design alternative for cache on-chip memory in embedded systems. In CODES'02: Proceedings of the 10th International Symposium on Hardware/Software Codesign, pages 73--78, New York, NY, USA, 2002. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Giuseppe Confessore, Paolo Dell'Olmo, and Stefano Giordani. An approximation result for the interval coloring problem on claw-free chordal graphs. Discrete Applied Mathematics, 120(1-3):73--90, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. An efficient method of computing static single assignment form. In POPL'89: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 25--35, New York, NY, USA, 1989. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Detlefs and O. Agesen. Inlining of virtual methods. In ECOOP'99: Proceedings of the 13th European Conference on Object-Oriented Programming, pages 258--278, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Janet Fabri. Automatic storage optimization. In SIGPLAN'79: Proceedings of the SIGPLAN Symposium on Compiler Construction, pages 83--91, New York, NY, USA, 1979. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. R. Garey and D. S. Johnson. The complexity of near-optimal graph coloring. Journal of the ACM, 23(1):43--49, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Michael R. Garey and David S. Johnson. Computers and intractability: a guide to the theory of NP-completeness. W. H. Freeman & Co., New York, NY, USA, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Lal George and Andrew W. Appel. Iterated register coalescing. ACM Transactions on Programming Languages and Systems, 18(3):300--324, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jordan Gergov. Algorithms for compile-time memory optimization. In SODA'99: Proceedings of the 10th annual ACM-SIAM Symposium on Discrete algorithms, pages 907--908, Philadelphia, PA, USA, 1999. Society for Industrial and Applied Mathematics. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Martin Charles Golumbic. Algorithmic graph theory and perfect graphs. Annals of Discrete Mathematics, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Sebastian Hack, Daniel Grund, and Gerhard Goos. Register allocation for programs in ssa-form. In CC'06: Proceedings of the 15th International Conference on Compiler Construction. Springer-Verlag, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Qingguang Huang, Jingling Xue, and Xavier Vera. Code tiling for improving the cache performance of PDE solvers. In International Conference on Parallel Processing, pages 615--625, 2003.Google ScholarGoogle Scholar
  15. M. Kandemir, J. Ramanujam, J. Irwin, N. Vijaykrishnan, I. Kadayif, and A. Parikh. Dynamic management of scratch-pad memory space. In DAC'01: Proceedings of the 38th Conference on Design Automation, pages 690--695. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. H. A. Kierstead. A polynomial time approximation algorithm for dynamic storage allocation. Discrete Mathematics, 87(2-3):231--237, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Lian Li, Lin Gao, and Jingling Xue. Memory coloring: a compiler approach for scratchpad memory management. In PACT'05: Proceedings of the 14th International Conference on Parallel Architectures and Compilation Techniques, pages 329--338, Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Sriram V. Pemmaraju, Sriram Penumatcha, and Rajiv Raman. Approximating interval coloring and max-coloring in chordal graphs. Journal of Experimental Algorithmics, 10:2.8, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Fernando Magno Quintão Pereira and Jens Palsberg. Register allocation via coloring of chordal graphs. In APLAS'05: Proceedings of the 3rd Asia Symposium on Programming Languages and Systems, pages 315--329, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Rajiv A. Ravindran, Pracheeti D. Nagarkar, Ganesh S. Dasika, Eric D. Marsman, Robert M. Senger, Scott A. Mahlke, and Richard B. Brown. Compiler managed dynamic instruction placement in a low-power code cache. In CGO'05: Proceedings of the International Symposium on Code Generation and Optimization, pages 179--190, Washington, DC, USA, 2005. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Jan Sjödin and Carl von Platen. Storage allocation for embedded processors. In CASES'01: Proceedings of the International Conference on Compilers, Architecture, and Synthesis for Embedded Systems, pages 15--23. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Michael D. Smith, Norman Ramsey, and Glenn Holloway. A generalized algorithm for graph-coloring register allocation. In PLDI'04: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 277--288. ACM Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Sumesh Udayakumaran and Rajeev Barua. Compiler-decided dynamic memory allocation for scratch-pad based embedded systems. In CASES'03: Proceedings of the International Conference on Compilers, Architecture and Synthesis for Embedded Systems, pages 276--286. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Manish Verma, Lars Wehmeyer, and Peter Marwedel. Dynamic overlay of scratchpad memory for energy minimization. In CODES+ISSS'04: Proceedings of the 2nd IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, pages 104--109, New York, NY, USA, 2004. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Thomas Zeitlhofer and Bernhard Wess. List-coloring of interval graphs with application to register assignment for heterogeneous register-set architectures. ACM Signal Processing, 83(7):1411--1425, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Scratchpad allocation for data aggregates in superperfect graphs

      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 '07: Proceedings of the 2007 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systems
        June 2007
        258 pages
        ISBN:9781595936325
        DOI:10.1145/1254766
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 42, Issue 7
          Proceedings of the 2007 LCTES conference
          July 2007
          241 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1273444
          Issue’s Table of Contents

        Copyright © 2007 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 June 2007

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate116of438submissions,26%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!