Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions offload/libomptarget/omptarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,12 @@ static int performPointerAttachment(DeviceTy &Device, AsyncInfoTy &AsyncInfo,
reinterpret_cast<uint64_t>(HstPteeBase);
void *TgtPteeBase = reinterpret_cast<void *>(
reinterpret_cast<uint64_t>(TgtPteeBegin) - Delta);
DP("HstPteeBase: " DPxMOD ", HstPteeBegin: " DPxMOD
", Delta (HstPteeBegin - HstPteeBase): %" PRIu64 ".\n",
DPxPTR(HstPteeBase), DPxPTR(HstPteeBegin), Delta);
DP("TgtPteeBase (TgtPteeBegin - Delta): " DPxMOD ", TgtPteeBegin : " DPxMOD
"\n",
DPxPTR(TgtPteeBase), DPxPTR(TgtPteeBegin));

// Add shadow pointer tracking
// TODO: Support shadow-tracking of larger than VoidPtrSize pointers,
Expand Down
9 changes: 8 additions & 1 deletion offload/libomptarget/private.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ printKernelArguments(const ident_t *Loc, const int64_t DeviceId,
const char *Type = nullptr;
const char *Implicit =
(ArgTypes[I] & OMP_TGT_MAPTYPE_IMPLICIT) ? "(implicit)" : "";
if (ArgTypes[I] & OMP_TGT_MAPTYPE_TO && ArgTypes[I] & OMP_TGT_MAPTYPE_FROM)

if (ArgTypes[I] & OMP_TGT_MAPTYPE_ATTACH &&
ArgTypes[I] & OMP_TGT_MAPTYPE_ALWAYS)
Type = "attach:always";
else if (ArgTypes[I] & OMP_TGT_MAPTYPE_ATTACH)
Type = "attach";
else if (ArgTypes[I] & OMP_TGT_MAPTYPE_TO &&
ArgTypes[I] & OMP_TGT_MAPTYPE_FROM)
Type = "tofrom";
else if (ArgTypes[I] & OMP_TGT_MAPTYPE_TO)
Type = "to";
Expand Down
Loading