The Best Features Of LLVM / Clang 3.3
Some of our favorite features coming to LLVM 3.3 include:
- Exciting many Phoronix readers will be the final integration of the AMD R600 GPU LLVM back-end. This LLVM back-end that's needed for Radeon Gallium3D Compute/OpenCL along with RadeonSI acceleration is finally found in a mainline LLVM release! In recent months this AMD GPU back-end has received a lot of improvements from scheduler support and other new functionality.
- 64-bit ARM support. The 64-bit ARM / ARM64 / AArch64 support came after it was already brought to GCC, but now this next-generation ARM architecture has an LLVM back-end. ARM continues to grow in presence and 64-bit ARMv8 hardware should better compete against Intel/AMD x86 CPUs. With the new AArch64 target, there's C99 and C++03 support through Clang, Linux is currently the only platform target, and there's other basic functionality implemented at this time. Expect more AArch64 goodness to come in the next LLVM release.
- There's a new vectorizer! LLVM 3.3 brings forth the Superword-Level Parallelism (SLP) Vectorizer. There's already been some Phoronix benchmarks of the SLP vectorizer to mixed success. This new vectorizer is currently disabled by default. The SLP Vectorizer will be refined in future releases.
- LLVM's Loop Vectorizer has seen many improvements and is now enabled by default with the -O3 compiler switch. The 3.3 Loop Vectorizer improvements include being able to vectorize loops with unknown trip counts, runtime checks of pointers, if conversions, reverse iterators, vectorization of mixed types, vectorization of function calls, and much more. With this code vectorizer now being enabled by default, it's one of the reasons why for some workloads LLVM 3.3 is now much faster than LLVM 3.2.
- The Clang C/C++ compiler front-end is now C++11 feature-complete. GCC is also now effectively C++11 complete too, which is good news for developers wishing to take advantage of the latest C++ ISO standard. There's also already much work done on C++1y, the next revision to the standard.
- New CPU micro-architecture enhancements like better AVX2 support.
For benchmarks of LLVM/Clang 3.3, see this weekend's GCC 4.8.0 vs. LLVM Clang 3.3 Compiler Performance Three-Way from a Core i7 Sandy Bridge Extreme Edition, AMD FX-8350 Vishera, and Core i3 Ivy Bridge Ultrabook.