[PATCH] D69204: [OpenMP 5.0] - Extend defaultmap
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 11 13:34:40 PST 2019
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:16393-16416
+static DefaultMapImplicitBehavior
+getImplicitBehaviorFromModifier(OpenMPDefaultmapClauseModifier M) {
+ switch (M) {
+ case OMPC_DEFAULTMAP_MODIFIER_alloc:
+ return DMIB_alloc;
+ case OMPC_DEFAULTMAP_MODIFIER_to:
+ return DMIB_to;
----------------
ABataev wrote:
> Do we need types `DefaultMapImplicitBehavior` and `DefaultMapVariableCategory` if the map 1 to 1 to `OpenMPDefaultmapClauseModifier` and `OpenMPDefaultmapClauseKind`?
What about this?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:1901-1904
+ (Ty->isScalarType() && !Ty->isPointerType() &&
+ DSAStack->isDefaultmapCapturedByRef(Level, DMVC_scalar)) ||
+ (Ty->isPointerType() &&
+ DSAStack->isDefaultmapCapturedByRef(Level, DMVC_pointer)) ||
----------------
Just `DSAStack->isDefaultmapCapturedByRef(Level, getVariableCategoryFromDecl(D))`
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2121-2125
+ if ((D->getType()->isScalarType() && !D->getType()->isPointerType() &&
+ DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_scalar)) ||
+ (D->getType()->isPointerType() &&
+ DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_pointer)) ||
+ DSAStack->mustBeFirstprivateAtLevel(NewLevel, DMVC_aggregate))
----------------
Just `DSAStack->mustBeFirstprivateAtLevel(NewLevel, getVariableCategoryFromDecl(D))`
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