aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/VirtualFileSystemTest.cpp
diff options
context:
space:
mode:
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2023-02-07 20:37:55 +0000
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>2023-05-03 15:25:58 +0000
commitf9c1ede2543b37fabe9f2d8f8fed5073c475d850 (patch)
treeb58dc833791cf767c26f44126e307e94baed447c /llvm/unittests/Support/VirtualFileSystemTest.cpp
parent2e823da8dc652b23738e2d3b8e7e7f21335816eb (diff)
downloadllvm-f9c1ede2543b37fabe9f2d8f8fed5073c475d850.zip
llvm-f9c1ede2543b37fabe9f2d8f8fed5073c475d850.tar.gz
llvm-f9c1ede2543b37fabe9f2d8f8fed5073c475d850.tar.bz2
[AMDGPU] Define data layout entries for buffers
Per discussion at https://discourse.llvm.org/t/representing-buffer-descriptors-in-the-amdgpu-target-call-for-suggestions/68798, we define two new address spaces for AMDGCN targets. The first is address space 7, a non-integral address space (which was already in the data layout) that has 160-bit pointers (which are 256-bit aligned) and uses a 32-bit offset. These pointers combine a 128-bit buffer descriptor and a 32-bit offset, and will be usable with normal LLVM operations (load, store, GEP). However, they will be rewritten out of existence before code generation. The second of these is address space 8, the address space for "buffer resources". These will be used to represent the resource arguments to buffer instructions, and new buffer intrinsics will be defined that take them instead of <4 x i32> as resource arguments. ptr addrspace(8). These pointers are 128-bits long (with the same alignment). They must not be used as the arguments to getelementptr or otherwise used in address computations, since they can have arbitrarily complex inherent addressing semantics that can't be represented in LLVM. Even though, like their address space 7 cousins, these pointers have deterministic ptrtoint/inttoptr semantics, they are defined to be non-integral in order to prevent optimizations that rely on pointers being a [0, [addr_max]] value from applying to them. Future work includes: - Defining new buffer intrinsics that take ptr addrspace(8) resources. - A late rewrite to turn address space 7 operations into buffer intrinsics and offset computations. This commit also updates the "fallback address space" for buffer intrinsics to the buffer resource, and updates the alias analysis table. Depends on D143437 Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D145441
Diffstat (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp')
0 files changed, 0 insertions, 0 deletions