python3kgae added inline comments.
================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:73
CodeGenModule &CGM;
uint32_t ResourceCounters[static_cast<uint32_t>(
hlsl::ResourceClass::NumClasses)] = {0};
----------------
beanz wrote:
> The `ResourceCounters` here was a stand-in for allocating resource indices.
>
> If you have a different path for allocating these, we shouldn't need the
> counter anymore. I'm a little concerned that it looks like you're not
> allocating these in code generation. Can you explain how you intend to
> allocate indices? Is there a reason not to do this in code gen?
The reason not to do it in codeGen is that we have to remove unused global
resources even in Od and update the ID in the backend.
The plan is to allocate the ID after unused global resources are deleted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130951/new/
https://reviews.llvm.org/D130951
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits