Volume 37, Issue 1 p. 93-113
Research Article

Compiler optimizations for processors with SIMD instructions

Ivan Pryanishnikov

Corresponding Author

Technische Universität Wien, Institut für Computersprachen, Argentinierstrasse 8, 1040 Wien, Austria

Technische Universität Wien, Institut für Computersprachen, Argentinierstrasse 8, 1040 Wien, AustriaSearch for more papers by this author
Andreas Krall

Technische Universität Wien, Institut für Computersprachen, Argentinierstrasse 8, 1040 Wien, Austria

Search for more papers by this author
Nigel Horspool

University of Victoria, Department of Computer Science, Victoria, BC, Canada V8W 3P6

Search for more papers by this author
First published: 12 September 2006
Citations: 6

Abstract

To achieve maximum efficiency, modern embedded processors for media applications exploit single instruction multiple data (SIMD) instructions. SIMD instructions provide a form of vectorization where a large machine word is viewed as a vector of subwords and the same operation is performed on all subwords in parallel. Systematic usage of SIMD instructions can significantly improve program performance. With C becoming the dominant language for programming embedded devices, there is a clear need for C compilers that use SIMD instructions whenever appropriate. However, SIMD instructions typically require each memory access to be aligned with the instruction's data access size. Therefore an important problem in designing the compiler is to determine whether a C pointer is aligned, i.e. whether it refers to the beginning of a machine word. In this paper, we describe our SIMD generation algorithm and present an analysis method which determines the alignment of pointers at compile time. The alignment information is used to reduce the number of dynamic alignment checks and the overhead incurred by them. Our method uses an interprocedural analysis which propagates pointer alignment information in function bodies and through function calls. The effectiveness of our method is supported by experimental results which show that in typical programs the alignments of about 50% of the pointers can be statically determined. Copyright © 2006 John Wiley & Sons, Ltd.

The full text of this article hosted at iucr.org is unavailable due to technical difficulties.