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

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 07:10:05 PDT 2021


vangthao 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);
----------------
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?


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