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

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 07:12:26 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())
----------------
skc7 wrote:

Fixed this in latest commit. Skipped adding function to map if its a declaration.

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


More information about the llvm-commits mailing list