[llvm] [Offload] Introduce ATTACH map-type support for pointer attachment. (PR #149036)
Abhinav Gaba via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 10:42:55 PDT 2025
================
@@ -821,19 +821,22 @@ int processAttachEntries(DeviceTy &Device, AttachInfoTy &AttachInfo,
return TPR;
};
- // Get device version of the pointer (e.g., &p)
+ // Get device version of the pointee (e.g., &p[10]) first, as we can
+ // release its TPR after extracting the pointer value.
+ void *TgtPteeBegin;
+ if (auto PteeTPROpt = LookupTargetPointer(HstPteeBegin, 0, "pointee"))
+ TgtPteeBegin = PteeTPROpt->TargetPointer;
+ else
+ continue;
----------------
abhinavgaba wrote:
That would not work since that's accessing PteeTPROpt outside the scope of its declaration.
https://github.com/llvm/llvm-project/pull/149036
More information about the llvm-commits
mailing list