[llvm] [AMDGPU] Skip lowerNonKernelLDSAccesses if function is declaration. (PR #106975)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 23:21:04 PDT 2024


================
@@ -1218,6 +1218,8 @@ bool AMDGPUSwLowerLDS::run() {
     for (auto &K : FuncLDSAccessInfo.NonKernelToLDSAccessMap) {
       Function *Func = K.first;
       DenseSet<GlobalVariable *> &LDSGlobals = K.second;
+      if (Func->isDeclaration() || LDSGlobals.empty())
----------------
arsenm wrote:

How would a declaration end up in this set to begin with? Does this ever fire? 

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


More information about the llvm-commits mailing list