David Sheinkman
92589990ba
[OpenMP] fix segfault when a variable referenced in reduction clause is a reference parameter\nDifferential Revision: http://reviews.llvm.org/D24524
...
llvm-svn: 283223
2016-10-04 14:41:36 +00:00
Alexey Bataev
c5970623e0
Revert "[OPENMP] Allow skip expression after comma in clauses with lists."
...
This reverts commit http://reviews.llvm.org/rL265003 . After some
thoughts decided to emit errors here.
llvm-svn: 265119
2016-04-01 08:43:42 +00:00
Alexey Bataev
05968174c3
[OPENMP] Allow skip expression after comma in clauses with lists.
...
Compatibility fix for better compatibility with the existing software.
llvm-svn: 265003
2016-03-31 09:13:44 +00:00
Alexey Bataev
a839dddf92
[OPENMP 4.0] Use 'declare reduction' constructs in 'reduction' clauses.
...
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.
llvm-svn: 263701
2016-03-17 10:19:46 +00:00
Alexey Bataev
1189bd0205
[OPENMP 4.5] Allow arrays in 'reduction' clause.
...
OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions.
llvm-svn: 258804
2016-01-26 12:20:39 +00:00
Charles Li
e7cbb3ed4f
[Lit Test] Updated 34 Lit tests to be C++11 compatible.
...
Added expected diagnostics new to C++11.
Expanded RUN line to: default, C++98/03 and C++11.
llvm-svn: 253371
2015-11-17 20:25:05 +00:00
Alexey Bataev
f24e7b1f60
[OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause.
...
OpenMP 4.1 adds support for array sections/subscripts in 'reduction' clause. Patch adds codegen for this feature.
llvm-svn: 249672
2015-10-08 09:10:53 +00:00
Alexey Bataev
a176421da5
[OPENMP 4.1] Sema analysis for array sections in 'reduction' clause.
...
OpenMP 4.1 allows to use array sections|subscript expressions in 'reduction' clauses. Added sema analysis, updated tests.
llvm-svn: 248880
2015-09-30 09:22:36 +00:00
Kelvin Li
4eea8c6b82
Allow static local variables specified on data-sharing attribute clauses.
...
http://reviews.llvm.org/D11619
llvm-svn: 247715
2015-09-15 18:56:58 +00:00
Alexey Bataev
db39021cee
[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492 )
...
-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
llvm-svn: 237769
2015-05-20 04:24:19 +00:00
Alexey Bataev
6ddfe1a6af
[OPENMP] Fix for checking of data-sharing attributes for canonical var decls 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.
llvm-svn: 235096
2015-04-16 13:49:42 +00:00
Alexey Bataev
794ba0dcb7
[OPENMP] Codegen for 'reduction' clause in 'parallel' directive.
...
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
llvm-svn: 234583
2015-04-10 10:43:45 +00:00
Alexey Bataev
7ff5524f7e
[OPENMP] Improved diagnostic messages for vars with the predetermined data sharing attributes and reformatting
...
llvm-svn: 211262
2014-06-19 09:13:45 +00:00
Alexey Bataev
f29276edb7
[OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with MSVC).
...
llvm-svn: 211140
2014-06-18 04:14:57 +00:00
Rafael Espindola
a566efbec9
Revert "[OPENMP] Initial support for '#pragma omp for'."
...
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
llvm-svn: 211113
2014-06-17 17:20:53 +00:00
Alexey Bataev
c77dd5257a
[OPENMP] Initial support for '#pragma omp for'.
...
llvm-svn: 211096
2014-06-17 11:49:22 +00:00