[clang] [llvm] [Offloading] Extend OffloadBinary format to support multiple metadata entries (PR #169425)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 5 10:24:01 PST 2025
jhuber6 wrote:
No, as far as I'm aware 99% of uses of this will be through this function
```
Error extractOffloadFiles(MemoryBufferRef Contents,
SmallVectorImpl<OffloadFile> &Binaries);
```
This is an owning binary of the memory, we are given the contents and just need to loop through everything. The main change here is that when we create the *reference* version we will share the header between multiple entries. This will require some way to index into them when creating them, probably just need some method to iterate through all the entires and create binaries for them. When we create an owning binary we will just copy it over with the shared header. The header is very small, so we do not waste an amount of memory worth caring about by duplicating it. That's how I'd imagine this works at least
https://github.com/llvm/llvm-project/pull/169425
More information about the llvm-commits
mailing list