Skip to main content
Log in

SRF Coloring: Stream Register File Allocation via Graph Coloring

  • Regular Paper
  • Published:
Journal of Computer Science and Technology Aims and scope Submit manuscript

Abstract

Stream Register File (SRF) is a large on-chip memory of the stream processor and its efficient management is essential for good performance. Current stream programming languages expose the management of SRF to the programmer, incurring heavy burden on the programmer and bringing difficulties to inheriting the legacy codes. SF95 is the language developed for FT64 which is the first 64-bit stream processor designed for scientific applications. SF95 conceals SRF from the programmer and leaves the management of SRF to its compiler. In this paper, we present a compiler approach named SRF Coloring to manage SRF automatically. The novelties of this paper are: first, it is the first time to use the graph coloring-based algorithm for the SRF management; second, an algorithm framework for SRF Coloring that is well suited to the FT64 architecture is proposed — this framework is based on a well-understood graph coloring algorithm for register allocation, together with some modifications to deal with the unusual aspects of SRF problem; third, the SRF Coloring algorithm is implemented in SF95Compiler, a compiler designed for FT64 and SF95. The experimental results show that our approach represents a practical and promising solution to SRF allocation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Rixner S. Stream Processor Architecture. Kluwer Academic Publishers Group, 2002.

  2. Kapasi U J, Dally W J, Rixner S, Owens J D, Khailany B. The imagine stream processor. In Proc. the 20th IEEE International Conference on Computer Design (ICCD’02), IEEE Computer Society, Freiburg, Germany, Sept. 2002, pp.282–288.

    Google Scholar 

  3. Taylor M, Kim J et al. The raw microprocessor: A computational fabric for software circuits and general purpose programs. IEEE Micro, 2002, 22(2): 25–35.

    Article  Google Scholar 

  4. Yang X, Yan X, Xing Z, Deng Y, Jiang J, Zhang Y. A 64-bit stream processor architecture for scientific applications. In Proc. the 34th Annual Int. Symp. Computer Architecture (ISCA’07), San Diego, CA, USA, June 9–13, 2007, pp.210–219.

  5. Gordon M I, Thies W et al. A stream compiler for communication-exposed architectures. In Proc. the 10th Int. Conf. Architectural Support for Programming Languages and Operating Systems (ASPLOS-X), San Jose, CA, USA, Oct. 5–9, 2002, pp.291–303.

  6. Owens J D, Kapasi U J et al. Media processing applications on the imagine stream processor. In Proc. 20th IEEE International Conference on Computer Design (ICCD’02), IEEE Computer Society, Freiburg, Germany, Sept. 2002, pp.295–302.

    Google Scholar 

  7. Owens J D. Computer graphics on a stream architecture [Ph.D. Dissertation]. Stanford University, 2002.

  8. Mattson P. A programming system for the imagine media processor [Ph.D. Dissertation]. Stanford University, 2002.

  9. Buck I. Brook Spec v0.2. Report of Stanford University, 2003, http://merrimac.stanford.edu/brook/brookspec-v0.2.pdf

  10. Hoare T. Communicating sequential processes. Communications of the ACM, 1978, 8(21): 666–677.

    Article  Google Scholar 

  11. Stephens R. A survey of stream processing. Acta Informatica, 1995, 34(7): 491–541.

    Article  MathSciNet  Google Scholar 

  12. Li L, Gao L, Xue J. Memory coloring: A compiler approach for scratchpad memory management. In Proc. the 14th International Conference on Parallel Architectures and Compilation Techniques (PACT’05), IEEE Computer Society, St. Louis, MO, USA, 2005, pp.329–338.

    Google Scholar 

  13. Smith M D, Ramsey N, Holloway G. A generalized algorithm for graph-coloring register allocation. In Proc. the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI’04), Washington DC, USA, June 9–11, 2004, pp.277–288.

  14. Appel A W. Modern Compiler Implementation in C. Cambridge: Cambridge University Press, England, 1998.

    Google Scholar 

  15. Kapasi U J, Mattson P, Dally W J, Owens J D, Towles B. Stream scheduling. Concurrent VLSI Architecture Tech. Report of Stanford University, 2002.

  16. Das A, Dally W J, Mattson P. Compiling for stream processing. In Proc. the 15th International Conference on Parallel Architectures and Compilation Techniques (PACT’06), Seattle, Washington, USA, Sept. 16–20, 2006, pp.33–42.

  17. Chaitin G J. Register Allocation & Spilling via Graph Coloring. In Proc. the 1982 SIGPLAN Symp. Compiler Construction (SIGPLAN’82), Boston, USA, ACM Press, New York, 1982, pp.98–105.

    Chapter  Google Scholar 

  18. Chow F C, Hennessy J L. The priority-based coloring approach to register allocation. ACM Trans. Program. Lang. Syst., 1990, 12(4): 501–536.

    Article  Google Scholar 

  19. Briggs P, Cooper K D, Torczon L. Improvements to graph coloring register allocation. ACM Trans. Program. Lang. Syst., 1994, 16(3): 428–455.

    Article  Google Scholar 

  20. George L, Appel A W. Iterated register coalescing. ACM Trans. Program. Lang. Syst., 1996, 18(3): 300–324.

    Article  Google Scholar 

  21. Lueh G-Y, Gross T, Adl-Tabatabai A-R. Fusion-based register allocation. ACM Trans. Program. Lang. Syst., 2000, 22(3): 431–470.

    Article  Google Scholar 

  22. Golumbic M C. Algorithmic Graph Theory and Perfect Graphs. Annals of Discrete Mathematics, Vol. 57, ISBN 0444515305, Amsterdam: North-Holland Publishing Co., The Netherlands, 2004.

    Google Scholar 

  23. Fabri J. Automatic storage optimization. In Proc. the SIGPLAN Symp. Compiler Construction (SIGPLAN’79), Denver, Colorado, USA, 1979, pp.83–91.

  24. Kierstead H A. A polynomial time approximation algorithm for dynamic storage allocation. Discrete Mathematics, 1991, 87(2/3): 231–237.

    Article  MathSciNet  Google Scholar 

  25. Gergov J. Algorithms for compile-time memory optimization. In Proc. the 10th Annual ACM-SIAM Symp. Discrete Algorithms (SODA’99), Baltimore, Maryland, USA, Jan. 17–19, 1999, pp.907–908.

  26. Johnson M R. Computers and Intractability: A Guide to the Theory of NP-Completeness. New York: W. H. Freeman & Co., USA, 1979.

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yu Deng.

Additional information

Supported by the National Natural Science Foundation of China under Grant Nos. 60621003 and 60633050.

Electronic Supplementary Material

Below is the link to the electronic supplementary material.

(PDF 72.5 kb)

Rights and permissions

Reprints and permissions

About this article

Cite this article

Yang, XJ., Deng, Y., Wang, L. et al. SRF Coloring: Stream Register File Allocation via Graph Coloring. J. Comput. Sci. Technol. 24, 152–164 (2009). https://doi.org/10.1007/s11390-009-9211-x

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11390-009-9211-x

Keywords

Navigation