[PATCH] D144233: [WIP][amdgpu] Implement dynamic LDS accesses from non-kernel functions

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 08:45:10 PST 2023


JonChesterfield added a comment.

Looking at AMDGPUPromoteAlloca.cpp, the spilling to LDS is disabled for any function which accesses any global that represents dynamic LDS.

This approach will leave a use of dynamic LDS in every kernel that calls any function that accesses dynamic LDS. That will disable spilling for that function. Thus it will be possible to accurately predict where dynamic LDS will start for that kernel.

For non-kernel functions, spilling to LDS is presently disabled as it used to be unreachable from functions.

Thus as currently implemented, dynamic LDS and spilling to LDS are disjoint. We can emit the metadata from IR and check it in codegen, very like in D144221 <https://reviews.llvm.org/D144221>.

We are probably leaving some performance on the table - functions that are only reachable from one kernel could spill to LDS for free - but that seems OK for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144233



More information about the llvm-commits mailing list