summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/for_reduction_messages.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OpenMP] fix segfault when a variable referenced in reduction clause is a ↵David Sheinkman2016-10-041-0/+7
| | | | | | reference parameter\nDifferential Revision: http://reviews.llvm.org/D24524 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283223 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Allow skip expression after comma in clauses with lists."Alexey Bataev2016-04-011-2/+2
| | | | | | | This reverts commit http://reviews.llvm.org/rL265003. After some thoughts decided to emit errors here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265119 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Allow skip expression after comma in clauses with lists.Alexey Bataev2016-03-311-2/+2
| | | | | | Compatibility fix for better compatibility with the existing software. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265003 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.Alexey Bataev2016-03-171-10/+10
| | | | | | | | OpenMP 4.0 allows to define custom reduction operations using '#pragma omp declare reduction' construct. Patch allows to use this custom defined reduction operations in 'reduction' clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263701 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.5] Allow arrays in 'reduction' clause.Alexey Bataev2016-01-261-6/+6
| | | | | | | OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258804 91177308-0d34-0410-b5e6-96231b3b80d8
* [Lit Test] Updated 34 Lit tests to be C++11 compatible.Charles Li2015-11-171-0/+5
| | | | | | | Added expected diagnostics new to C++11. Expanded RUN line to: default, C++98/03 and C++11. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253371 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause.Alexey Bataev2015-10-081-0/+18
| | | | | | | OpenMP 4.1 adds support for array sections/subscripts in 'reduction' clause. Patch adds codegen for this feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249672 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.1] Sema analysis for array sections in 'reduction' clause.Alexey Bataev2015-09-301-16/+16
| | | | | | | OpenMP 4.1 allows to use array sections|subscript expressions in 'reduction' clauses. Added sema analysis, updated tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248880 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow static local variables specified on data-sharing attribute clauses.Kelvin Li2015-09-151-0/+4
| | | | | | | http://reviews.llvm.org/D11619 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247715 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev2015-05-201-1/+1
| | | | | | | | -fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237769 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix for checking of data-sharing attributes for canonical var decls ↵Alexey Bataev2015-04-161-0/+12
| | | | | | | | | | | | | only. Currently checks for active data-sharing attributes for variables are performed for found var decls. Instead these checks must be performed for canonical decls of these variables to avoid possible troubles with with the differently qualified re-declarations of the same variable, for example: namespace A { int x; } namespace B { using A::x; } Both A::x and B::x actually reference the same object A::x and this fact must be taken into account during data-sharing attributes analysis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235096 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for 'reduction' clause in 'parallel' directive.Alexey Bataev2015-04-101-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit a code for reduction clause. Next code should be emitted for reductions: static kmp_critical_name lock = { 0 }; void reduce_func(void *lhs[<n>], void *rhs[<n>]) { ... *(Type<i> *)lhs[i] = RedOp<i>(*(Type<i> *)lhs[i], *(Type<i> *)rhs[i]); ... } ... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n> - 1]}; switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) { case 1: ... <LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i]); ... __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>); break; case 2: ... Atomic(<LHSExprs>[i] = RedOp<i>(*<LHSExprs>[i], *<RHSExprs>[i])); ... break; default: ; } Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation. Differential Revision: http://reviews.llvm.org/D8915 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234583 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improved diagnostic messages for vars with the predetermined data ↵Alexey Bataev2014-06-191-1/+1
| | | | | | sharing attributes and reformatting git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211262 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-181-0/+350
| | | | | | MSVC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211140 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-171-350/+0
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211113 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-171-0/+350
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211096 91177308-0d34-0410-b5e6-96231b3b80d8