[PATCH] D77731: [OPENMP]Fix capturing of global variables in OpenMP regions.
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 15:46:23 PDT 2020
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))
+ return nullptr;
----------------
Does `DSAStack->getDefaultDSA() != DSA_none` work once we have `(first)private` default kinds or do we need to check for shared explicitly?
================
Comment at: clang/test/OpenMP/parallel_codegen.cpp:55
+// FIXME: IRBuilder crashes in void llvm::OpenMPIRBuilder::finalize()
+// Assertion `Extractor.isEligible() && "Expected OpenMP outlining to be possible!"' failed.
+#pragma omp parallel shared(global, a) default(none)
----------------
@fghanim We have to look into this once you merge the privatization patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77731/new/
https://reviews.llvm.org/D77731
More information about the cfe-commits
mailing list