[Openmp-commits] [PATCH] D127432: [Libomptarget] Add support for offloading binaries in libomptarget
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 15 14:03:52 PDT 2022
jhuber6 added a comment.
In D127432#3656370 <https://reviews.llvm.org/D127432#3656370>, @JonChesterfield wrote:
> Looks ok to me. Does propagating const into __tgt_device_image (and possibly further) work to remove the const cast? Iirc the libelf interfaces take void* and libllvm take const, so it's possible we'll be able to gradually move const all the way through the stack.
>
> Strictly I suppose const fields in the type are an abi change, we could static_assert that making them const doesn't change offsetof if feeling paranoid.
Right now that would require const_cast somewhere else. I believe there are calls to `libelf` in the x86_64 version of the plugin which requires a `char *` input. We will probably be able to transition away from those if we are allowed to use LLVM libraries. The data that these images point to are global constants, so writing to them will result in whatever happens when you write to RO memory in an ELF.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127432/new/
https://reviews.llvm.org/D127432
More information about the Openmp-commits
mailing list