[DirectX backend] Add analysis to collect DXILResources
authorXiang Li <python3kgae@outlook.com>
Tue, 4 Oct 2022 20:02:49 +0000 (13:02 -0700)
committerXiang Li <python3kgae@outlook.com>
Fri, 7 Oct 2022 02:34:29 +0000 (19:34 -0700)
commit220185552f4484155b2893a1568f5d71c23a33cf
tree46ba1617e60f0526be262e68ab82e1f492b2a444
parentac76fa480fce3302743c75798240298ea4dac374
[DirectX backend] Add analysis to collect DXILResources

Now only DXILTranslateMetadata uses DXILResources, so DXILResourceWrapper is only used by DXILTranslateMetadata.
Once we add lower for createHandle, DXILResourceWrapper will be used in more passes.
Also we can add resource index allocation in DXILResourceWrapper.

Reviewed By: beanz

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