summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [OpenMP] Parsing and sema support for num_teams clauseKelvin Li2015-11-241-0/+33
| | | | | | http://reviews.llvm.org/D14802 llvm-svn: 254019
* [OpenMP] Parsing and sema support for map clauseKelvin Li2015-11-231-4/+222
| | | | | | http://reviews.llvm.org/D14134 llvm-svn: 253849
* [coroutines] Add overloaded unary 'operator co_await'.Richard Smith2015-10-221-0/+1
| | | | llvm-svn: 250991
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* [OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause.Alexey Bataev2015-10-081-55/+88
| | | | | | OpenMP 4.1 adds support for array sections/subscripts in 'reduction' clause. Patch adds codegen for this feature. llvm-svn: 249672
* SourceRanges are small and trivially copyable, don't them by reference.Craig Topper2015-10-041-3/+2
| | | | llvm-svn: 249259
* [OpenMP] Capture global variables in target regions.Samuel Antao2015-10-021-0/+52
| | | | | | | | | All global variables that are not enclosed in a declare target region must be captured in the target region as local variables do. Currently, there is no support for declare target, so this patch adds support for capturing all the global variables used in a the target region. llvm-svn: 249154
* [OPENMP 4.1] Sema analysis for array sections in 'reduction' clause.Alexey Bataev2015-09-301-67/+112
| | | | | | OpenMP 4.1 allows to use array sections|subscript expressions in 'reduction' clauses. Added sema analysis, updated tests. llvm-svn: 248880
OpenPOWER on IntegriCloud