[DX] Add pass to pretty-print DXIL metadata in asm
authorChris Bieneman <chris.bieneman@me.com>
Thu, 13 Oct 2022 18:35:55 +0000 (13:35 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Fri, 14 Oct 2022 18:32:59 +0000 (13:32 -0500)
commite530a1188eafb7986a87224b4e13975acd57a4ba
treeaf697918a6e8d6e0b3b61ee2146c8f40785cc0c1
parent6897dbc46329cc8cc3f58b9e4809dd400218b8ae
[DX] Add pass to pretty-print DXIL metadata in asm

When DXC prints IR output it adds a bunch of IR comments in a header
that describe the DXIL metadata in a more human-readable format. This
pass will serve that purpose for LLVM by printing out ahead of the IR
printer.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D135802
llvm/lib/Target/DirectX/CMakeLists.txt
llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp [new file with mode: 0644]
llvm/lib/Target/DirectX/DirectX.h
llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
llvm/test/CodeGen/DirectX/UAVMetadata.ll