[PATCH] D134682: [DirectX] Generate `dx.resources` metadata entry

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 13:53:44 PDT 2022


beanz added inline comments.


================
Comment at: llvm/lib/Target/DirectX/DXILResource.h:142-144
+  llvm::SmallVector<UAVResource> UAVs;
+
+  void collectUAVs();
----------------
python3kgae wrote:
> Maybe another class like
> 
> class HLSL_UAVs {
> public:
>   llvm::SmallVector<UAVResource> UAVs;
>   HLSL_UAVs() {... call collectUAVs }
>   ~HLSL_UAVs() { remove the "hlsl.uavs" metadata}
> private:
>   void collectUAVs();
> };
Given that the current class only handles UAVs, I'm not sure the benefit of an extra class. That might make sense as a refactoring as we support more resource types, but for now it seems like an unnecessary abstraction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134682/new/

https://reviews.llvm.org/D134682



More information about the llvm-commits mailing list