[all-commits] [llvm/llvm-project] 0c7f7f: [DirectX backend] Add pass to emit dxil metadata.
Xiang Li via All-commits
all-commits at lists.llvm.org
Wed May 11 08:40:24 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c7f7f1b01e1bdf3b4b4008d74a1d36e68fda478
https://github.com/llvm/llvm-project/commit/0c7f7f1b01e1bdf3b4b4008d74a1d36e68fda478
Author: python3kgae <python3kgae at outlook.com>
Date: 2022-05-11 (Wed, 11 May 2022)
Changed paths:
M llvm/lib/Target/DirectX/CMakeLists.txt
A llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp
M llvm/lib/Target/DirectX/DirectX.h
M llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
A llvm/test/CodeGen/DirectX/dxil_ver.ll
Log Message:
-----------
[DirectX backend] Add pass to emit dxil metadata.
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}
Reviewed By: kuhar, beanz
Differential Revision: https://reviews.llvm.org/D125158
More information about the All-commits
mailing list