summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/declare_target_codegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merging r340191:Hans Wennborg2018-08-211-0/+14
| | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340191 | abataev | 2018-08-20 20:03:40 +0200 (Mon, 20 Aug 2018) | 6 lines [OPENMP] Fix crash on the emission of the weak function declaration. If the function is actually a weak reference, it should not be marked as deferred definition as this is only a declaration. Patch adds checks for the definitions if they must be emitted. Otherwise, only declaration is emitted. ------------------------------------------------------------------------ llvm-svn: 340351
* [OPENMP] Prevent problems with linking of the static variables.Alexey Bataev2018-07-311-4/+5
| | | | | | No need to change the linkage, we can avoid the problem using special variable. That points to the original variable and, thus, prevent some of the optimizations that might break the compilation. llvm-svn: 338399
* [OPENMP] Static variables on device must be externally visible.Alexey Bataev2018-07-271-2/+5
| | | | | | | Do not mark static variable as internal on the device as they must be visible from the host to be mapped correctly. llvm-svn: 338139
* [OPENMP] DO not crash on combined constructs in declare targetAlexey Bataev2018-05-161-1/+1
| | | | | | | | | | | functions. If the combined construct is specified in the declare target function and the device code is emitted, the compiler crashes because of the incorrectly chosen captured stmt. We should choose the innermost captured statement, not the outermost. llvm-svn: 332477
* [OPENMP] Mark global tors/dtors as used.Alexey Bataev2018-05-091-0/+4
| | | | | | | | | | | If the global variables are marked as declare target and they need ctors/dtors, these ctors/dtors are emitted and then invoked by the offloading runtime library. They are not explicitly used in the emitted code and thus can be optimized out. Patch marks these functions as used, so the optimizer cannot remove these function during the optimization phase. llvm-svn: 331879
* [OPENMP, NVPTX] Fix linkage of the global entries.Alexey Bataev2018-05-081-2/+2
| | | | | | | The linkage of the global entries must be weak to enable support of redefinition of the same target regions in multiple compilation units. llvm-svn: 331768
* [OPENMP] Support C++ member functions in the device constructs.Alexey Bataev2018-05-021-2/+13
| | | | | | | Added correct emission of the C++ member functions for the device function when they are used in the device constructs. llvm-svn: 331365
* [OPENMP] Emit template instatiation|specialization functions forAlexey Bataev2018-05-011-4/+8
| | | | | | | | | | devices. If the function is an instantiation|specialization of the template and is used in the device code, the definitions of such functions should be emitted for the device. llvm-svn: 331261
* [OPENMP] Do not crash on codegen for CXX member functions.Alexey Bataev2018-04-301-0/+6
| | | | | | | Non-static member functions should not be emitted as a standalone functions, this leads to compiler crash. llvm-svn: 331206
* [OPENMP] Allow to use declare target variables in map clausesAlexey Bataev2018-04-161-1/+1
| | | | | | | | Global variables marked as declare target are allowed to be used in map clauses. Patch fixes the crash of the compiler on the declare target variables in map clauses. llvm-svn: 330156
* [OPENMP] Codegen for `omp declare target` construct.Alexey Bataev2018-03-151-0/+66
Added initial codegen for device side of declarations inside `omp declare target` construct + codegen for implicit `declare target` functions, which are used in the target regions. llvm-svn: 327636
OpenPOWER on IntegriCloud