summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/nvptx_allocate_codegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP]Fix PR41826: symbols visibility in device code.Alexey Bataev2019-11-251-6/+6
| | | | | | | | | | | | | | | | | | Summary: Currently, we ignore all locality attributes/info when building for the device and thus all symblos are externally visible and can be preemted at the runtime. It may lead to incorrect results. We need to follow the same logic, compiler uses for static/pie builds. But in some cases changing of dso locality may lead to problems with codegen, so instead mark external symbols as hidden instead in the device code. Reviewers: jdoerfert Subscribers: guansong, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70549
* [OPENMP]Use the attributes for dso locality when building for device.Alexey Bataev2019-05-211-6/+6
| | | | | | | | | Currently, we ignore all dso locality attributes/info when building for the device and thus all symblos are externally visible and can be preemted at the runtime. It may lead to incorrect results. We need to follow the same logic, compiler uses for static/pie builds. llvm-svn: 361283
* [OPENMP][NVPTX]Mark more functions as always_inline for betterAlexey Bataev2019-05-211-1/+1
| | | | | | | | | | | performance. Internally generated functions must be marked as always_inlines in most cases. Patch marks some extra reduction function + outlined parallel functions as always_inline for better performance, but only if the optimization is requested. llvm-svn: 361269
* [OPENMP][NVPTX]Fixed processing of memory management directives.Alexey Bataev2019-04-081-1/+32
| | | | | | | | | | | Added special processing of the memory management directives/clauses for NVPTX target. For private locals, omp_default_mem_alloc and omp_thread_mem_alloc result in allocation in local memory. omp_const_mem_alloc allocates const memory, omp_teams_mem_alloc allocates shared memory, and omp_cgroup_mem_alloc and omp_large_cap_mem_alloc allocate global memory. llvm-svn: 357923
* [OPENMP]Emit error message for allocate directive without allocatorAlexey Bataev2019-03-221-1/+1
| | | | | | | | | | | clause in target region. According to the OpenMP 5.0, 2.11.3 allocate Directive, Restrictions, allocate directives that appear in a target region must specify an allocator clause unless a requires directive with the dynamic_allocators clause is present in the same compilation unit. llvm-svn: 356752
* [OPENMP] Simplify codegen for allocate directive on local variables.Alexey Bataev2019-03-211-0/+5
| | | | | | | Simplified codegen for the allocate directive for local variables, initial implementation of the codegen for NVPTX target. llvm-svn: 356710
* [OPENMP]Codegen support for allocate directive on global variables.Alexey Bataev2019-03-211-0/+71
For the global variables the allocate directive must specify only the predefined allocator. This allocator must be translated into the correct form of the address space for the targets that support different address spaces. llvm-svn: 356702
OpenPOWER on IntegriCloud