[PATCH] D154507: [NVPTX] Apply global var demotion to private symbols
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 14:26:21 PDT 2023
tra added a comment.
In D154507#4486877 <https://reviews.llvm.org/D154507#4486877>, @guraypp wrote:
> In D154507#4486860 <https://reviews.llvm.org/D154507#4486860>, @tra wrote:
>
>>
>
> What about if we add shared memory address space check? The shared memory isn't addressable from the host. Something like below:
>
> if (!gv->hasInternalLinkage() || (!gv->hasLocalLinkage() && Pty->getAddressSpace() != ADDRESS_SPACE_SHARED))
For shared variables demotion should be fine, though I'm not sure what it would buy us. Shared variables, even if they get demoted would still be allocated statically, so effectively it only affects the symbol visibility without saving any resources, which would be the case for non-shared variables.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154507/new/
https://reviews.llvm.org/D154507
More information about the llvm-commits
mailing list