[PATCH] D102334: [AMDGPU] Sort LDS globals based on thier size and alignment.
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 12 10:28:52 PDT 2021
rampitec added a comment.
As far as I understand all kernels in the module will use all the LDS globals irrespective if they actually need it? We may run out of LDS.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp:51
+ // available.
+ auto Iter = std::find(AMDGPUTargetMachine::SortedLDSGlobals.begin(),
+ AMDGPUTargetMachine::SortedLDSGlobals.end(), &GV);
----------------
llvm::find() and you do not need to include algorithm then.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h:41
+ // soon as possible.
+ static std::vector<GlobalVariable *> SortedLDSGlobals;
----------------
I do not think you can keep per-module stuff in the TM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102334/new/
https://reviews.llvm.org/D102334
More information about the llvm-commits
mailing list