summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/declare_target_messages.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CUDA][HIP] Fix host/device check with -fopenmpYaxun Liu2019-10-091-2/+2
| | | | | | | | | | | | | | | | CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation to take advantages of multi-threads computation. CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine if a function is sure to be emitted. To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic. Differential Revision: https://reviews.llvm.org/D67837 llvm-svn: 374263
* [OPENMP5.0]Add support for device_type clause in declare targetAlexey Bataev2019-08-231-5/+40
| | | | | | | | | | construct. OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means that the function must be emitted only for the host, nohost - only for the device, and any - for both, device and the host. llvm-svn: 369775
* [OPENMP5.0]Diagnose global variables in lambda not marked as declareAlexey Bataev2019-08-161-7/+10
| | | | | | | | target. According to OpenMP 5.0, if a lambda declaration and definition appears between a declare target directive and the matching end declare target directive, all variables that are captured by the lambda expression must also appear in a to clause. llvm-svn: 369146
* [OPENMP]Initial support for 'allocate' clause.Alexey Bataev2019-03-271-1/+1
| | | | | | Added parsing/sema analysis of the allocate clause. llvm-svn: 357068
* [OPENMP] Simplified checks for declarations in declare target regions.Alexey Bataev2018-09-111-2/+2
| | | | | | | | Sema analysis should not mark functions as an implicit declare target, it may break codegen. Simplified semantic analysis and removed extra code for implicit declare target functions. llvm-svn: 341939
* [OpenMP] Add support for nested 'declare target' directivesKelvin Li2018-09-101-2/+16
| | | | | | | | | | | Add the capability to nest multiple declare target directives - including header files within a declare target region. Differential Revision: https://reviews.llvm.org/D51378 Patch by Patrick Lyster llvm-svn: 341766
* [OPENMP] Do not emit warning for implicitly declared target functions.Alexey Bataev2018-05-021-2/+2
| | | | | | | Since upcoming OpenMP 5.0 functions can be mapped implicitly as declare target and we should not emit warnings for such functions. llvm-svn: 331377
* [OPENMP] Do not emit warning about non-declared target function params.Alexey Bataev2018-04-301-3/+3
| | | | | | | | We should not emit warning that the parameters are not marked as declare target, these declaration are local and cannot be marked as declare target. llvm-svn: 331211
* [OPENMP] Do not emit messages for templates in declare targetAlexey Bataev2018-02-161-0/+27
| | | | | | | | | constructs. The compiler may emit some extra warnings for functions, that are implicit specialization of the templates, declared in the target region. llvm-svn: 325391
* [OPENMP] Support for -fopenmp-simd option with compilation of simd loopsAlexey Bataev2017-12-291-0/+2
| | | | | | | | | only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. llvm-svn: 321560
* [OpenMP] Diagnose function name on the link clauseKelvin Li2017-12-121-0/+4
| | | | | | | | | | | This patch is to add diagnose when a function name is specified on the link clause. According to the OpenMP spec, only the list items that exclude the function name are allowed on the link clause. Differential Revision: https://reviews.llvm.org/D40968 llvm-svn: 320521
* [OpenMP] Diagnose undeclared variables on declare target clauseKelvin Li2017-11-301-0/+4
| | | | | | | | | | | | | Clang asserts on undeclared variables on the to or link clause in the declare target directive. The patch is to properly diagnose the error. // foo1 and foo2 are not declared #pragma omp declare target to(foo1) #pragma omp declare target link(foo2) Differential Revision: https://reviews.llvm.org/D40588 llvm-svn: 319458
* [OPENMP] Allow use of declare target directive inside structAlexey Bataev2017-10-031-2/+2
| | | | | | | | | | declaration. Patch allows using of the `#pragma omp declare target`| `#pragma omp end declare target` directives inside the structures if we need to mark as declare target only some static members. llvm-svn: 314833
* [OPENMP] Allow all classes as mappable types.Alexey Bataev2017-09-131-4/+4
| | | | | | | According to upcoming OpenMP 5.0 all classes/structs are now considered as mappable, even polymorphic and with static members. llvm-svn: 313141
* [OpenMP] Parse+Sema for '#pragma omp declare target' syntax version 4.5Dmitry Polukhin2016-05-091-1/+13
| | | | | | | | | | | | | | | | | Support OpenMP version 4.5 syntax for #pragma omp declare target. Syntax: #pragma omp declare target (extended-list) new-line or #pragma omp declare target clause[ [,] clause ... ] new-line Where clause is one of the following: to(extended-list) link(list) Differential Revision: http://reviews.llvm.org/D20011 llvm-svn: 268925
* [OPENMP] Parsing and Sema support for 'omp declare target' directiveDmitry Polukhin2016-04-061-0/+89
Add parsing, sema analysis for 'declare target' construct for OpenMP 4.0 (4.5 support will be added in separate patch). The declare target directive specifies that variables, functions (C, C++ and Fortran), and subroutines (Fortran) are mapped to a device. The declare target directive is a declarative directive. In Clang declare target is implemented as implicit attribute for the declaration. The syntax of the declare target directive is as follows: #pragma omp declare target declarations-definition-seq #pragma omp end declare target Based on patch from Michael Wong http://reviews.llvm.org/D15321 llvm-svn: 265530
OpenPOWER on IntegriCloud