[Openmp-commits] [PATCH] D105990: [OpenMP][NFC] Simplify targetDataEnd conditions for CopyMember
Joel E. Denny via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jul 14 08:30:34 PDT 2021
jdenny created this revision.
jdenny added reviewers: grokos, RaviNarayanaswamy, jdoerfert, jhuber6, protze.joachim, tianshilei1992.
Herald added subscribers: guansong, yaxunl.
jdenny requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.
targetDataEnd and targetDataBegin compute CopyMember/copy differently,
and I don't see why they should. This patch eliminates one of those
differences by making a simplifying NFC change to targetDataEnd.
The change is NFC as follows. The change only affects the case when
`!UNIFIED_SHARED_MEMORY || HasCloseModifier`. In that case, the
following points are always true:
- The value of CopyMember is relevant later only if DelEntry = false.
- DelEntry = false only if one of the following is true:
- IsLast = false. In this case, it's always true that CopyMember = false = IsLast.
- `MEMBER_OF && !PTR_AND_OBJ` is true. In this case, CopyMember = IsLast.
- Thus, if CopyMember is relevant, CopyMember = IsLast.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105990
Files:
openmp/libomptarget/src/omptarget.cpp
Index: openmp/libomptarget/src/omptarget.cpp
===================================================================
--- openmp/libomptarget/src/omptarget.cpp
+++ openmp/libomptarget/src/omptarget.cpp
@@ -718,9 +718,8 @@
bool CopyMember = false;
if (!(PM->RTLs.RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY) ||
HasCloseModifier) {
- if ((ArgTypes[I] & OMP_TGT_MAPTYPE_MEMBER_OF) &&
- !(ArgTypes[I] & OMP_TGT_MAPTYPE_PTR_AND_OBJ))
- CopyMember = IsLast;
+ if (IsLast)
+ CopyMember = true;
}
if ((DelEntry || Always || CopyMember) &&
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105990.358616.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210714/25b13237/attachment.bin>
More information about the Openmp-commits
mailing list