[llvm] [AMDGPU] Use table strategy for LowerModuleLDSPass at O0 (PR #160181)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 22:11:11 PDT 2025
================
@@ -648,7 +649,19 @@ class AMDGPULowerModuleLDS {
} else if (K.second.size() == 1) {
KernelAccessVariables.insert(GV);
} else if (set_is_subset(K.second, HybridModuleRootKernels)) {
- ModuleScopeVariables.insert(GV);
+ uint64_t LocalMemLimit = 0;
+ for (Function &F : M) {
+ if (!F.isDeclaration()) {
+ const GCNSubtarget &ST = TM.getSubtarget<GCNSubtarget>(F);
+ LocalMemLimit = ST.getAddressableLocalMemorySize();
----------------
arsenm wrote:
The limit should really come from the entry point kernel, not just the first function you happen to find
https://github.com/llvm/llvm-project/pull/160181
More information about the llvm-commits
mailing list