[llvm-branch-commits] [llvm] [AMDGPU][SwLowerLDS] Lower non-kernels with LDS instructions and assign kernel IDs to their callers (PR #228043)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 13 00:15:17 PDT 2026


================
@@ -1308,12 +1344,15 @@ bool AMDGPUSwLowerLDS::run() {
   // Get the Uses of LDS from non-kernels.
   getUsesOfLDSByNonKernels();
 
-  // Get non-kernels with LDS ptr as argument and called by kernels.
-  getNonKernelsWithLDSArguments(CG);
+  // Get non-kernels with LDS instructions and the kernels reaching them.
+  getNonKernelsWithLDSInstructions(CG);
+
+  for (Function *Func : FuncLDSAccessInfo.KernelsWithIndirectLDSAccess)
+    removeFnAttrFromReachable(CG, Func, {"amdgpu-no-lds-kernel-id"});
----------------
skc7 wrote:

Thanks for suggestion. Added a TODO here and noted it as a known gap. Will try to fix it in follow-up PR.

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


More information about the llvm-branch-commits mailing list