[PATCH] D141627: [Clang][OpenMP] Fix the issue that list items in `has_device_addr` are still mapped to the target device

Shilei Tian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 22 10:39:50 PDT 2023


tianshilei1992 added a comment.

After reading some threads (https://github.com/OpenMP/spec/issues/2178#issue-622053885 and https://github.com/OpenMP/spec/issues/1870), I think `has_device_addr` is not supposed to have any semantics about creating a mapping, especially in `https://github.com/OpenMP/spec/issues/2178#issue-622053885` it is used as a equivalent of `firstprivate`.
https://github.com/OpenMP/spec/issues/2178#issuecomment-631751755 mentions `is_device_ptr` has to convert the device pointer to device address, while `has_device_addr`, and since in LLVM OpenMP implementation device pointer is treated as device address, passing them as literal makes sense, so the fix is valid.


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