[clang] [llvm] [Driver][clang-linker-wrapper] Add initial support for OpenMP offloading to generic SPIR-V (PR #120145)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 07:17:15 PST 2024


================
@@ -735,11 +736,15 @@ wrapDeviceImages(ArrayRef<std::unique_ptr<MemoryBuffer>> Buffers,
 }
 
 Expected<SmallVector<std::unique_ptr<MemoryBuffer>>>
-bundleOpenMP(ArrayRef<OffloadingImage> Images) {
+bundleOpenMP(SmallVectorImpl<OffloadingImage> &Images) {
----------------
sarnex wrote:

It's mutable because we modify it inside `bundleOpenMP` if the vendor is `Intel`, where we call `containerizeOpenMPSPIRVImage` to put the device image into an ELF (which we can't do using clang because there's no SPIR-V linker). I agree it's not ideal to have to modify the image here, if you have a better spot to do that ELF packaging, let me know. Thanks

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


More information about the llvm-commits mailing list