[llvm] [libsycl] Introduce Kernel name based cache (PR #225865)

Sergey Semenov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 12:55:37 PDT 2026


================
@@ -40,6 +41,14 @@ ContextImpl::ContextImpl(std::vector<DeviceImpl *> &&DeviceList,
 
 ContextImpl::~ContextImpl() {
   assert(MOffloadContext && "Context must be created in ctor");
+  // Drop this context's entries from every DeviceKernelInfo cache that holds
+  // one, before the programs those entries point into are destroyed below.
+  {
+    std::lock_guard<std::mutex> Guard(MTrackedKernelInfosMutex);
+    for (DeviceKernelInfo *Info : MTrackedKernelInfos) {
----------------
sergey-semenov wrote:

https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
Here and in a couple of other places.

https://github.com/llvm/llvm-project/pull/225865


More information about the llvm-commits mailing list