HomePhabricator

[Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

Description

[Clang][OpenMP Offload] Add new tool for wrapping offload device binaries

This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver.

This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943).

Differential Revision: https://reviews.llvm.org/D68166

Details

Committed
sdmitrievOct 9 2019, 1:42 PM
Differential Revision
D68166: [Clang][OpenMP Offload] Add new tool for wrapping offload device binaries
Parents
rL374218: Bump version to 9.0.1
Branches
Unknown
Tags
Unknown

Event Timeline

thakis added inline comments.
/cfe/trunk/tools/clang-offload-wrapper/CMakeLists.txt
1

As far as I can tell, you're not using TransformUtils. Is this for a future change?

sdmitriev marked an inline comment as done.Oct 9 2019, 5:17 PM
sdmitriev added inline comments.
/cfe/trunk/tools/clang-offload-wrapper/CMakeLists.txt
1

Right, this particular patch does not need TransformUtils, but it will be used in a future change D68746. I have just forgot to remove it from this patch while splitting D64943 into pieces.