[llvm] [DirectX backend] emits metadata for DXIL version. (PR #88350)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 13:25:36 PDT 2024


================
@@ -81,6 +81,18 @@ void dxil::createShaderModelMD(Module &M) {
   Entry->addOperand(MDNode::get(Ctx, Vals));
 }
 
+void dxil::createDXILVersionMD(Module &M) {
+  Triple TT(M.getTargetTriple());
+  VersionTuple Ver = TT.getOSVersion();
----------------
thegreatbeanz wrote:

I think we should reconsider how we're representing the DXIL version. In DXC we've always made the DXIL version and Shader Model version lockstep and we've made a lot of assumptions about that.

I suggested in a separate chat channel that we should consider adding DXIL versions as sub-architectures.

I'm curious for feedback from @bharadwajy and @bogner.

https://github.com/llvm/llvm-project/pull/88350


More information about the llvm-commits mailing list