summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.Alexey Bataev2016-02-111-40/+37
| | | | | | | | OMPCapturedExprDecl allows caopturing not only of fielddecls, but also other expressions. It also allows to simplify codegen for several clauses. llvm-svn: 260492
* [OPENMP 4.5] Initial support for data members in 'firstprivate' clause.Alexey Bataev2016-02-101-76/+73
| | | | | | | OpenMP 4.5 allows privatization of non-static data members of current class in non-static member functions. llvm-svn: 260374
* Fix PR26543: add a check for definition in CXXRecordDecl.Alexey Bataev2016-02-101-1/+2
| | | | llvm-svn: 260370
* [OPENMP] Allow to use the variable in the same 'threadprivate'Alexey Bataev2016-02-091-3/+0
| | | | | | directive. llvm-svn: 260215
* Do not mark variable as threadprivate if it was marked already.Alexey Bataev2016-02-091-0/+3
| | | | llvm-svn: 260214
* [OPENMP] Allow to reference threadprivate variable in same directive.Alexey Bataev2016-02-091-2/+8
| | | | llvm-svn: 260213
* [OPENMP 4.5] Ccapture/codegen of private non-static data members.Alexey Bataev2016-02-081-19/+75
| | | | | | | OpenMP 4.5 introduces privatization of non-static data members of current class in non-static member functions. To correctly handle such kind of privatization a new (pseudo)declaration VarDecl-based node is added. It allows to reuse an existing code for capturing variables in Lambdas/Block/Captured blocks of code for correct privatization and codegen. llvm-svn: 260077
* [OPENMP 4.0] Fixed support of array sections/array subscripts.Alexey Bataev2016-02-041-5/+10
| | | | | | Codegen for array sections/array subscripts worked only for expressions with arrays as base. Patch fixes codegen for bases with pointer/reference types. llvm-svn: 259776
* [OpenMP] Parsing + sema for target parallel for directive.Arpith Chacko Jacob2016-02-031-2/+159
| | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel for directive along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16759 llvm-svn: 259654
* Reduce initial Sema memory consumption by 400KB. By Elisavet Sakellari.Axel Naumann2016-02-031-1/+1
| | | | llvm-svn: 259637
* [OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.Alexey Bataev2016-02-021-5/+6
| | | | llvm-svn: 259465
* [OpenMP] Prevent nesting of target constructs within target code execution ↵Arpith Chacko Jacob2016-02-021-13/+35
| | | | | | | | | | | | | | | | | | 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
* Undoing commit r259366 to debug buildbot failure.Arpith Chacko Jacob2016-02-011-37/+13
| | | | | | > http://reviews.llvm.org/D16758 llvm-svn: 259418
* [OpenMP] Prevent nesting of target constructs within target code execution ↵Arpith Chacko Jacob2016-02-011-13/+37
| | | | | | | | | | | | | | | | | | 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
* [OpenMP] Parsing + sema for target parallel directive.Arpith Chacko Jacob2016-01-261-2/+86
| | | | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel directive and its clauses along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16553 Rebased to current trunk and updated test cases. llvm-svn: 258832
* [OpenMP] Parsing + sema for defaultmap clause.Arpith Chacko Jacob2016-01-261-0/+41
| | | | | | | | | | | Summary: This patch adds parsing + sema for the defaultmap clause associated with the target directive (among others). Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16527 llvm-svn: 258817
* [OPENMP 4.5] Allow arrays in 'reduction' clause.Alexey Bataev2016-01-261-17/+7
| | | | | | OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions. llvm-svn: 258804
* SemaOpenMP.cpp: Fix a warning in r258543. [-Wunused-variable]NAKAMURA Takumi2016-01-231-0/+1
| | | | llvm-svn: 258598
* [OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.Samuel Antao2016-01-221-97/+467
| | | | | | | | | | | | | | | | | Summary: Extend support in the map clause SEMA for the expressions supported in the OpenMP 4.5 specification, namely member expressions. Fix some bugs in the previous implementation of SEMA related with expressions that do not consist of single variable references. Fix bug in parsing when the expression in the map clause do not start with an identifier: accept any expression in the map clause and check for validity in SEMA instead of just ignoring it. Reviewers: hfinkel, kkwli0, arpith-jacob, carlo.bertolli, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D16385 llvm-svn: 258543
* [OpenMP] Check for at least one map clause on target data directive.Arpith Chacko Jacob2016-01-211-0/+8
| | | | | | | | | | | | | | Summary: Adds the following restriction in the OpenMP specifications. OpenMP [2.10.1, Restrictions, p. 97] At least one map clause must appear on the directive. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16341 llvm-svn: 258425
* [OPENMP 4.5] Allow to use non-static data members in non-static member ↵Alexey Bataev2016-01-201-136/+215
| | | | | | | | functions in 'private' clause. OpenMP 4.5 allows to use non-static members of current class in non-static member functions in 'private' clause. Patch adds initial support for privatizing data members. llvm-svn: 258299
* [OpenMP] Detect implicit map type to report unspecified map type for target ↵Samuel Antao2016-01-191-15/+18
| | | | | | | | | | | | | | | | | | | | enter/exit data directives. Support for the following OpenMP 4.5 restriction on 'target enter data' and 'target exit data': - A map-type must be specified in all map clauses. I have to save 'IsMapTypeImplicit' when parsing a map clause to support this constraint and for more informative error messages. This helps me support the following case: #pragma omp target enter data map(r) // expected-error {{map type must be specified for '#pragma omp target enter data'}} and distinguish it from: #pragma omp target enter data map(tofrom: r) // expected-error {{map type 'tofrom' is not allowed for '#pragma omp target enter data'}} Patch by Arpith Jacob. Thanks! llvm-svn: 258179
* [OpenMP] Parsing + sema for "target exit data" directive.Samuel Antao2016-01-191-0/+78
| | | | | | Patch by Arpith Jacob. Thanks! llvm-svn: 258177
* [OpenMP] Parsing + sema for "target enter data" directive.Samuel Antao2016-01-191-3/+93
| | | | | | Patch by Arpith Jacob. Thanks! llvm-svn: 258165
* Activate OpenMP private clause for target construct and a regression test.Carlo Bertolli2016-01-191-1/+1
| | | | llvm-svn: 258140
* OpaquePtr: Use nullptr construction for DeclGroupPtrTy OpaquePtr typedefDavid Blaikie2016-01-151-1/+1
| | | | llvm-svn: 257956
* Add OpenMP dist_schedule clause to distribute directive and related ↵Carlo Bertolli2016-01-151-0/+61
| | | | | | regression tests. llvm-svn: 257917
* [OPENMP 4.5] Allow 'ordered' clause on 'loop simd' constructs.Alexey Bataev2015-12-301-0/+7
| | | | | | OpenMP 4.5 allows to use 'ordered' clause without parameter on 'loop simd' constructs. llvm-svn: 256639
* [OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.Alexey Bataev2015-12-281-92/+135
| | | | | | | | | OpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size]) Where kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’. OpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size]) Modifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’. llvm-svn: 256487
* [OPENMP 4.5] Do not allow 'linear' clause along with 'ordered(expr)' clause.Alexey Bataev2015-12-281-0/+15
| | | | | | According to OpenMP 4.5 "A linear clause or an ordered clause with a parameter can be specified on a loop directive but not both."" llvm-svn: 256485
* [OPENMP] Do not allow to use threadprivate or thread local variables as loop ↵Alexey Bataev2015-12-251-6/+4
| | | | | | | | iteration variables. According to OpenMP the loop iteration variable may not appear in a threadprivate directive. llvm-svn: 256417
* [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.Alexey Bataev2015-12-231-58/+193
| | | | | | OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause. llvm-svn: 256330
* [OPENMP] Revert r256238 to fix the problem with tests on Linux.Alexey Bataev2015-12-221-181/+43
| | | | llvm-svn: 256239
* [OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.Alexey Bataev2015-12-221-43/+181
| | | | | | OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause. llvm-svn: 256238
* [OPENMP 4.5] Parsing/sema analysis for 'depend(source)' clause in 'ordered' ↵Alexey Bataev2015-12-181-23/+58
| | | | | | | | 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. llvm-svn: 255986
* [OPENMP] Fix for http://llvm.org/PR25142: openmp: Assertion failed: DD && ↵Alexey Bataev2015-12-171-0/+6
| | | | | | | | "queried property of class with no definition", file AST/DeclCXX.h Added processing for template specialization during data-sharing attributes analysis llvm-svn: 255879
* [OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.Alexey Bataev2015-12-151-9/+84
| | | | | | OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255625
* Add parse and sema of OpenMP distribute directive with all clauses except ↵Carlo Bertolli2015-12-141-9/+164
| | | | | | dist_schedule llvm-svn: 255498
* [OPENMP] Fixed processing of predetermined data-sharing attributesAlexey Bataev2015-12-101-33/+17
| | | | | | Predetermined data-shared attributes for local variables are now considered as implicit. Also, patch prohibits changin of DSA for static memebers of classes. llvm-svn: 255229
* Revert r255001, "Add parse and sema for OpenMP distribute directive and all ↵NAKAMURA Takumi2015-12-091-164/+9
| | | | | | | | its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. llvm-svn: 255094
* [OPENMP 4.5] Parsing/sema for 'num_tasks' clause.Alexey Bataev2015-12-081-0/+60
| | | | | | OpenMP 4.5 adds directives 'taskloop' and 'taskloop simd'. These directives support clause 'num_tasks'. Patch adds parsing/semantic analysis for this clause. llvm-svn: 255008
* Add parse and sema for OpenMP distribute directive and all its clauses ↵Carlo Bertolli2015-12-081-9/+164
| | | | | | excluding dist_schedule. llvm-svn: 255001
* [OPENMP 4.5] parsing/sema support for 'grainsize' clause.Alexey Bataev2015-12-071-0/+23
| | | | | | OpenMP 4.5 adds 'taksloop' and 'taskloop simd' directives, which have 'grainsize' clause. Patch adds parsing/sema analysis of this clause. llvm-svn: 254903
* [OPENMP 4.5] parsing/sema support for 'nogroup' clause.Alexey Bataev2015-12-071-0/+12
| | | | | | OpenMP 4.5 adds 'taskloop' and 'taskloop simd' directives. These directives have new 'nogroup' clause. Patch adds basic parsing/sema support for this clause. llvm-svn: 254899
* [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.Alexey Bataev2015-12-031-12/+97
| | | | | | OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses. llvm-svn: 254597
* [OpenMP] Update target directive codegen to use 4.5 implicit data mappings.Samuel Antao2015-12-021-1/+104
| | | | | | | | | | | | | | | Summary: This patch implements the 4.5 specification for the implicit data maps. OpenMP 4.5 specification changes the default way data is captured into a target region. All the non-aggregate kinds are passed by value by default. This required activating the capturing by value during SEMA for the target region. All the non-aggregate values that can be encoded in the size of a pointer are properly casted and forwarded to the runtime library. On top of fixing the previous weird behavior for mapping pointers in nested data regions (an explicit map was always required), this also improves performance as the number of allocations/transactions to the device per non-aggregate map are reduced from two to only one - instead of passing a reference and the value, only the value passed. Explicit maps will be added later on once firstprivate, private, and map clauses' SEMA and parsing are available. Reviewers: hfinkel, rjmccall, ABataev Subscribers: cfe-commits, carlo.bertolli Differential Revision: http://reviews.llvm.org/D14940 llvm-svn: 254521
* [OPENMP 4.5] Parsing/sema analysis for 'priority' clause.Alexey Bataev2015-12-011-9/+39
| | | | | | OpenMP 4.5 defines new clause 'priority' for 'task', 'taskloop' and 'taskloop simd' directives. Added parsing and sema analysis for 'priority' clause in 'task' and 'taskloop' directives. llvm-svn: 254398
* [OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.Alexey Bataev2015-12-011-12/+102
| | | | | | Adds initial parsing and semantic analysis for 'taskloop' directive. llvm-svn: 254367
* [OpenMP] Parsing and sema support for thread_limit clause.Kelvin Li2015-11-271-51/+58
| | | | | | http://reviews.llvm.org/D15029 llvm-svn: 254207
* [OPENMP 4.5] Fixed rules for 'ordered' clause.Alexey Bataev2015-11-261-10/+16
| | | | | | According to OpenMP 4.5 the parameter of 'ordered' clause must be greater than or equal to the parameter of 'collapse' clause. Patch adds this rule. llvm-svn: 254141
OpenPOWER on IntegriCloud