[DirectX] Embed DXIL in LLVM Module
authorChris Bieneman <chris.bieneman@me.com>
Tue, 10 May 2022 19:58:01 +0000 (14:58 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Mon, 6 Jun 2022 20:04:26 +0000 (15:04 -0500)
commitd401a9930628f38f773e40c1d6ad33942b10e8cf
tree13f45db56a3bc73ed99cc173a657c8fa6d9e2fd7
parent41778e3dc5f4c697b5074ef5a15031210cb9aaac
[DirectX] Embed DXIL in LLVM Module

At the end of the codegen pipeline for DXIL we will emit the DXIL into
a global variable in the Module annotated for the "DXIL" section.

This will be used by the MCDXContainerStreamer to emit the DXIL into a
DXContainer DXIL part.

Other parts of the DXContainer will be constructed similarly by
serializing their values into GlobalVariables.

This will allow DXIL to flow into DXContainers through the normal
MCStreamer flow used in the MC layer.

Depends on D122270

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D125334
llvm/lib/Target/DirectX/DXILWriter/CMakeLists.txt
llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.cpp
llvm/lib/Target/DirectX/DXILWriter/DXILWriterPass.h
llvm/lib/Target/DirectX/DirectX.h
llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
llvm/test/CodeGen/DirectX/embed-dxil.ll [new file with mode: 0644]