[PATCH] D122069: [Object] Add binary format for bundling offloading metadata

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 08:16:26 PDT 2022


jhuber6 added a comment.

In D122069#3416694 <https://reviews.llvm.org/D122069#3416694>, @saiislam wrote:

> Hey @jhuber6 , as discussed in multi-company meeting, I think that we will need at least an arch field somewhere in this. We would like to create multi-arch binaries so that runtime can load the compatible one on its own.
> You may even consider using TargetID Format <https://clang.llvm.org/docs/ClangOffloadBundler.html#target-id> to store the list of archs.

The binary format contains a string map along with some integer fields. I have the `getArch()` function in the binary that just extracts the value get the `"arch"` key. This makes it easy to add some arbitrary data so I was planning on simply adding a `"features"` key as well. Then we can extract the associated image features and decide what to do with the image. I haven't thought of a good solution for allowing multiple compatible architectures, maybe a comma separated list of architectures. You can see the proposed usage right now in D122683 <https://reviews.llvm.org/D122683> but more will be added.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122069/new/

https://reviews.llvm.org/D122069



More information about the cfe-commits mailing list