Automatic detection of saturation and clipping idioms

  • Authors:
  • Aart J. C. Bik;Milind Girkar;Paul M. Grey;Xinmin Tian

  • Affiliations:
  • Intel Corporation, Santa Clara, CA;Intel Corporation, Santa Clara, CA;Intel Corporation, Santa Clara, CA;Intel Corporation, Santa Clara, CA

  • Venue:
  • LCPC'02 Proceedings of the 15th international conference on Languages and Compilers for Parallel Computing
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

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.