[llvm] 4ce8808 - [AMDGPU] Common up default value of -amdgpu-nsa-threshold. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 13:24:53 PDT 2024


Author: Jay Foad
Date: 2024-09-05T21:14:43+01:00
New Revision: 4ce8808dd96dd6f1380c4e27c04ff0a0a0fed12b

URL: https://github.com/llvm/llvm-project/commit/4ce8808dd96dd6f1380c4e27c04ff0a0a0fed12b
DIFF: https://github.com/llvm/llvm-project/commit/4ce8808dd96dd6f1380c4e27c04ff0a0a0fed12b.diff

LOG: [AMDGPU] Common up default value of -amdgpu-nsa-threshold. NFC.

The default value of 3 was specified in two places. Use the actual value
of the cl::init to avoid repeating it.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/GCNSubtarget.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/GCNSubtarget.cpp b/llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
index 352994e541fc88..52c24a5c25ec24 100644
--- a/llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
@@ -708,7 +708,7 @@ unsigned GCNSubtarget::getNSAThreshold(const MachineFunction &MF) const {
   if (Value > 0)
     return std::max(Value, 2);
 
-  return 3;
+  return NSAThreshold;
 }
 
 GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F,


        


More information about the llvm-commits mailing list