LLVM 3.3 Improves Its Loop Vectorizer

Written by Michael Larabel in LLVM on 15 February 2013 at 01:07 AM EST. 2 Comments
LLVM
The release of LLVM 3.3 is still months away, but one of its features already are notable improvements to its loop vectorizer.

Introduced in LLVM 3.2 was a loop vectorizer. From the earlier Phoronix article on the subject, "The LLVM Loop Vectorizer is the second vectorizer for the compiler infrastructure after its Basic Block Vectorizer for dealing with straight-line code. The Loop Vectorizer is meant to widen instructions in an original loop for operating on multiple consecutive loop iterations. As mentioned in the earlier Phoronix articles on the subject, this feature isn't enabled by default with the forthcoming LLVM 3.2 but can be flipped on via the -mllvm -vectorize-loops compiler switches." The functionality has also been described by LLVM developers.

I did run benchmarks of the LLVM Loop Vectorizer back in December and it could enhance the performance for some workloads. There's previously been talk of enabling the vectorizer by default in LLVM 3.3, but that hasn't happened yet.

What has happened in the code-base of LLVM 3.3 are a number of improvements to this loop vectorizer. With the latest development code, the LLVM 3.3 Loop Vectorizer now supports loops with an unknown trip count, run-time checks of pointers, reductions/inductions, if conversions, pointer induction variables, reverse iterators, vectorization of mixed types, vectorization of function calls, and partial unrolling during vectorization.

These LLVM 3.3 improvements should allow the loop vectorizer to be used more widely and applicable to more code-bases. Benchmarks of the LLVM Loop Vectorizer improvements are forthcoming as we begin to look at the LLVM/Clang 3.3 performance changes at Phoronix.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week