llvm-project/clang/lib/Sema
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
..
AnalysisBasedWarnings.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-26 22:16:28 +00:00
CMakeLists.txt Compile SemaTemplate.cpp with /bigobj on MSVC 2018-07-28 01:29:31 +00:00
CodeCompleteConsumer.cpp [CodeComplete] Add completions for filenames in #include directives. 2018-09-18 08:40:41 +00:00
CoroutineStmtBuilder.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
DeclSpec.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
DelayedDiagnostic.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
IdentifierResolver.cpp [AST] Various optimizations + refactoring in DeclarationName(Table) 2018-09-21 12:53:22 +00:00
JumpDiagnostics.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
MultiplexExternalSemaSource.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
ParsedAttr.cpp Fix Wundef NDEBUG warning; NFC 2018-09-24 12:12:03 +00:00
Scope.cpp Revert r335019 "Update NRVO logic to support early return (Attempt 2)" 2018-06-19 05:35:30 +00:00
ScopeInfo.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
Sema.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
SemaAccess.cpp P0969R0: allow structured binding of accessible members, not only public members. 2018-09-25 22:12:44 +00:00
SemaAttr.cpp We have in place support for parsing #pragma FENV_ACCESS, but that 2018-08-14 17:06:56 +00:00
SemaCUDA.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
SemaCXXScopeSpec.cpp Clean up and simplify RequireCompleteType. 2018-08-07 21:35:41 +00:00
SemaCast.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
SemaChecking.cpp Added warning for unary minus used with unsigned type 2018-10-02 06:02:30 +00:00
SemaCodeComplete.cpp [CodeComplete] Re-fix accessibilty of protected members from base class. 2018-10-02 10:29:00 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaDecl.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
SemaDeclAttr.cpp [HIP] Support early finalization of device code for -fno-gpu-rdc 2018-10-02 17:48:54 +00:00
SemaDeclCXX.cpp [cxx2a] P0641R2: (Some) type mismatches on defaulted functions only 2018-09-28 01:16:43 +00:00
SemaDeclObjC.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
SemaExceptionSpec.cpp Remove unnecessary semicolon to silence -Wpedantic warning. NFCI. 2018-09-06 15:16:17 +00:00
SemaExpr.cpp Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
SemaExprCXX.cpp [CUDA] Ignore uncallable functions when we check for usual deallocators. 2018-09-21 17:29:33 +00:00
SemaExprMember.cpp Remove trailing space 2018-07-30 19:24:48 +00:00
SemaExprObjC.cpp [Sema][ObjC] Infer availability of +new from availability of -init. 2018-09-10 22:20:09 +00:00
SemaFixItUtils.cpp [Sema] Revert r329346 because of memory sanitizer failures. 2018-04-05 22:15:42 +00:00
SemaInit.cpp Handle dependent class template names in class template argument 2018-09-28 03:18:53 +00:00
SemaLambda.cpp [Sema] Remove location from implicit capture init expr 2018-09-13 23:28:25 +00:00
SemaLookup.cpp [CodeComplete] Re-fix accessibilty of protected members from base class. 2018-10-02 10:29:00 +00:00
SemaObjCProperty.cpp Add -Wobjc-property-assign-on-object-type. 2018-09-05 19:02:00 +00:00
SemaOpenMP.cpp Add support for unified_shared_memory clause on requires directive 2018-10-01 13:47:43 +00:00
SemaOverload.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-26 22:16:28 +00:00
SemaPseudoObject.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaStmt.cpp [cxx2a] P0614R1: Support init-statements in range-based for loops. 2018-09-28 18:44:09 +00:00
SemaStmtAsm.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaStmtAttr.cpp Merge two attribute diagnostics into one 2018-09-17 10:39:46 +00:00
SemaTemplate.cpp Consistently create a new declaration when merging a pre-existing but 2018-09-12 02:13:47 +00:00
SemaTemplateDeduction.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
SemaTemplateInstantiate.cpp PR38627: Fix handling of exception specification adjustment for 2018-09-05 22:30:37 +00:00
SemaTemplateInstantiateDecl.cpp [OPENMP] Add support for OMP5 requires directive + unified_address clause 2018-09-26 04:28:39 +00:00
SemaTemplateVariadic.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
SemaType.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-26 22:16:28 +00:00
TreeTransform.h Add support for unified_shared_memory clause on requires directive 2018-10-01 13:47:43 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Remove trailing space 2018-07-30 19:24:48 +00:00