aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Compression.cpp
diff options
context:
space:
mode:
authorJon Chesterfield <jonathanchesterfield@gmail.com>2022-07-19 17:46:17 +0100
committerJon Chesterfield <jonathanchesterfield@gmail.com>2022-07-19 17:46:19 +0100
commit3a20597776a5d2920e511d81653b4d2b6ca0c855 (patch)
tree9e141e0d6a1a96fe3983d7e64fd151e732f5020a /llvm/lib/Support/Compression.cpp
parent7709f12ed08d2d80afa8b3a95b8abe99a112dcd4 (diff)
downloadllvm-3a20597776a5d2920e511d81653b4d2b6ca0c855.zip
llvm-3a20597776a5d2920e511d81653b4d2b6ca0c855.tar.gz
llvm-3a20597776a5d2920e511d81653b4d2b6ca0c855.tar.bz2
[amdgpu] Implement lds kernel id intrinsic
Implement an intrinsic for use lowering LDS variables to different addresses from different kernels. This will allow kernels that cannot reach an LDS variable to avoid wasting space for it. There are a number of implicit arguments accessed by intrinsic already so this implementation closely follows the existing handling. It is slightly novel in that this SGPR is written by the kernel prologue. It is necessary in the general case to put variables at different addresses such that they can be compactly allocated and thus necessary for an indirect function call to have some means of determining where a given variable was allocated. Claiming an arbitrary SGPR into which an integer can be written by the kernel, in this implementation based on metadata associated with that kernel, which is then passed on to indirect call sites is sufficient to determine the variable address. The intent is to emit a __const array of LDS addresses and index into it. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D125060
Diffstat (limited to 'llvm/lib/Support/Compression.cpp')
0 files changed, 0 insertions, 0 deletions