[Openmp-commits] [PATCH] D123443: [OpenMP][NFCI] Cleanup APIs and improve object encapsulation

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Apr 11 16:02:40 PDT 2022


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/src/device.cpp:219
       // It might have been allocated with the parent, but it's still new.
-      IsNew = HT.getTotalRefCount() == 1;
+      TPR.setIsNew(HT.getTotalRefCount() == 1);
       RefCountAction = " (update suppressed)";
----------------
ye-luo wrote:
> Can we avoid all the setXXX functions?
> I feel better keep the local IsNew and then return by calling TPR::TPR(Entry, TargetPointer, IsNew...)
But then I need to do manual locking again and I would like us to avoid that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123443/new/

https://reviews.llvm.org/D123443



More information about the Openmp-commits mailing list