freenode
Languages & Toolchains

LLVM eyes official status for DirectX backend

An RFC seeks to graduate the DXIL code generator from experimental, with maintainers saying debug-info evolution would stay unhindered.

LLVM contributors have proposed promoting the DirectX backend from experimental to a fully supported official target, a step meant to make HLSL shader compilation a first-class part of upstream Clang rather than a side path.

The backend emits DirectX Intermediate Language (DXIL), the bitcode-based format Windows graphics drivers consume. Proponents argue it has matured enough in codegen, validation, and testing to underpin an out-of-the-box HLSL mode (clang-dxc enabled by default), lowering the barrier for shader developers who want standard LLVM tooling instead of a separate stack. They point to custom legalization passes that rewrite non-compliant IR into driver-valid DXIL, plus a conformance suite aimed at keeping Clang and DXC outputs equivalent.

Supporters on the LLVM Discourse forum said the backend has been actively maintained for years and is not unusually burdensome relative to other targets. Most of its passes already work with the new pass manager, which one commenter took as evidence the work tracks long-term project direction.

A separate concern was whether official support would freeze LLVM debug-info design around DXIL’s old (LLVM 3.7-era) bitcode. Jeremy Morse asked whether future debug-info changes would have to stay expressible in that format. Justin Bogner replied that the two issues are distinct: consumers that still parse DXIL with modern LLVM may eventually need a dedicated reader, but that is orthogonal to the backend; the backend itself only downgrades modern debug info to older intrinsics and drops what cannot be represented, with that translation confined to DirectX code so it need not block broader debug-info work. Morse accepted that framing.

Bogner noted early responses looked favorable and asked the LLVM area team for any remaining objections before the promotion moves ahead.