AMD Radeon R600 GPU LLVM 3.3 Back-End Testing
One of the exciting features of LLVM 3.3 that is due out next month is the final integration of the AMD R600 GPU LLVM back-end. This LLVM back-end is needed for supporting Gallium3D OpenCL on AMD Radeon graphics hardware, "RadeonSI" HD 7000/8000 series support, and can optionally be used as the Radeon Gallium3D driver's shader compiler. In this article are some benchmarks of the AMD R600 GPU LLVM back-end from LLVM 3.3-rc1 when using several different AMD Radeon HD graphics cards and seeing how the LLVM compiler back-end affects the OpenGL graphics performance.
This R600 GPU LLVM back-end has been a big focus of AMD going back to last year. Tom Stellard of AMD has been principally responsible for its development as he's been tackling the open-source OpenCL driver support, but there have also been numerous contributions by other open-source developers. This GPU back-end for LLVM originally lived within the Mesa repository but was finally merged into LLVM for the 3.3 release. Given the approximate six-month release cycle, this back-end still isn't widely depended upon yet but is an optional feature for those wanting to use this shader compiler instead, wanting to experiment with Radeon OpenCL support, or are after RadeonSI support.
Aside from needing to build LLVM 3.3 with the R600 experimental target, Mesa also needs to be built using the --enable-r600-llvm-compiler flag. While a build-time switch, the LLVM compiler back-end can then be manually toggled at run-time via the R600_LLVM environment variable.
When this week trying out the latest Mesa Git in conjunction with LLVM 3.3-rc1, the LLVM back-end is working a heck of a lot better than it has in months prior. There's no longer any rendering problems or other issues as was the case when it was much earlier in development. Overall, it's working great.
For seeing how this R600 LLVM back-end impacts end-users, Linux OpenGL benchmarks were conducted with several different GPUs to see the affect on performance. The tested graphics cards on the "R600g" Gallium3D driver were the Radeon HD 4550, HD 4870, HD 5830, and HD 6770. When it comes to the compiler performance, it's obviously not the full story by just showing the Linux gaming frame-rate when the compiler time, usage, and other factors play into the back-end story, but it provides a glimpse at what end-users and enthusiasts can expect from this R600 LLVM GPU back-end. All benchmarking was handled via the open-source and cross-platform Phoronix Test Suite benchmarking software.