[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:15 PDT 2024
    
    
  
================
@@ -1035,6 +1039,14 @@ unsigned GCNSubtarget::getNSAThreshold(const MachineFunction &MF) const {
   return 3;
 }
 
+unsigned AMDGPUSubtarget::getHiddenArgOffset(const Function &F) const {
+  if (!F.hasFnAttribute("amdgpu-hidden-arg-offset"))
+    return F.arg_size();
----------------
arsenm wrote:
Can just use F.getFnAttributeAsParsedInteger, the default value will be used if the attribute doesn't exist 
https://github.com/llvm/llvm-project/pull/98861
    
    
More information about the llvm-commits
mailing list