================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits