aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorJon Chesterfield <jonathanchesterfield@gmail.com>2023-04-04 20:06:33 +0100
committerJon Chesterfield <jonathanchesterfield@gmail.com>2023-04-04 20:06:34 +0100
commit0507448d829818e29f7d8df6652002c8cc5683d1 (patch)
tree86d4c06e26221c7f06a5357c7ac82f0139a558e5 /llvm/lib/Support/APFloat.cpp
parent9b79d0b610ccf5557266232d8c7a132ef9ee9365 (diff)
downloadllvm-0507448d829818e29f7d8df6652002c8cc5683d1.zip
llvm-0507448d829818e29f7d8df6652002c8cc5683d1.tar.gz
llvm-0507448d829818e29f7d8df6652002c8cc5683d1.tar.bz2
[amdgpu] Implement dynamic LDS accesses from non-kernel functions
The premise here is to allow non-kernel functions to locate external LDS variables without using LDS or extra magic SGPRs to do so. 1/ First it crawls the callgraph to work out which external LDS variables are reachable from a given kernel 2/ Then it creates a new `extern char[0]` variable for each kernel, which will alias all the other extern LDS variables because that's the documented behaviour of these variables 3/ The address of that variable is written to a lookup table. The global variable is tagged with metadata to track what address it was allocated at by codegen 4/ The assembler builds the lookup table using the metadata 5/ Any non-kernel functions use the same magic intrinsic used by table lookups of non-dynamic LDS variables to find the address to use Heavy overlap with the code paths taken for other lowering, in particular the same intrinsic is used to pass the dynamic scope information through the same sgpr as for table lookups of static LDS. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D144233
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
0 files changed, 0 insertions, 0 deletions