[PATCH] D141627: [Clang][OpenMP] Fix the issue that list items in `has_device_addr` are still mapped to the target device
Abhinav Gaba via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 12 17:58:50 PST 2023
abhinavgaba added a comment.
In D141627#4049085 <https://reviews.llvm.org/D141627#4049085>, @tianshilei1992 wrote:
> FWIW, I think `has_device_addr(b[0])` is not trying to take the value of `b[0]` in this case. Instead, it's just to take the address of the first element of `b`. Only pointer arithmetic will be involved. It's not necessarily illegal to do it in that way.
That is true. It would be wrong if `b` was a pointer, for which `&b[0]` computation would have involved a load.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141627/new/
https://reviews.llvm.org/D141627
More information about the cfe-commits
mailing list