[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:26:45 PDT 2026
================
@@ -1073,13 +1107,18 @@ void AMDGPUSwLowerLDS::buildNonKernelLDSBaseTable(
if (Kernels.empty())
return;
const size_t NumberKernels = Kernels.size();
- ArrayType *AllKernelsOffsetsType =
- ArrayType::get(IRB.getPtrTy(AMDGPUAS::LOCAL_ADDRESS), NumberKernels);
+ PointerType *LDSPtrTy = IRB.getPtrTy(AMDGPUAS::LOCAL_ADDRESS);
+ ArrayType *AllKernelsOffsetsType = ArrayType::get(LDSPtrTy, NumberKernels);
std::vector<Constant *> OverallConstantExprElts(NumberKernels);
for (size_t i = 0; i < NumberKernels; i++) {
- Function *Func = Kernels[i];
- auto &LDSParams = FuncLDSAccessInfo.KernelToLDSParametersMap[Func];
- OverallConstantExprElts[i] = LDSParams.SwLDS;
+ // Null for kernels without LDS, they reach LDS instructions only on
+ // invalid paths.
----------------
skc7 wrote:
Updated the comment. Intended, the result is unused on the flat path.
https://github.com/llvm/llvm-project/pull/228043
More information about the llvm-branch-commits
mailing list