LLVM Is Playing A Big Role With Vulkan/SPIR-V Compilers

Written by Michael Larabel in LLVM on 19 April 2018 at 02:45 AM EDT. 2 Comments
LLVM
The usage of LLVM as part of the graphics driver stack continues to be picked up now especially in the Vulkan/SPIR-V world.

With the new NVIDIA 396 driver series there is their new "NVVM" compiler stack for SPIR-V, the IR used by Vulkan and OpenCL and now can be consumed by OpenGL 4.6 too.

NVVM as NVIDIA's new compiler makes use of LLVM IR after being translated from the SPIR-V intermediate language and then consumed by the driver. This NVVM/LLVM approach is being done with both their Windows and Linux drivers rather than their old compiler that was not relying upon LLVM.

RADV from its inception has been using the AMDGPU LLVM back-end for shader compilation, just like the RadeonSI OpenGL driver.

As part of the AMDVLK Vulkan driver open-sourcing, AMD switched this official Vulkan driver code-base from using their own internal compiler stack to now also relying upon LLVM. AMDVLK open-source continues using the open-source LLVM code rather than the company's closed-source compiler while the closed-source AMDGPU-PRO driver components and their Windows Radeon Software driver have continued relying upon the older, closed-source code.

As another win for LLVM, it's now been brought to our attention that AMD's Vulkan team reportedly plans to move to LLVM for all supported platforms once this AMDGPU LLVM code is on par with their internal shader compiler. AMD's LLVM compiler work reportedly provides a lot of flexibility over their internal compiler and looks to be maturing enough where AMD is likely to make use of it across all supported platforms.

This should be useful especially to Linux users moving forward with more AMD developers turning their eyes to this LLVM back-end and making further optimizations/tuning/fixes.

Intel's Open-Source Technology Center graphics team has been a bit of a holdout in not making use of the LLVM compiler infrastructure (aside from with their OpenSWR software rasterizer), though they have toyed with the idea of an LLVM shader compiler over the years. Though Intel's new Intel NEO OpenCL driver stack does make use of some new LLVM code.

Anyhow, certainly exciting times on the open-source graphics front.
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