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.
- Christian Andersson. Register allocation by optimal graph coloring. In CC'03: Proceedings of the 12th International Conference on Compiler Construction. Springer-Verlag, 2003.Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- M. R. Garey and D. S. Johnson. The complexity of near-optimal graph coloring. Journal of the ACM, 23(1):43--49, 1976. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Lal George and Andrew W. Appel. Iterated register coalescing. ACM Transactions on Programming Languages and Systems, 18(3):300--324, 1996. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Martin Charles Golumbic. Algorithmic graph theory and perfect graphs. Annals of Discrete Mathematics, 2004. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- H. A. Kierstead. A polynomial time approximation algorithm for dynamic storage allocation. Discrete Mathematics, 87(2-3):231--237, 1991. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Scratchpad allocation for data aggregates in superperfect graphs
Recommendations
Scratchpad allocation for data aggregates in superperfect graphs
Proceedings of the 2007 LCTES conferenceExisting 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 ...
Scratchpad memory allocation for data aggregates via interval coloring in superperfect graphs
Existing methods place data or code in scratchpad memory (SPM) by relying on heuristics or resorting to integer programming or mapping it to a graph-coloring problem. In this article, the SPM allocation problem for arrays is formulated as an interval ...
Interval Non-edge-Colorable Bipartite Graphs and Multigraphs
An edge-coloring of a graph G with colors 1,...,t is called an interval t-coloring if all colors are used, and the colors of edges incident to any vertex of G are distinct and form an interval of integers. In 1991, Erdï s constructed a bipartite graph ...







Comments