[PATCH] D154507: [NVPTX] Apply global var demotion to private symbols

guray ozen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 14:18:37 PDT 2023


guraypp added a comment.

In D154507#4486860 <https://reviews.llvm.org/D154507#4486860>, @tra wrote:

> This may be potentially problematic for CUDA as we may need to refer to the global variable from the host side.

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))


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