[PATCH] D82496: [amdgpu] Add codegen support for HIP dynamic shared memory.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 14:01:13 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h:34
+ /// Align for dynamic shared memory if any.
+ MaybeAlign DynLDSAlign;
----------------
arsenm wrote:
> This doesn't need to be MaybeAlign, just Align. Also expand to Dynamic?
>
> Also should probably elaborate that this is used for the case where a dynamically sized global is used
This also needs to be added to the MachineFunctionInfo serialization
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h:61
unsigned getLDSSize() const {
+ if (DynLDSAlign)
+ LDSSize = alignTo(LDSSize, *DynLDSAlign);
----------------
I think having this here actually breaks the calculation of the total size for all of the statically known globals
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82496/new/
https://reviews.llvm.org/D82496
More information about the llvm-commits
mailing list