[PATCH] D88179: [OPENMP]PR47606: Do not update the lastprivate item if it was captured by reference as firstprivate data member.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 12:53:54 PDT 2020


ABataev created this revision.
ABataev added reviewers: jdoerfert, mikerice.
Herald added subscribers: guansong, yaxunl.
Herald added a project: clang.
ABataev requested review of this revision.

No need to make final copy from the firsptrivate/lastprivate copy to the original item if the item is a data memeber.
Firstprivate copy creates a copy by reference and the original item gets
updated correctly when updating the lastprivate shared variable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88179

Files:
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/for_lastprivate_codegen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88179.293838.patch
Type: text/x-patch
Size: 7183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200923/e620872b/attachment-0001.bin>


More information about the cfe-commits mailing list