[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 12:56:56 PDT 2019


cchen marked an inline comment as done.
cchen added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:1969-1972
+          (DSAStack->getDefaultDMIBAtLevel(Level, OMPC_DEFAULTMAP_scalar) ==
+           DMIB_alloc ||
+           DSAStack->getDefaultDMIBAtLevel(Level, OMPC_DEFAULTMAP_scalar) ==
+           DMIB_to ||
----------------
ABataev wrote:
> I think, alloc and to scalars also must be captured by value. Moreover, seems to me, alloc scalars should not be captured at all since their behavior is very similar to the behavior of private variables.
Shouldn't defaultmap(alloc/to:scalar) have the same behavior (copy by ref) as map(alloc/to) for scalar? Also, I don't think defaultmap(alloc:scalar) should be the same as private (not copy at all) since you still need to register the scalar address on the device.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69204/new/

https://reviews.llvm.org/D69204





More information about the cfe-commits mailing list