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

2022-03-25 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 418227. jhuber6 added a comment. Splitting this out into a patch for the format. Adding a unit test and changing strings to now be an arbitrary string map. Hopefully the move to LLVM proper won't draw ire for creating another binary format in LLVM. Repositor

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

2022-03-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 417685. jhuber6 added a comment. Updating to use path instead of generic cmdline, makes it a lot easier to pass it. Also just adding a reserved field in case I want to add the cmdline back. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2022-03-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 417129. jhuber6 added a comment. Add more comments and an entry size field to the header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122069/new/ https://reviews.llvm.org/D122069 Files: clang/include/clang

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

2022-03-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D122069#3397867 , @tra wrote: > In D122069#3397560 , @jhuber6 wrote: > >> I was definitely thinking about a lot of alternatives to making yet another >> on-disk binary format. I had a

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

2022-03-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D122069#3397560 , @jhuber6 wrote: > I was definitely thinking about a lot of alternatives to making yet another > on-disk binary format. I had a few discussions with @JonChesterfield on the > subject. There were two things that p

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

2022-03-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D122069#3397373 , @tra wrote: >> I decided to use a custom format rather than using an existing format (ELF, >> JSON, etc) because of the specialty use-case of this. > > Will we ever need to process the files with tools built

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

2022-03-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > I decided to use a custom format rather than using an existing format (ELF, > JSON, etc) because of the specialty use-case of this. Will we ever need to process the files with tools built with a different LLVM version? E.g clang and lld may be built separately from differ

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

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416749. jhuber6 added a comment. Changing to add alignment to the global variable. Should ensure that the section alignment is correct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122069/new/ https://reviews.

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

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416719. jhuber6 added a comment. Fix test after increasing alignment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122069/new/ https://reviews.llvm.org/D122069 Files: clang/include/clang/Basic/CodeGenOption

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

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416713. jhuber6 added a comment. Update alignment to worse-case padding of 16. I'm not sure if there's a bette solution for preventing the linker from adding padding between these sections if they are combined. Repository: rG LLVM Github Monorepo CHANGE

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

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/Offloading.h:1 +//===--- Offloading.h - Utilities for handling offloading code -*- C++ -*-===// +// Not sure if this should live in Clang or LLVM. Repository: rG LLVM Github Monorepo CHAN

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

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield. Herald added subscribers: ormris, dexonsmith, hiraditya, mgorny. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald added pr