aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2025-02-18 12:15:28 -0800
committerGitHub <noreply@github.com>2025-02-18 14:15:28 -0600
commitf7d03707d1f59cddab98d49fe55d8946477f87c8 (patch)
tree43b5e6a65605b866d96a24ecf4270e587db204cf /lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
parent3a00c428d903c5857eae83cb5e9dab73614c5ddb (diff)
downloadllvm-f7d03707d1f59cddab98d49fe55d8946477f87c8.zip
llvm-f7d03707d1f59cddab98d49fe55d8946477f87c8.tar.gz
llvm-f7d03707d1f59cddab98d49fe55d8946477f87c8.tar.bz2
[AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (#126828)
Attempting to pass a `ptr addrspace(7)` to functions that take `ptr` arguments produces undesirable `addrspacecast(addrspacecast(p8 x to p7) to p0) => addrspacecast(p8 x to p0)` folds. This results in illegal GEP operations on buffer resources, which can't be GEP'd. (However, note that, while unimplemneted, addressspacecast from ptr addrspace(7) to ptr is legal - it's just an effective address computation) To resolve this problem, and thus prevent illegal `getelementptr T, ptr addrspace(8) %x, ...` s from being produces, this commit extends amdgcn.make.buffer.rsrc to also be variadic in its result type, auto-upgrading old manglings. The logic for handling a make.buffer.rsrc in instruction selection remains untouched and expects the output type to be a ptr addrspace(8), as does the Clang lowering for its builtin (the pointer-to-pointer version might want a different name in clang). LowerBufferFatPointers has been updated to lower amdgcn.make.buffer.rsrc.p7.p* to amdgcn.make.buffer.rsrc.p8.p* . This'll also make exposing buffer fat pointers in Clang easier, since you don't have to cast between a `__amdgcn_rsrc_t` and a pointer.
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp')
0 files changed, 0 insertions, 0 deletions