Show Your Support: Did you know that the hundreds of articles written on Phoronix each month are mostly authored by one individual? Phoronix.com doesn't have a whole news room with unlimited resources and relies upon people reading our content without blocking ads and alternatively by people subscribing to Phoronix Premium for our ad-free service with other extra features.
Intel, Arm & Khronos Feel Ready to Land SPIR-V Backend Within LLVM
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.