[llvm] [AMDGPU] Support preloading hidden kernel arguments (PR #98861)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 11:15:16 PDT 2024


================
@@ -31,9 +33,93 @@ class PreloadKernelArgInfo {
   const GCNSubtarget &ST;
   unsigned NumFreeUserSGPRs;
 
-public:
-  SmallVector<llvm::Metadata *, 8> KernelArgMetadata;
+  enum HiddenArg : unsigned {
+    HIDDEN_BLOCK_COUNT_X,
+    HIDDEN_BLOCK_COUNT_Y,
+    HIDDEN_BLOCK_COUNT_Z,
+    HIDDEN_GROUP_SIZE_X,
+    HIDDEN_GROUP_SIZE_Y,
+    HIDDEN_GROUP_SIZE_Z,
+    HIDDEN_REMAINDER_X,
+    HIDDEN_REMAINDER_Y,
+    HIDDEN_REMAINDER_Z,
+    END_HIDDEN_ARGS
+  };
+
+  struct HiddenArgInfo {
+    unsigned Offset;
+    unsigned Size;
----------------
arsenm wrote:

Might as well make these uint8_t 

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


More information about the llvm-commits mailing list