llvm-project/clang/lib/Driver
Yaxun Liu 9767089d00 [HIP] Support early finalization of device code for -fno-gpu-rdc
This patch renames -f{no-}cuda-rdc to -f{no-}gpu-rdc and keeps the original
options as aliases. When -fgpu-rdc is off,
clang will assume the device code in each translation unit does not call
external functions except those in the device library, therefore it is possible
to compile the device code in each translation unit to self-contained kernels
and embed them in the host object, so that the host object behaves like
usual host object which can be linked by lld.

The benefits of this feature is: 1. allow users to create static libraries which
can be linked by host linker; 2. amortized device code linking time.

This patch modifies HIP action builder to insert actions for linking device
code and generating HIP fatbin, and pass HIP fatbin to host backend action.
It extracts code for constructing command for generating HIP fatbin as
a function so that it can be reused by early finalization. It also modifies
codegen of HIP host constructor functions to embed the device fatbin
when it is available.

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

llvm-svn: 343611
2018-10-02 17:48:54 +00:00
..
ToolChains [HIP] Support early finalization of device code for -fno-gpu-rdc 2018-10-02 17:48:54 +00:00
Action.cpp [modules] Driver support for precompiling a collection of files as a single 2018-09-15 01:21:16 +00:00
CMakeLists.txt NFC: Fix some darwin linker warnings introduced in r338385 2018-09-27 20:36:28 +00:00
Compilation.cpp [Driver] Clean up tmp files when deleting Compilation objects 2018-05-31 09:05:22 +00:00
Distro.cpp Change \t to spaces 2018-07-20 08:19:20 +00:00
Driver.cpp [HIP] Support early finalization of device code for -fno-gpu-rdc 2018-10-02 17:48:54 +00:00
DriverOptions.cpp Revert "Revert r311552: [Bash-autocompletion] Add support for static analyzer flags" 2017-08-29 00:09:31 +00:00
InputInfo.h Add an Action* member to InputInfo. 2016-01-11 23:15:21 +00:00
Job.cpp Fix crash in clang. 2018-07-03 18:12:39 +00:00
Multilib.cpp [Driver] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2018-03-20 21:08:59 +00:00
Phases.cpp
SanitizerArgs.cpp [MSan] add KMSAN support to Clang driver 2018-09-07 09:21:09 +00:00
Tool.cpp Rename the version of ConstructJob for multiple outputs to ConstructJobMultipleOutputs. 2016-11-03 15:41:50 +00:00
ToolChain.cpp [MinGW] Allow using ASan 2018-10-01 20:53:25 +00:00
Types.cpp [modules] Driver support for precompiling a collection of files as a single 2018-09-15 01:21:16 +00:00
XRayArgs.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-26 22:16:28 +00:00