search for: lock_guard

Displaying 6 results from an estimated 6 matches for "lock_guard".

Did you mean: blockguard
2018 Sep 15
4
LLVMContext: Threads and Ownership.
...text, and expose this and the module count. Then in the IR-compiling layer of the JIT we could have something like: // Compile finished, time to deallocate the module. // Explicit deletes used for clarity, we would use unique_ptrs in practice. auto &Ctx = Mod->getContext(); delete Mod; std::lock_guard<std::mutex> Lock(Ctx->getMutex()); if (Ctx.getNumModules()) delete Ctx; Another option would be to invert the ownership model and say that each Module shares ownership of its LLVMContext. That way LLVMContexts would be automatically deallocated when the last module using them is destruc...
2018 Sep 16
2
LLVMContext: Threads and Ownership.
...yer of the JIT we >> could have something like: >> >> // Compile finished, time to deallocate the module. >> // Explicit deletes used for clarity, we would use unique_ptrs in >> practice. >> auto &Ctx = Mod->getContext(); >> delete Mod; >> std::lock_guard<std::mutex> Lock(Ctx->getMutex()); >> if (Ctx.getNumModules()) >> delete Ctx; >> >> Another option would be to invert the ownership model and say that each >> Module shares ownership of its LLVMContext. That way LLVMContexts would be >> automatically d...
2018 Sep 16
2
LLVMContext: Threads and Ownership.
...t;>>> >>>> // Compile finished, time to deallocate the module. >>>> // Explicit deletes used for clarity, we would use unique_ptrs in >>>> practice. >>>> auto &Ctx = Mod->getContext(); >>>> delete Mod; >>>> std::lock_guard<std::mutex> Lock(Ctx->getMutex()); >>>> if (Ctx.getNumModules()) >>>> delete Ctx; >>>> >>>> Another option would be to invert the ownership model and say that each >>>> Module shares ownership of its LLVMContext. That way LLVMCo...
2020 May 26
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...gLayer.cpp. I found this first by adding an additional debug statement (highlighted) thinking the `reinterpret_cast` may be at fault for the key mismatch. I never saw this print and I then realized my “Adding” vs. “Registering” mistake. // Run EventListener notifyLoaded callbacks. { std::lock_guard<std::mutex> Lock(RTDyldLayerMutex); dbgs() << "Registering MemMgr " << MemMgr << "\n"; auto LOIItr = LoadedObjInfos.find(MemMgr); assert(LOIItr != LoadedObjInfos.end() && "LoadedObjInfo missing"); for (auto *L : EventList...
2018 Dec 04
4
[cfe-dev] RFC: Modernizing our use of auto
On Wed, Nov 28, 2018 at 6:25 PM Chris Lattner via cfe-dev < cfe-dev at lists.llvm.org> wrote: > Generally no IMO, because the cases that produce optional are not obvious. > Just to say, +1 from me too. > > > * Can we use auto in c++14 lambda arguments with llvm::find_if(C, > [](const auto& i) { ... }) for example? > > * We need to use auto for structured
2020 May 21
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
Hi Adam, Calls to the listeners should be protected by the RTDyldLayerMutex. Could you apply the attached patch and share the debugging output from one of the failing runs? Regards, Lang. On Wed, May 20, 2020 at 8:00 PM David Blaikie <dblaikie at gmail.com> wrote: > +Lang > > On Wed, May 20, 2020 at 4:44 PM Straw, Adam D via llvm-dev < > llvm-dev at lists.llvm.org>