[llvm] [AMDGPU] Add dynamic LDS size implicit kernel argument to CO-v5 (PR #65273)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 01:35:21 PST 2023


================
@@ -6771,6 +6771,7 @@ SDValue SITargetLowering::LowerGlobalAddress(AMDGPUMachineFunction *MFI,
         // Adjust alignment for that dynamic shared memory array.
         Function &F = DAG.getMachineFunction().getFunction();
         MFI->setDynLDSAlign(F, *cast<GlobalVariable>(GV));
+        MFI->setUsesDynamicLDS(true);
----------------
arsenm wrote:

This won't work if the dynamic LDS reference only appears in a called function and not in the parent kernel. Is that possible with the current module LDS lowering?

You also should set this if a kernel argument is an LDS pointer 

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


More information about the llvm-commits mailing list