[Openmp-commits] [PATCH] D123446: [OpenMP][FIX] Remove shadow pointer map and introduce consistent locking

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 13 21:29:23 PDT 2022


ye-luo added a comment.

> The new scheme stores the shadow pointers inside the entries.

Makes a lot more sense now.



================
Comment at: openmp/libomptarget/include/device.h:343
+  }
+
+  ~TargetPointerResultTy() {
----------------
Please delete copy constructor and copy assign operator.


================
Comment at: openmp/libomptarget/include/device.h:370
+
+  void reset() { *this = TargetPointerResultTy(); }
 };
----------------
I don't get the intention of this function. Need documentation. It also seems buggy. Don't you need to unlock Entry before assign?


================
Comment at: openmp/libomptarget/include/device.h:405
 
-  ShadowPtrListTy ShadowPtrMap;
-
-  std::mutex PendingGlobalsMtx, ShadowMtx;
+  std::mutex PendingGlobalsMtx;
 
----------------
Do you know what this is? Add some documentation?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123446



More information about the Openmp-commits mailing list