Automatic Detection of Saturation and Clipping Idioms | SpringerLink
Skip to main content

Automatic Detection of Saturation and Clipping Idioms

  • Conference paper
Languages and Compilers for Parallel Computing (LCPC 2002)

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

Abstract

The MMXTM technology and SSE/SSE2 (streaming-SIMD-extensions) introduced a variety of SIMD instructions that can exploit data parallelism in numerical and multimedia applications. In particular, new saturation and clipping instructions can boost the performance of applications that make extensive use of such operations. Unfortunately, due to the lack of support for saturation and clipping operators in e.g. C/C++ or Fortran, these operations must be explicitly coded with conditional constructs that test the value of operands before actual wrap-around arithmetic is performed. As a result, inlineassembly or language extensions are most commonly used to exploit the new instructions. In this paper, we explore an alternative approach, where the compiler automatically maps high-level saturation and clipping idioms onto efficient low-level instructions. The effectiveness of this approach is demonstrated with some experiments.

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • 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.

Similar content being viewed by others

References

  1. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers Principles, Techniques and Tools. Addison-Wesley, Reading (1986)

    Google Scholar 

  2. Allen, R., Kennedy, K.: Automatic Translation of Fortran Programs to Vector Form. ACM Transactions on Programming Languages and Systems 9, 491–542 (1987)

    Article  MATH  Google Scholar 

  3. Allen, R., Kennedy, K.: Optimizing Compilers for Modern Architectures. Morgan Kaufmann, San Francisco (2002)

    Google Scholar 

  4. Allen, R., Kennedy, K., Porterfield, C., Warren, J.: Conversion of Control Dependence to Data Dependence. In: ACM Symposium on Principles of Programming Languages, pp. 177–189 (1983)

    Google Scholar 

  5. Appel, A.: Modern Compiler Implementation in C. Cambridge University Press, Cambridge (1998)

    Google Scholar 

  6. Banerjee, U.: Dependence Analysis. A Book Series on Loop Transformations for Restructuring Compilers. Kluwer, Boston (1997)

    MATH  Google Scholar 

  7. Bik, A.J.C., Girkar, M., Grey, P.M., Tian, X.: Automatic intra-register vectorization for the Intel® Architecture. International Journal on Parallel Processing (2001)

    Google Scholar 

  8. Bistry, D., et al.: The Complete Guide to MMXTM technology. McGraw-Hill, Inc., New York (1997)

    Google Scholar 

  9. Fisher, R.J., Dietz, H.G.: Compiling for SIMD within a Register. In: 1998 Workshop on Languages and Compilers for Parallel Computing, August 7-9, University of North Carolina at Chapel Hill, North Carolina (1998)

    Google Scholar 

  10. Hinton, G., Sager, D., Upton, M., Boggs, D., Carmean, D., Kyker, A., Roussel, P.: The Microarchitecture of the Pentium® 4 Processor. Intel. Technology Journal (2001), http://intel.com/technology/itj/

  11. Intel Corporation. Intel Architecture MMXTM technology – Programmer’s Reference Manual. Intel Corporation, Order No. 243007-003 (1997), available at http://developer.intel.com/

  12. Intel Corporation. Intel Architecture Software Developer’s Manual, Basic Architecture, vol. 1, Intel Corporation (2001), available at http://developer.intel.com/

  13. Kernighan, B.W., Ritchie, D.M.: The C Programming Language. Prentice Hall, Englewood Cliffs (1988)

    Google Scholar 

  14. Kuck, D.J.: The Structure of Computers and Computations, vol. 1. John Wiley and Sons, New York (1978)

    Google Scholar 

  15. Lamport, L.: The Parallel Execution of DO Loops. Communications of the ACM, 83–93 (1974)

    Google Scholar 

  16. Larsen, S., Amarasinghe, S.: Exploiting Superword Level Parallelism with Multimedia Instruction Sets. In: Proceeding of the SIGPLAN Conference on Programming Language Design and Implementation, Vancouver, B.C. (June 2000)

    Google Scholar 

  17. Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A Tool for Evaluating and Synthesizing Multimedia and Communications Systems

    Google Scholar 

  18. Lempel, O., Peleg, A., Weiser, U.: Intel’s MMXTM Technology – A New Instruction Set Extension. In: Proceedings of COMPCON, pp. 255–259 (1997)

    Google Scholar 

  19. Levesque, J.M., Williamson, J.W.: A Guidebook to Fortran on Supercomputers. Academic Press, San Diego (1991)

    Google Scholar 

  20. Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)

    Google Scholar 

  21. Padua, D.A., Wolfe, M.J.: Advanced Compiler Optimizations for Supercomputers. Communications of the ACM 29, 1184–1201 (1986)

    Article  Google Scholar 

  22. Peleg, A., Weiser, U.: MMX Technology Extension to the Intel Architecture. IEEE Micro, 42–50 (1996)

    Google Scholar 

  23. Pokam, G., Simonnet, J., Bodin, F.: A Retargetable Preprocessor for Multimedia Instructions. In: Proceedings of the 9th Workshop on Compilers for Parallel Computers, June 2001, pp. 291–301 (2001)

    Google Scholar 

  24. Polychronopoulos, C.D.: Parallel Programming and Compilers. Kluwer, Boston (1988)

    Google Scholar 

  25. Sreraman, N., Govindarajan, R.: A vectorizing compiler for multimedia extensions. International Journal on Parallel Processing (2000)

    Google Scholar 

  26. Raman, S.K., Pentkovski, V., Keshava, J.: Implementing Streaming SIMD Extensions on the Pentium III Processor. IEEE Micro 20(4), 47–57 (2000)

    Article  Google Scholar 

  27. Stroustrup, B.: The C++ Programming Language. Addison-Wesley, Reading (1991)

    Google Scholar 

  28. Thakkar, S., Huff, T.: Internet Streaming SIMD Extensions. IEEE Computer 32, 26–34 (1999)

    Google Scholar 

  29. Wolfe, M.J.: High Performance Compilers for Parallel Computing. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  30. Zima, H.: Supercompilers for Parallel and Vector Computers. ACM Press, New York (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bik, A.J.C., Girkar, M., Grey, P.M., Tian, X. (2005). Automatic Detection of Saturation and Clipping Idioms. In: Pugh, B., Tseng, CW. (eds) Languages and Compilers for Parallel Computing. LCPC 2002. Lecture Notes in Computer Science, vol 2481. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11596110_5

Download citation

  • DOI: https://doi.org/10.1007/11596110_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-30781-5

  • Online ISBN: 978-3-540-31612-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics