[llvm] [AMDGPU] Enable kernarg preloading by default on gfx940 (PR #110691)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 12:12:48 PDT 2024


================
@@ -1014,12 +1014,48 @@ struct AAAMDGPUNoAGPR
 
 const char AAAMDGPUNoAGPR::ID = 0;
 
+static unsigned getMaxNumPreloadArgs(const Function &F, const DataLayout &DL,
+                                     const GCNSubtarget &ST) {
+  unsigned Offset = 0;
+  unsigned ArgsToPreload = 0;
+  for (const auto &Arg : F.args()) {
+    if (Arg.hasByRefAttr())
----------------
arsenm wrote:

As a follow up we really should be handling the byref case for the future 

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


More information about the llvm-commits mailing list