[clang] [llvm] [Offload][libsycl][clang-sycl-linker] Simplify SYCL Offload wrapping (PR #193876)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 24 07:50:29 PDT 2026


================
@@ -92,9 +93,12 @@ class ProgramAndKernelManager {
   // by caching the pointers when possible.
   std::unordered_map<std::string_view, DeviceKernelInfo> MDeviceKernelInfoMap;
 
-  // Controls lifetime of device images.
-  std::unordered_map<const __sycl_tgt_device_image *,
-                     std::unique_ptr<DeviceImageManager>>
+  // Keyed by BinaryStart (register/unregister param). Each fat binary can
+  // contain multiple device images, each owned by its own DeviceImageManager.
+  // Controls lifetime of device image managers and, through them, parsed
+  // OffloadBinary objects.
+  std::unordered_map<const void *,
+                     std::vector<std::unique_ptr<DeviceImageManager>>>
----------------
sarnex wrote:

could we create some `using X = Y` aliases for the key and value here?

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


More information about the cfe-commits mailing list