[PATCH] D125158: [DirectX backend] Add pass to emit dxil metadata.
Xiang Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 7 00:32:46 PDT 2022
python3kgae created this revision.
python3kgae added reviewers: MaskRay, tstellar, pete, jdoerfert, sheredom, kuhar, antiagainst, nhaehnle, rnk, nikic, beanz, pow2clk.
Herald added subscribers: StephenFan, hiraditya, mgorny.
Herald added a project: All.
python3kgae requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
A new pass DxilEmitMetadata is added to translate information saved in llvm ir into metadata to match DXIL spec.
Only generate DXIL validator version in this PR.
In llvm ir, validator version is saved in ModuleFlag with "dx.valver" as Key.
!llvm.module.flags = !{!0, !1}
!1 = !{i32 6, !"dx.valver", !2}
!2 = !{i32 1, i32 1}
DXIL validator version has major and minor versions that are specified as named metadata:
!dx.valver = !{!2}
!2 = !{i32 1, i32 7}
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125158
Files:
llvm/lib/Target/DirectX/CMakeLists.txt
llvm/lib/Target/DirectX/DirectX.h
llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
llvm/lib/Target/DirectX/DxilEmitMetadata.cpp
llvm/test/CodeGen/DirectX/dxil_ver.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125158.427823.patch
Type: text/x-patch
Size: 6160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220507/042db73f/attachment.bin>
More information about the llvm-commits
mailing list