Commit Graph

13 Commits

Author SHA1 Message Date
Alexey Bataev a914888b49 [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
NFC.

llvm-svn: 365334
2019-07-08 15:45:24 +00:00
Alexey Bataev e04483ee35 [OPENMP]Initial support for 'allocate' clause.
Added parsing/sema analysis of the allocate clause.

llvm-svn: 357068
2019-03-27 14:14:31 +00:00
Joel E. Denny e6234d1429 [OpenMP] Replace predetermined shared for const variable
The following appears in OpenMP 3.1 sec. 2.9.1.1 as a predetermined
data-sharing attribute:

> Variables with const-qualified type having no mutable member are
> shared.

It does not appear in OpenmP 4.0, 4.5, or 5.0.  This patch removes the
implementation of that attribute when the requested OpenMP version is
greater than 3.1.

One effect of that removal is that `default(none)` affects const
variables without mutable members.

Also, without this patch, if a const variable without mutable members
was explicitly lastprivate or private, it was an error because it was
predetermined shared.  Now, clang instead complains that it's const
without mutable fields, which is a more intelligible diagnostic.  That
should be fine for all of the above versions because they all have
something like the following, which is quoted from OpenMP 5.0
sec. 2.19.3:

> A variable that is privatized must not have a const-qualified type
> unless it is of class type with a mutable member. This restriction does
> not apply to the firstprivate clause.

reduction and linear clauses already have separate checks for const
variables.  Future patches will merge the implementations.

Reviewed By: ABataev

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

llvm-svn: 350439
2019-01-04 22:11:31 +00:00
Alexey Bataev a8a9153a37 [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.

llvm-svn: 321560
2017-12-29 18:07:07 +00:00
Alexey Bataev effbdf1604 [OPENMP] Simplify analysis of data-sharing attributes.
llvm-svn: 308759
2017-07-21 17:24:30 +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
Arpith Chacko Jacob 3d58f26929 [OpenMP] Prevent nesting of target constructs within target code execution regions.
Summary:
This patch enhances Sema to check for the following restriction:

OpenMP 4.5 [2.17 Nesting of Regions]
If a target, target update, target data, target enter data, or
target exit data construct is encountered during execution of a
target region, the behavior is unspecified.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16758

llvm-svn: 259464
2016-02-02 04:00:47 +00:00
Arpith Chacko Jacob d8da15f8a9 Undoing commit r259366 to debug buildbot failure.
> http://reviews.llvm.org/D16758

llvm-svn: 259418
2016-02-01 22:02:05 +00:00
Arpith Chacko Jacob f1958627d9 [OpenMP] Prevent nesting of target constructs within target code execution regions.
Summary:
This patch enhances Sema to check for the following restriction:

OpenMP 4.5 [2.17 Nesting of Regions]
If a target, target update, target data, target enter data, or
target exit data construct is encountered during execution of a
target region, the behavior is unspecified.

Reviewers: ABataev

Differential Revision: http://reviews.llvm.org/D16758

llvm-svn: 259366
2016-02-01 16:32:47 +00:00
Carlo Bertolli 6200a3d0f3 Add parse and sema of OpenMP distribute directive with all clauses except dist_schedule
llvm-svn: 255498
2015-12-14 14:51:25 +00:00
NAKAMURA Takumi 2d5c6ddf74 Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule."
It causes memory leak. Some tests in test/OpenMP would fail.

llvm-svn: 255094
2015-12-09 04:35:57 +00:00
Carlo Bertolli b9bfa75b28 Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule.
llvm-svn: 255001
2015-12-08 04:21:03 +00:00