[Openmp-commits] [PATCH] D81054: [OpenMP] Introduce target memory manager
Ye Luo via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 18 20:47:55 PDT 2020
ye-luo added inline comments.
================
Comment at: openmp/libomptarget/src/MemoryManager.cpp:219
+ std::lock_guard<std::mutex> Guard(MapTableLock);
+ if (PtrToNodeTable.find(NodePtr->Ptr) == PtrToNodeTable.end())
+ PtrToNodeTable[NodePtr->Ptr] = NodePtr;
----------------
When arrive here, the code should know if the memory is from free list or newly allocated. It doesn’t even need to do the find. It is wasting time. We may just use std::list if we don’t need to find.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81054/new/
https://reviews.llvm.org/D81054
More information about the Openmp-commits
mailing list