================ @@ -289,13 +306,38 @@ TargetPointerResultTy DeviceTy::getTargetPointer( // In addition to the mapping rules above, the close map modifier forces the // mapping of the variable to the device. if (Size) { - DP("Return HstPtrBegin " DPxMOD " Size=%" PRId64 " for unified shared " - "memory\n", - DPxPTR((uintptr_t)HstPtrBegin), Size); - LR.TPR.Flags.IsPresent = false; + LR.TPR.Flags.IsNewEntry = true; + assert(TgtPadding == 0 && "TgtPadding must always be zero in USM mode"); + uintptr_t TgtPtrBegin = (uintptr_t)HstPtrBegin + TgtPadding; + LR.TPR.setEntry( ---------------- carlobertolli wrote:
As you are changing the behavior of getTargetPointer under unified_shared_memory, please update the comment on the declaration of getTargetPointer in device.h. https://github.com/llvm/llvm-project/pull/69005 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits