[PATCH] D109773: [AMDGPU] Inline non-kernel functions using extern lds

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 10:34:35 PDT 2021


arsenm accepted this revision.
arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp:125
         (AS == AMDGPUAS::LOCAL_ADDRESS &&
-         !AMDGPUTargetMachine::EnableLowerModuleLDS))
+         (!AMDGPUTargetMachine::EnableLowerModuleLDS || !GV.hasInitializer())))
       recursivelyVisitUsers(GV, FuncsToAlwaysInline);
----------------
vangthao wrote:
> arsenm wrote:
> > What does the hasInitializer check have to do with this? Initializers are illegal for LDS anyway
> From https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/Utils/AMDGPULDSUtils.cpp#L319, this implies that the variable is extern shared. Is there a better method for checking extern lds?
This is just a weird helper function, I would have expected !isDeclaration to work just as well


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109773/new/

https://reviews.llvm.org/D109773



More information about the llvm-commits mailing list