[NFC] Refactor dxil metadata code
authorChris Bieneman <chris.bieneman@me.com>
Wed, 21 Sep 2022 23:12:43 +0000 (18:12 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Thu, 22 Sep 2022 17:17:51 +0000 (12:17 -0500)
commit4959bfa0604d57e14157af16d7b42963c3fd80bb
tree5fd62e3813be02216bbab227b019a7903f7b4a81
parent711814a6520d6e5b26ff7abf879005c9fbbdbe5c
[NFC] Refactor dxil metadata code

DXIL relies on a whole bunch of IR metadata constructs being populated
in the right shape. Rather than just hard coding or using complicated
arrangements of constant data strings, let's make first-class objects
that reprensent the metadata and manage reading and writing the
metadata from the module.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D134397
llvm/lib/Target/DirectX/CMakeLists.txt
llvm/lib/Target/DirectX/DXILMetadata.cpp [new file with mode: 0644]
llvm/lib/Target/DirectX/DXILMetadata.h [new file with mode: 0644]
llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp