Intel, Arm & Khronos Feel Ready to Land SPIR-V Backend Within LLVM

Written by Michael Larabel in LLVM on 8 December 2021 at 07:05 PM EST. 7 Comments
Engineers from Intel and Arm in cooperation with The Khronos Group feel ready now to begin landing their SPIR-V back-end within the upstream LLVM source tree! This SPIR-V back-end for LLVM would ultimately allow LLVM front-ends for different languages to more easily target this industry-standard shader representation so that it could be ingested by Vulkan / OpenCL drivers.

Being worked on for a while has been this "LLVM-SPIRV-BAckend" as a means of generating SPIR-V binaries from LLVM. This back-end has been in the works for a while and unlike earlier SPIR-V + LLVM translation attempts this is a true back-end for LLVM. Intel for their part has been initially focused on OpenCL compute portion of SPIR-V while acknowledging the possibility of extending it to support 3D shaders for Vulkan.

The main focus has been on using this SPIR-V back-end with LLVM's Clang front-end for C/C++ code to SPIR-V but will be interesting to see what other LLVM front-ends ultimately find interesting use with this SPIR-V back-end.

Earlier this year Intel engineers laid out their original SPIR-V back-end plans while now it's ready to move forward.

Iliya Diyachkov of Intel Russia sent out a mailing list post today outlining their hopes (Intel, Arm, and Khronos) to begin integration of the SPIR-V back-end within LLVM. The SPIR-V triple was upstreamed into LLVM last month while the first patch stubbing out the new back-end is on LLVM's review queue.

SPIR-V has been a terrific addition to the open standards ecosystem... This overview courtesy of Khronos shows how things currentl fit into place. With a proper LLVM SPIR-V back-end, it could replace the current translation done by the external SPIR-V LLVM IR translator, additional software targeting LLVM could in turn also begin targeting SPIR-V, etc.

See the mailing list for their hopes around this. They do note there still is more feature work to be carried out, "As it still has some missing functionality (e.g. exposing some of the SPIR-V execution model, image support, complete atomics support, missing translation of some of llvm intrinsics), it is now proposed to be upstreamed as an experimental backend. Current LIT pass rate is 60% and the plan is to have a full conformance before promoting to the production backend. We do keep the backend operation compatible with LLVM/SPIR-V Translator so the future integration of the backend would be as seamless as possible."

We'll see how much of this back-end is upstreamed and the maturity of it by the time of LLVM 14.0 in the early months of 2022.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week