[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 13:34:48 PDT 2019
ABataev added a comment.
Some of the previous comments are not fixed.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9100
+def note_omp_defaultmap_attr_none : Note<
+ "explicit data sharing attribute, data mapping attribute, or is_devise_ptr clause requested here">;
def err_omp_wrong_dsa : Error<
----------------
is_device_ptr, not is_devise_ptr
================
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 ||
----------------
cchen wrote:
> 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.
Ah, yes, I forgot that we actually allocate variables on the host.
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