Pointer Alignment Analysis for Processors with SIMD Instructions

Embedded processors for media applications usually have 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 signifi...

Full description

Bibliographic Details
Main Authors: Ivan Pryanishnikov, Andreas Krall, Technische Universität Wien, Nigel Horspool
Other Authors: The Pennsylvania State University CiteSeerX Archives
Format: Text
Language:English
Published: 2003
Subjects:
Online Access:http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.70.1731
http://csr.uvic.ca/~nigelh/Publications/align_MSP5.pdf
Description
Summary:Embedded processors for media applications usually have 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. Usually each memory access must be aligned with the instruction’s data access size. With C becoming the dominant language for programming embedded devices, there is a clear need for C compilers which optimize the use of SIMD instructions. An important problem in designing such compilers is the question of determining whether a C pointer is aligned, i.e., whether it refers to the beginning of a machine word. In this paper, we describe a 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 analyzes pointer values propagated through function calls. The effectiveness of our method is substantiated by experimental results which show that the alignments of about 50 % of the pointers can typically be statically determined.