[PATCH] D117494: AMDGPU: Account for usage HIP-style dynamic LDS
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 17 10:27:15 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:787
+ for (const GlobalVariable *GV : UsedLDS) {
+ if (GV->hasExternalLinkage()) {
+ LocalMemLimit = 0;
----------------
arsenm wrote:
> arsenm wrote:
> > arsenm wrote:
> > > The dynamic behavior is keyed on this being a 0 size allocation, not external linkage. Some of the graphics usage has external LDS with fixed, static sizes
> > You also don't need a separate loop, can move down to the existing loop over UsedLDS
> Although I'm wondering if externally defined globals are allowed to be larger than the declared size
I guess logically if you're allowed to declare this as a larger size somewhere else if the size is 0, you're also allowed to do it for any other size. That said, I still think this check should be moved down to the existing loop over UsedLDS
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117494/new/
https://reviews.llvm.org/D117494
More information about the llvm-commits
mailing list