[PATCH] D148805: [Clang][OpenMP] Avoid emitting a __kmpc_alloc_shared for implicit casts which do not have their address taken
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 20 07:45:49 PDT 2023
ABataev added inline comments.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:448
return;
- if (E->getCastKind() == CK_ArrayToPointerDecay) {
- const bool SavedAllEscaped = AllEscaped;
----------------
I think you need to check that the array is allocated in the parallel context, otherwise there might be a crash, if it is allocated in the target context and many threads would like to access it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148805/new/
https://reviews.llvm.org/D148805
More information about the cfe-commits
mailing list