Vectorization for SIMD architectures with alignment constraints
Alexandre E. Eichenberger, Peng Wu, Kevin K. O'Brien · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · 2004
When vectorizing for SIMD architectures that are commonly employed by today's multimedia extensions, one of the new challenges that arise is the handling of memory alignment. Prior research has focused primarily on vectorizing loops where all memory references are properly aligned. An important aspect of this problem, namely, how to vectorize misaligned memory references, still remains unaddressed.This paper presents a compilation scheme that systematically vectorizes loops in the presence of misaligned memory references. The core of our technique is to automatically reorganize data in registers to satisfy the alignment requirement imposed by the hardware. To reduce the data reorganization overhead, we propose several techniques to minimize the number of data reorganization operations generated. During the code generation, our algorithm also exploits temporal reuse when aligning references that access contiguous memory across loop iterations. Our code generation scheme guarantees to never load the same data associated with a single static access twice. Experimental results indicate near peak speedup factors, e.g., 3.71 for 4 data per vector and 6.06 for 8 data per vector, respectively, for a set of loops where 75% or more of the static memory references are misaligned.
Cited by 200 works. doi:10.1145/996841.996853
Authors
References
- Automatic translation of FORTRAN programs to vector form
- Supercompilers for parallel and vector computers
- Exploiting superword level parallelism with multimedia instruction sets
- Automatic Intra-Register Vectorization for the Intel® Architecture
- Simple vector microprocessors for multimedia applications
- A Vectorizing Compiler for Multimedia Extensions
- Compilation Techniques for Multimedia Processors
- Vectorizing for a SIMdD DSP architecture
- Increasing and detecting memory address congruence
- Compiler-Controlled Caching in Superword Register Files for Multimedia Extension Architectures