Commit Graph

12 Commits

Author SHA1 Message Date
Alexey Bataev 1ed95d8460 [OPENMP] Fix PR38398: compiler crash on standalone pragma ordered with depend sink|source clause.
Patch fixes compiler crash on standalone #pragmas ordered with
depend(sink|source) clauses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325302 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-15 22:42:57 +00:00
Alexey Bataev 68d230359a [OPENMP] Support for -fopenmp-simd option with compilation of simd loops
only.

Added support for -fopenmp-simd option that allows compilation of
simd-based constructs without emission of OpenMP runtime calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-29 18:07:07 +00:00
Rachel Craik e4848b1ad3 [OpenMP] fix seg-faults printing diagnostics with invalid ordered(n) values
When the value specified for n in ordered(n) is larger than the number of loops a segmentation fault can occur in one of two ways when attempting to print out a diagnostic for an associated depend(sink : vec):
1) The iteration vector vec contains less than n items
2) The iteration vector vec contains a variable that is not a loop control variable
This patch addresses both of these issues.

Differential Revision: https://reviews.llvm.org/D38049


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313675 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19 21:04:23 +00:00
Charles Li b0192ce37e [Lit Test] Make tests C++11 compatible - OpenMP constant expressions
C++11 introduced constexpr, hence the change in diagnostics.

Differential Revision: https://reviews.llvm.org/D29480


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294025 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 18:58:34 +00:00
Alexey Bataev 41ac0e612d [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256330 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-23 10:27:45 +00:00
Alexey Bataev b42a67677c [OPENMP] Revert r256238 to fix the problem with tests on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256239 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 12:44:46 +00:00
Alexey Bataev 00fbd0ddc0 [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256238 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-22 12:21:47 +00:00
Alexey Bataev df1b33286d [OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(source)' clause for 'ordered' directive to support cross-iteration dependence. Patch adds parsing and semantic analysis for this construct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-18 05:05:56 +00:00
Alexey Bataev 552e1f3b9b [OPENMP 4.1] Add 'simd' clause for 'ordered' directive.
Parsing and sema analysis for 'simd' clause in 'ordered' directive.
Description
If the simd clause is specified, the ordered regions encountered by any thread will use only a single SIMD lane to execute the ordered
regions in the order of the loop iterations.
Restrictions
An ordered construct with the simd clause is the only OpenMP construct that can appear in the simd region



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248696 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-28 06:39:35 +00:00
Alexey Bataev b1fbc23058 [OPENMP 4.1] Add 'threads' clause for '#pragma omp ordered'.
OpenMP 4.1 extends format of '#pragma omp ordered'. It adds 3 additional clauses: 'threads', 'simd' and 'depend'.
If no clause is specified, the ordered construct behaves as if the threads clause had been specified. If the threads clause is specified, the threads in the team executing the loop region execute ordered regions sequentially in the order of the loop iterations.
The loop region to which an ordered region without any clause or with a threads clause binds must have an ordered clause without the parameter specified on the corresponding loop directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248569 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-25 10:37:12 +00:00
Alexey Bataev 4b96eb8f82 [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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237769 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-20 04:24:19 +00:00
Alexey Bataev 116c37cf11 [OPENMP] Initial parsing and sema analysis for 'ordered' directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213616 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-22 06:45:04 +00:00