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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers Principles, Techniques and Tools. Addison-Wesley, Reading (1986)
Allen, R., Kennedy, K.: Automatic Translation of Fortran Programs to Vector Form. ACM Transactions on Programming Languages and Systems 9, 491–542 (1987)
Allen, R., Kennedy, K.: Optimizing Compilers for Modern Architectures. Morgan Kaufmann, San Francisco (2002)
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)
Appel, A.: Modern Compiler Implementation in C. Cambridge University Press, Cambridge (1998)
Banerjee, U.: Dependence Analysis. A Book Series on Loop Transformations for Restructuring Compilers. Kluwer, Boston (1997)
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)
Bistry, D., et al.: The Complete Guide to MMXTM technology. McGraw-Hill, Inc., New York (1997)
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)
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/
Intel Corporation. Intel Architecture MMXTM technology – Programmer’s Reference Manual. Intel Corporation, Order No. 243007-003 (1997), available at http://developer.intel.com/
Intel Corporation. Intel Architecture Software Developer’s Manual, Basic Architecture, vol. 1, Intel Corporation (2001), available at http://developer.intel.com/
Kernighan, B.W., Ritchie, D.M.: The C Programming Language. Prentice Hall, Englewood Cliffs (1988)
Kuck, D.J.: The Structure of Computers and Computations, vol. 1. John Wiley and Sons, New York (1978)
Lamport, L.: The Parallel Execution of DO Loops. Communications of the ACM, 83–93 (1974)
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)
Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A Tool for Evaluating and Synthesizing Multimedia and Communications Systems
Lempel, O., Peleg, A., Weiser, U.: Intel’s MMXTM Technology – A New Instruction Set Extension. In: Proceedings of COMPCON, pp. 255–259 (1997)
Levesque, J.M., Williamson, J.W.: A Guidebook to Fortran on Supercomputers. Academic Press, San Diego (1991)
Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco (1997)
Padua, D.A., Wolfe, M.J.: Advanced Compiler Optimizations for Supercomputers. Communications of the ACM 29, 1184–1201 (1986)
Peleg, A., Weiser, U.: MMX Technology Extension to the Intel Architecture. IEEE Micro, 42–50 (1996)
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)
Polychronopoulos, C.D.: Parallel Programming and Compilers. Kluwer, Boston (1988)
Sreraman, N., Govindarajan, R.: A vectorizing compiler for multimedia extensions. International Journal on Parallel Processing (2000)
Raman, S.K., Pentkovski, V., Keshava, J.: Implementing Streaming SIMD Extensions on the Pentium III Processor. IEEE Micro 20(4), 47–57 (2000)
Stroustrup, B.: The C++ Programming Language. Addison-Wesley, Reading (1991)
Thakkar, S., Huff, T.: Internet Streaming SIMD Extensions. IEEE Computer 32, 26–34 (1999)
Wolfe, M.J.: High Performance Compilers for Parallel Computing. Addison-Wesley, Reading (1996)
Zima, H.: Supercompilers for Parallel and Vector Computers. ACM Press, New York (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)