aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2025-03-10 08:11:01 -0500
committerGitHub <noreply@github.com>2025-03-10 08:11:01 -0500
commitd67947162f4b06172fac91fefa6a9ad25eb6dd56 (patch)
tree7f71b32f9287ff24005d5095f36a4384932a47ed /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent773e88f9d61399c566fed45bf7858922f09b8063 (diff)
downloadllvm-d67947162f4b06172fac91fefa6a9ad25eb6dd56.zip
llvm-d67947162f4b06172fac91fefa6a9ad25eb6dd56.tar.gz
llvm-d67947162f4b06172fac91fefa6a9ad25eb6dd56.tar.bz2
[flang][OpenMP] Implement HAS_DEVICE_ADDR clause (#128568)
The HAS_DEVICE_ADDR indicates that the object(s) listed exists at an address that is a valid device address. Specifically, `has_device_addr(x)` means that (in C/C++ terms) `&x` is a device address. When entering a target region, `x` does not need to be allocated on the device, or have its contents copied over (in the absence of additional mapping clauses). Passing its address verbatim to the region for use is sufficient, and is the intended goal of the clause. Some Fortran objects use descriptors in their in-memory representation. If `x` had a descriptor, both the descriptor and the contents of `x` would be located in the device memory. However, the descriptors are managed by the compiler, and can be regenerated at various points as needed. The address of the effective descriptor may change, hence it's not safe to pass the address of the descriptor to the target region. Instead, the descriptor itself is always copied, but for objects like `x`, no further mapping takes place (as this keeps the storage pointer in the descriptor unchanged). --------- Co-authored-by: Sergio Afonso <safonsof@amd.com>
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
0 files changed, 0 insertions, 0 deletions