LLVM’s DirectX backend is no longer experimental. A patch from Microsoft HLSL compiler engineer Farzon Lotfi, merged on Aug. 31, promotes it to an official LLVM target and enables the clang-dxc frontend and HLSL support by default, Phoronix reported.
The backend lowers LLVM IR into DXIL, the DirectX Intermediate Language that Windows DirectX 12 graphics drivers consume. Microsoft has backed the work for about four years. Until now it sat in LLVM_ALL_EXPERIMENTAL_TARGETS and only got built if a developer added it by hand. Under the merged change, it moves into LLVM_ALL_TARGETS and is built by default, starting with the LLVM 24 release.
“This change moves the DirectX backend out of experimental and adds the clang-dxc frontend so the community has a path to trying out the new backend,” Lotfi wrote in the patch.
What the promotion required
The switch followed an RFC Lotfi posted on LLVM Discourse in early August. It argued the backend meets LLVM’s bar for official targets: active maintainers from Microsoft and the wider graphics community, in-tree documentation, development and stabilization in-tree since 2022, and test coverage that includes GitHub Actions checks on HLSL and DirectX pull requests plus the LLVM Offload Test Suite.
The RFC also laid out what comes next. “Looking ahead, our focus will shift towards supporting graphics and ray tracing shader, the newest Shader Models, and further tightening the integration between Clang’s HLSL frontend capabilities and the backend Codgen,” it said, adding that the team expects the default build to bring “a wider influx of user feedback.”
The LLVM documentation for the target says it is aimed at DirectX 12 for now, with DirectX 11 support planned later. The HLSL working group marked the change in its Sept. 3 meeting notes: “The DirectX backend is no longer experimental!”
Where it fits
Microsoft’s shipping shader compiler, DXC, is built on its own fork of an older LLVM, and DXIL itself is based on LLVM 3.7-era bitcode. An upstream backend gives Microsoft and other toolmakers a DXIL path in mainline LLVM and Clang instead. Microsoft has also said DirectX will adopt SPIR-V as its interchange format starting with Shader Model 7, so the DXIL backend covers the shader models in use today while that transition plays out.


WebProNews is an iEntry Publication