Skip to main content

Improving TriMedia Cache Performance by Profile Guided Code Reordering

  • Conference paper
Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4599))

Included in the following conference series:

  • 792 Accesses

Abstract

There is an ever-increasing gap between memory and processor performance. As a result, exploiting the cache becomes increasingly important, especially for embedded systems where cache sizes are much smaller than that of general purpose processors. The fine-tuning of an application with respect to cache behavior is now largely dependent on the skill of the application programmer. Given the difficulty of predicting cache behavior, this is, even when great skill is applied, a cumbersome task. A wide range of approaches, in hardware as well as in software, can be used to relieve the programmer’s burden. On the hardware side, we can experiment, for example, with cache sizes, line sizes, replacement policies, and cache organization. On the software side, we can use various optimization techniques like software pipelining, branch prediction, and code reordering. The research described in this paper focussed on improving performance by using code reordering techniques.

This paper reports on the work that we have done to reduce the number of line-fetches in the instruction cache. We have extended the functionality of the linker in the TriMedia compiler chain, such that the number of fetches during program execution is reduced. By reordering the code, we ensure that hot code stays in the cache and the cache is not polluted with cold code. Because fewer fetches are needed we expect a performance increase. By analyzing and profiling code, we obtain execution statistics that can help us find better code-allocations.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Friedman, N.: GNU Rope–a subroutine position optimizer (1998)

    Google Scholar 

  2. Pettis, K., Hansen, R.C.: Profile guided code positioning. In: PLDI 1990. Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, pp. 16–27. ACM Press, New York (1990)

    Chapter  Google Scholar 

  3. Philips Semiconductors: TriMediaTM Compilation System 5.01 User Manuals, vol. 3, Ch. 8, pp. 173–184 (2006)

    Google Scholar 

  4. Banerjia, S., Havanki, W.A., Conte, T.M.: Treegion scheduling for highly parallel processors. In: Lengauer, C., Griebl, M., Gorlatch, S. (eds.) Euro-Par 1997. LNCS, vol. 1300, pp. 1074–1078. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  5. Havanki, W., Banerjia, S., Conte, T.: Treegion scheduling for wide issue processors. In: HPCA 1998. Proceedings of the 4th International Symposium on High-Performance Computer Architecture, Washington, DC, p. 266. IEEE Computer Society Press, Los Alamitos (1998)

    Google Scholar 

  6. van de Waerdt, J.W., Vassiliadis, S., Das, S., Mirolo, S., Yen, C., Zhong, B., Basto, C., van Itegem, J.P., Amirtharaj, D., Kalra, K., Rodriguez, P., van Antwerpen, H.: The tm3270 media-processor. In: MICRO 38. Proceedings of the 38th annual IEEE/ACM International Symposium on Microarchitecture, Washington, DC, pp. 331–342. IEEE Computer Society Press, Los Alamitos (2005)

    Google Scholar 

  7. McFarling, S.: Program optimization for instruction caches. In: ASPLOS-III. Proceedings of the third international conference on Architectural support for programming languages and operating systems, pp. 183–191. ACM Press, New York (1989)

    Chapter  Google Scholar 

  8. Hwu, W.W., Chang, P.P.: Achieving high instruction cache performance with an optimizing compiler. In: ISCA 1989. Proceedings of the 16th annual international symposium on Computer architecture, pp. 242–251. ACM Press, New York (1989)

    Chapter  Google Scholar 

  9. Hashemi, A.H., Kaeli, D.R., Calder, B.: Efficient procedure mapping using cache line coloring. In: PLDI 1997. Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation, pp. 171–182. ACM Press, New York (1997)

    Chapter  Google Scholar 

  10. Gloy, N., Blackwell, T., Smith, M.D., Calder, B.: Procedure placement using temporal ordering information. In: MICRO 30. Proceedings of the 30th annual ACM/IEEE international symposium on Microarchitecture, Washington, DC, pp. 303–313. IEEE Computer Society Press, Los Alamitos (1997)

    Google Scholar 

  11. Kirovski, D., Lee, C., Potkonjak, M., Mangione-Smith, W.H.: Synthesis of power efficient systems-on-silicon. In: Asia and South Pacific Design Automation Conference, pp. 557–562 (1998)

    Google Scholar 

  12. Brown, S.S., Asher, J., Mangione-Smith, W.H.: Offline program re-mapping to improve branch prediction efficiency in embedded systems. In: ASP-DAC 2000. Proceedings of the 2000 conference on Asia South Pacific design automation, pp. 111–116. ACM Press, New York (2000)

    Chapter  Google Scholar 

  13. Luk, C.K., Muth, R., Patil, H., Cohn, R., Lowney, G.: Ispike: A post-link optimizer for the Intel® Itanium® architecture. In: CGO 2004. Proceedings of the international symposium on Code generation and optimization, Washington, DC, USA, p. 15. IEEE Computer Society Press, Los Alamitos (2004)

    Google Scholar 

  14. Hashemi, A., Kaeli, D., Calder, B.: Procedure mapping using static call graph estimation. In: Proceedings of the Workshop on Interaction between Compiler and Computer Architecture (1997)

    Google Scholar 

  15. Mendlson, A., Pinter, S.S., Shtokhamer, R.: Compile time instruction cache optimizations. SIGARCH Comput. Archit. News 22, 44–51 (1994)

    Article  Google Scholar 

  16. Rathnam, S., Slavenburg, G.: An architectural overview of the programmable multimedia processor, TM-1. In: COMPCON 1996. Proceedings of the 41st IEEE International Computer Conference, Washington, DC, p. 319. IEEE Computer Society Press, Los Alamitos (1996)

    Google Scholar 

  17. van de Waerdt, J.: The TM3270 Media-processor. PhD thesis, Delft University of Technology (2006)

    Google Scholar 

  18. Snyder, W.: Verilator-3.631 (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Stamatis Vassiliadis Mladen Bereković Timo D. Hämäläinen

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Esser, N., Sundararajan, R., Trescher, J. (2007). Improving TriMedia Cache Performance by Profile Guided Code Reordering. In: Vassiliadis, S., Bereković, M., Hämäläinen, T.D. (eds) Embedded Computer Systems: Architectures, Modeling, and Simulation. SAMOS 2007. Lecture Notes in Computer Science, vol 4599. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-73625-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-73625-7_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-73622-6

  • Online ISBN: 978-3-540-73625-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics