summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/task_messages.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP ↵Alexey Bataev2019-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | programs. Summary: Some OpenMP clauses rely on the values of the variables. If the variable is not initialized and used in OpenMP clauses that depend on the variables values, it should be reported that the uninitialized variable is used in the OpenMP clause expression. This patch adds initial processing for uninitialized variables in OpenMP constructs. Currently, it checks for use of the uninitialized variables in the structured blocks. Reviewers: NoQ, Szelethus, dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet Subscribers: rnkovacs, guansong, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64356 llvm-svn: 365786
* [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,Alexey Bataev2019-07-081-2/+2
| | | | | | NFC. llvm-svn: 365334
* [OPENMP]Fix PR41768: check DSA for globals with default(none) clauses.Alexey Bataev2019-05-091-7/+7
| | | | | | | | If the default(none) was specified for the construct, we might miss diagnostic for the globals without explicitly specified data-sharing attributes. Patch fixes this problem. llvm-svn: 360362
* Revert "[OPENMP]Fix PR41768: check DSA for globals with `default(none)` ↵Roman Lebedev2019-05-091-7/+7
| | | | | | | | | | | | clauses." This has introduced (exposed?) a crash in clang sema, that does not happen without this patch. I'll followup in the original bugreport and commit with reproducer. This reverts commit r360061. llvm-svn: 360327
* [OPENMP]Fix PR41768: check DSA for globals with `default(none)` clauses.Alexey Bataev2019-05-061-7/+7
| | | | | | | | If the `default(none)` was specified for the construct, we might miss diagnostic for the globals without explicitly specified data-sharing attributes. Patch fixes this problem. llvm-svn: 360061
* Incorrect implicit data-sharing for nested tasksAlexey Bataev2019-01-091-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There is a minor issue in how the implicit data-sharings for nested tasks are computed. For the following example: ``` int x; #pragma omp task shared(x) #pragma omp task x++; ``` We compute an implicit data-sharing of shared for `x` in the second task although I think that it should be firstprivate. Below you can find the part of the OpenMP spec that covers this example: - // In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above and that in the enclosing context is determined to be shared by all implicit tasks bound to the current team is shared.// - //In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above is firstprivate.// Since each implicit-task has its own copy of `x`, we shouldn't apply the first rule. Reviewers: ABataev Reviewed By: ABataev Subscribers: cfe-commits, rogfer01 Tags: #openmp Differential Revision: https://reviews.llvm.org/D56430 llvm-svn: 350734
* [OPENMP]Fix PR39372: Does not complain about loop bound variable notAlexey Bataev2018-10-291-11/+11
| | | | | | | | | | | being shared. According to the standard, the variables with unspecified data-sharing attributes in presence of `default(none)` clause must be reported to users. Compiler did not generate error reports for the variables used in other OpenMP regions. Patch fixes this. llvm-svn: 345533
* [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 4.0] Use 'declare reduction' constructs in 'reduction' clauses.Alexey Bataev2016-03-171-6/+4
| | | | | | | | 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
* [OPENMP 4.1] Allow variables with reference types in private clauses.Alexey Bataev2015-08-181-20/+8
| | | | | | OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types. llvm-svn: 245268
* [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 llvm-svn: 237769
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-19/+29
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219306
* Revert commit r219297.Alexey Bataev2014-10-081-29/+19
| | | | | | Still troubles with OpenMP/parallel_firstprivate_codegen.cpp (now in ARM buildbots). llvm-svn: 219298
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-19/+29
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219297
* Revert back r219295.Alexey Bataev2014-10-081-29/+19
| | | | | | To fix issues with test OpenMP/parallel_firstprivate_codegen.cpp llvm-svn: 219296
* [OPENMP] Codegen for 'firstprivate' clause.Alexey Bataev2014-10-081-19/+29
| | | | | | | | This patch generates some helper variables that used as private copies of the corresponding original variables inside an OpenMP 'parallel' directive. These generated variables are initialized by copy using values of the original variables (with the copy constructor, if any). For arrays, initializator is generated for single element and in the codegen procedure this initial value is automatically propagated between all elements of the private copy. In outlined function, references to original variables are replaced by the references to these private helper variables. At the end of the initialization of the private variables an implicit barier is generated by calling __kmpc_barrier(...) runtime function to be sure that all threads were initialized using original values of the variables. Differential Revision: http://reviews.llvm.org/D5140 llvm-svn: 219295
* [OPENMP] Initial parsing and sema analysis of 'mergeable' clause.Alexey Bataev2014-07-171-0/+6
| | | | llvm-svn: 213262
* [OPENMP] Initial support for parsing and sema analysis of 'untied' clause.Alexey Bataev2014-07-171-0/+6
| | | | llvm-svn: 213257
* [OPENMP] Parsing and sema analysis for 'omp task' directive.Alexey Bataev2014-07-111-0/+263
llvm-svn: 212804
OpenPOWER on IntegriCloud