This revision was automatically updated to reflect the committed changes.
Closed by commit rG56c3b2b091bf: [OPENMP]Fix capturing of global variables in
OpenMP regions. (authored by ABataev).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77731/new/
h
ABataev marked an inline comment as done.
ABataev added inline comments.
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2117
+if (VD && !VD->hasLocalStorage() && DVarPrivate.CKind == OMPC_unknown &&
+(DSAStack->getDefaultDSA() != DSA_none || DVarTop.CKind ==
OMPC_shared))
jdoerfert accepted this revision.
jdoerfert added a subscriber: atmnpatel.
jdoerfert added a comment.
This revision is now accepted and ready to land.
LGTM.
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2117
+if (VD && !VD->hasLocalStorage() && DVarPrivate.CKind == OMPC_unknown
ABataev marked an inline comment as done.
ABataev added inline comments.
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2117
+if (VD && !VD->hasLocalStorage() && DVarPrivate.CKind == OMPC_unknown &&
+(DSAStack->getDefaultDSA() != DSA_none || DVarTop.CKind ==
OMPC_shared))
jdoerfert added a subscriber: fghanim.
jdoerfert added inline comments.
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2117
+if (VD && !VD->hasLocalStorage() && DVarPrivate.CKind == OMPC_unknown &&
+(DSAStack->getDefaultDSA() != DSA_none || DVarTop.CKind ==
OMPC_shared))
ABataev created this revision.
ABataev added a reviewer: jdoerfert.
Herald added subscribers: guansong, yaxunl.
Herald added a project: clang.
The global variable should be captured in the region only if it was
privitized in the region or in any of the outer regions. Otherwise, it
should not be ca