[llvm] [DXIL][Analysis] Collect Function properties in Metadata Analysis (PR #105728)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 23 07:38:06 PDT 2024


================
@@ -19,12 +20,16 @@ namespace llvm {
 
 namespace dxil {
 
+struct FunctionProperties {
+  unsigned NumThreads[3];
----------------
bharadwajy wrote:

> We might need to put things in a union since not every shader profile has NumThreads. Something like the PipelinePSVInfo union in PSV https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/BinaryFormat/DXContainer.h#L238

Wouldn't the `ShaderStage` field of `struct ModuleMetadataInfo` provide the necessary means for the consumer of the analysis info to identify and distinguish between shaders with functions with `numthreads` property/attribute? Creating a union as part of analysis information to represent the same information seems redundant.

https://github.com/llvm/llvm-project/pull/105728


More information about the llvm-commits mailing list