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

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 13 12:53:22 PDT 2022


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/include/device.h:92
+    /// pointer addresses to identify stale entries.
+    std::map<void **, ShadowPtrInfoTy> ShadowPtrInfos;
 
----------------
tianshilei1992 wrote:
> jdoerfert wrote:
> > tianshilei1992 wrote:
> > > We don't use the order here, right? If so, `unordered_map` can usually get better performance.
> > We do not use the order, correct. I can change it though I doubt it makes much of a difference.
> Would be better to do it. https://stackoverflow.com/questions/36392583/is-an-unordered-map-really-faster-than-a-map-in-practice
That comparison is not helpful. Our expected size is *probably* < 10.


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