[Openmp-commits] [PATCH] D107928: [OpenMP] Use IsHostPtr where needed in rest of omptarget.cpp
Joel E. Denny via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 1 14:38:31 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG786a14065099: [OpenMP] Use IsHostPtr where needed in rest of omptarget.cpp (authored by jdenny).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107928/new/
https://reviews.llvm.org/D107928
Files:
openmp/libomptarget/src/omptarget.cpp
Index: openmp/libomptarget/src/omptarget.cpp
===================================================================
--- openmp/libomptarget/src/omptarget.cpp
+++ openmp/libomptarget/src/omptarget.cpp
@@ -833,8 +833,7 @@
return OFFLOAD_SUCCESS;
}
- if (PM->RTLs.RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY &&
- TgtPtrBegin == HstPtrBegin) {
+ if (IsHostPtr) {
DP("hst data:" DPxMOD " unified and shared, becomes a noop\n",
DPxPTR(HstPtrBegin));
return OFFLOAD_SUCCESS;
@@ -1273,7 +1272,7 @@
void *HstPtrVal = Args[I];
void *HstPtrBegin = ArgBases[I];
void *HstPtrBase = Args[Idx];
- bool IsLast, IsHostPtr; // unused.
+ bool IsLast, IsHostPtr; // IsLast is unused.
void *TgtPtrBase =
(void *)((intptr_t)TgtArgs[TgtIdx] + TgtOffsets[TgtIdx]);
DP("Parent lambda base " DPxMOD "\n", DPxPTR(TgtPtrBase));
@@ -1288,8 +1287,7 @@
DPxPTR(HstPtrVal));
continue;
}
- if (PM->RTLs.RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY &&
- TgtPtrBegin == HstPtrBegin) {
+ if (IsHostPtr) {
DP("Unified memory is active, no need to map lambda captured"
"variable (" DPxMOD ")\n",
DPxPTR(HstPtrVal));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107928.370066.patch
Type: text/x-patch
Size: 1282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210901/dbff1f4e/attachment-0001.bin>
More information about the Openmp-commits
mailing list