[Openmp-commits] [PATCH] D106510: [OpenMP][OpenACC] Implement `ompx_hold` map type modifier extension in runtime (2/2)

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 27 09:49:39 PDT 2021

grokos accepted this revision.
grokos added a comment.
This revision is now accepted and ready to land.


Comment at: openmp/libomptarget/src/device.cpp:343
+      else {
+        HT.decRefCount(UseHoldRefCount);
+        RefCountAction = " (reset)";
jdenny wrote:
> grokos wrote:
> > Currently, we don't decrement the RefCount at this point. Is this a bug in the existing code?
> Without this patch, the only way I know of that `ForceDelete=true` but `IsLast=false` is if the reference count is infinite.  Decrementing the reference count would have no effect then (and neither did resetting), so I don't think there's an existing bug.
> With this patch, a new possibility is that the hold reference count is non-zero.  Because, as a result, `IsLast=false`, we're not to ready to unmap, so the final decrement of the dynamic reference counter after its reset needs to happen here.
Oh, of course, makes sense.



More information about the Openmp-commits mailing list