summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r262741 - [OPENMP] Codegen for distribute directiveSamuel Antao2016-03-041-239/+0
| | | | | | Was causing a failure in one of the buildbot slaves. llvm-svn: 262744
* [OPENMP] Codegen for distribute directiveCarlo Bertolli2016-03-041-0/+239
| | | | | | | | This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling. http://reviews.llvm.org/D17170 llvm-svn: 262741
* [OPENMP 4.0] Codegen for 'declare reduction' construct.Alexey Bataev2016-03-043-2/+330
| | | | | | | Emit function for 'combiner' part of 'declare reduction' construct and 'initialilzer' part, if any. llvm-svn: 262699
* [OPENMP] firstprivate and private clauses of teams, host codegenerationCarlo Bertolli2016-03-032-0/+587
| | | | | | | | Add code generation support for firstprivate and private clauses of teams on the host. Add extensive regression tests including lambda functions and vla testing. http://reviews.llvm.org/D17582 llvm-svn: 262663
* Add code generation for teams directive inside target regionCarlo Bertolli2016-03-031-0/+132
| | | | llvm-svn: 262652
* [OpenMP] Code generation for teams - kernel launchingSamuel Antao2016-03-031-0/+210
| | | | | | | | | | | | | | | Summary: This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive. The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch. Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev Subscribers: cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D17019 llvm-svn: 262625
* [OPENMP 4.0] Initial support for 'omp declare reduction' construct.Alexey Bataev2016-03-034-0/+269
| | | | | | | | | | | | | | | | | Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct. User-defined reductions are defined as #pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )] These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting combined value after executing the combiner. As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced. Differential Revision: http://reviews.llvm.org/D11182 llvm-svn: 262582
* [OPENMP 4.5] Initial support for data members in 'linear' clause.Alexey Bataev2016-03-036-7/+27
| | | | | | | | OpenMP 4.5 allows to privatize data members of current class in member functions. Patch adds initial support for privatization of data members in 'linear' clause, no codegen support. llvm-svn: 262578
* [OPENMP 4.5] Codegen for data members in 'reduction' clause.Alexey Bataev2016-03-022-3/+185
| | | | | | | | OpenMP 4.5 allows to privatize non-static data members of current class in non-static member functions. Patch supports codegen for non-static data members in 'reduction' clauses. llvm-svn: 262460
* [OPENMP 4.5] Initial support for data members in 'reduction' clauses.Alexey Bataev2016-02-291-0/+22
| | | | | | | | OpenMP 4.5 allows to privatize non-static data members of current class in non-static member functions. Patch adds initial parsing/semantic analysis for data members support in 'reduction' clauses. llvm-svn: 262199
* [OpenMP] Fix parsing of delete map clause modifier in C++ mode.Samuel Antao2016-02-273-0/+18
| | | | | | | | | | | | Summary: The map modifier 'delete' is parser in c++ mode as a delete keyword, which requires special handling in the map clause parsing. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17629 llvm-svn: 262094
* [OPENMP 4.5] Codegen for member decls in 'lastprivate' clause.Alexey Bataev2016-02-252-3/+217
| | | | | | | | | OpenMP 4.5 allows to privatize non-static member decls in non-static member functions. Patch captures such decls by reference in general (for bitfields, by value) and then operates with this capture. For bitfields, at the end of codegen for lastprivates original bitfield is updated with the value of captured copy. llvm-svn: 261824
* [OPENMP 4.5] Support fielddecls in 'shared' clause.Alexey Bataev2016-02-251-2/+19
| | | | | | | | OpenMP 4.5 allows to use non-static data members of current class in non-static member functions in different kind of clauses. Patch adds support for data members in 'shared' clause. llvm-svn: 261820
* [OPENMP 4.5] Initial support for data members in 'lastprivate' clause.Alexey Bataev2016-02-202-2/+19
| | | | | | | | OpenMP 4.5 allows to privatize non-static data members of current class in non-static member functions. Patch adds initial support for data members. llvm-svn: 261412
* [OPENMP] Fix codegen for lastprivate loop counters.Alexey Bataev2016-02-181-13/+2
| | | | | | | Patch fixes bug with codegen for lastprivate loop counters. Also it may improve performance for lastprivates calculations in some cases. llvm-svn: 261209
* [OPENMP] Fix tests incompatibility with ARM buildbots.Alexey Bataev2016-02-172-2/+2
| | | | llvm-svn: 261098
* [OPENMP 4.5] Codegen support for data members in 'firstprivate' clause.Alexey Bataev2016-02-171-1/+167
| | | | | | Added codegen for captured data members in non-static member functions. llvm-svn: 261089
* [OPENMP] Fix handling loop-based directives with arrays.Alexey Bataev2016-02-171-0/+12
| | | | | | | Patch fixes possible problems with correct handling arrays as expressions in initialization, conditions etc in loop-based constructs. llvm-svn: 261080
* [OPENMP] Allow to use compound assignment operators.Alexey Bataev2016-02-161-0/+17
| | | | | | Loop-based directives allow to use iterators as loop counters. Iterators are allowed to define their own operators. This patch allows to use compound assignment operators for iterators. llvm-svn: 260957
* [OPENMP] Improved handling of pseudo-captured expressions in OpenMP.Alexey Bataev2016-02-161-2/+2
| | | | | | | | Expressions inside 'schedule'|'dist_schedule' clause must be captured in combined directives to avoid possible crash during codegen. Patch improves handling of such constructs llvm-svn: 260954
* [OPENMP] Remove extra sync barriers for 'firstprivate' clause.Alexey Bataev2016-02-154-23/+14
| | | | | | | Sync barrier will be emitted after generation of firstprivate variables only if one of the firstprivate vars is used in lastprivate clause. llvm-svn: 260877
* [OpenMP] Rename the offload entry points.Samuel Antao2016-02-132-36/+36
| | | | | | | | | | | | | | | Summary: Unlike other outlined regions in OpenMP, offloading entry points have to have be visible (external linkage) for the device side. Using dots in the names of the entries can be therefore problematic for some toolchains, e.g. NVPTX. Also the patch drops the column information in the unique name of the entry points. The parsing of directives ignore unknown tokens, preventing several target regions to be implemented in the same line. Therefore, the line information is sufficient for the name to be unique. Also, the preprocessor printer does not preserve the column information, causing offloading-entry detection issues if the host uses an integrated preprocessor and the target doesn't (or vice versa). Reviewers: hfinkel, arpith-jacob, carlo.bertolli, kkwli0, ABataev Subscribers: cfe-commits, fraggamuffin, caomhin Differential Revision: http://reviews.llvm.org/D17179 llvm-svn: 260837
* Add parse+sema and regression test for OpenMP firstprivate clause of target ↵Carlo Bertolli2016-02-111-0/+196
| | | | | | directive llvm-svn: 260581
* [OPENMP 4.5] Initial support for data members in 'firstprivate' clause.Alexey Bataev2016-02-101-0/+17
| | | | | | | 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-0/+5
| | | | llvm-svn: 260370
* [OPENMP] Fix test incompatibility with arm buildbots.Alexey Bataev2016-02-091-2/+3
| | | | llvm-svn: 260220
* [OPENMP] Allow to reference threadprivate variable in same directive.Alexey Bataev2016-02-091-1/+1
| | | | llvm-svn: 260213
* Re-apply for the 2nd-time r259977 - [OpenMP] Reorganize code to allow ↵Samuel Antao2016-02-081-0/+3
| | | | | | | | specialized code generation for different devices. This was reverted by r260036, but was not the cause of the problem in the buildbot. llvm-svn: 260106
* clang/test/OpenMP/parallel_private_codegen.cpp: Fix an expression.NAKAMURA Takumi2016-02-081-1/+1
| | | | | | | | | | call x86_thiscallcc void @_ZN2SSC1ERi( It matched to: <call> x86_this<callcc void @_ZN2SSC1ERi(> llvm-svn: 260093
* [OPENMP] Fix test incompatibility with arm buildbotsAlexey Bataev2016-02-081-2/+2
| | | | llvm-svn: 260092
* [OPENMP] Fixed test incompat with MSVCAlexey Bataev2016-02-081-1/+1
| | | | llvm-svn: 260091
* [OPENMP 4.5] Ccapture/codegen of private non-static data members.Alexey Bataev2016-02-081-0/+160
| | | | | | | 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
* Revert "Re-apply r259977 - [OpenMP] Reorganize code to allow specialized ↵Renato Golin2016-02-071-3/+0
| | | | | | | | code generation for different devices." This reverts commit r259985, as it still fails one buildbot. llvm-svn: 260036
* Re-apply r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-061-0/+3
| | | | | | | | generation for different devices. This was reverted due to a failure in a buildbot, but it turned out the failure was unrelated. llvm-svn: 259985
* Revert r259977 - [OpenMP] Reorganize code to allow specialized code ↵Samuel Antao2016-02-061-3/+0
| | | | | | | | generation for different devices. It triggered some problem in the configuration related with zlib and exposed in the driver. llvm-svn: 259984
* [OpenMP] Reorganize code to allow specialized code generation for different ↵Samuel Antao2016-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | devices. Summary: Different devices may in some cases require different code generation schemes in order to implement OpenMP. This is required not only for performance reasons, but also because it may not be possible to have the current (default) implementation working for these devices. E.g. GPU's cannot implement the same scheme a target such as powerpc or x86b would use, in the sense that it does not have the ability to fork threads, instead all the threads are always executing and need to be managed by the implementation. This patch proposes a reorganization of the code in the OpenMP code generation to pave the way to have specialized implementation of OpenMP support. More than a "real" patch this is more a request for comments in order to understand if what is proposed is acceptable or if there are better/easier ways to do it. In this patch part of the common OpenMP codegen infrastructure is moved to a new file under a new namespace (CGOpenMPCommon) so it can be shared between the default implementation and the specialized one. When CGOpenMPRuntime is created, an attempt to select a specialized implementation is done. In the patch a specialization for nvptx targets is done which currently checks if the target is an OpenMP device and trap if it is not. Let me know comments suggestions you may have. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: Hahnfeld, cfe-commits, fraggamuffin, caomhin, jholewinski Differential Revision: http://reviews.llvm.org/D16784 llvm-svn: 259977
* [OPENMP 4.0] Fixed support of array sections/array subscripts.Alexey Bataev2016-02-042-6/+147
| | | | | | 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-0322-0/+4213
| | | | | | | | | | | 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
* [OPENMP 4.0] Allow to use 'omp simd' directive inside other simd-regions.Alexey Bataev2016-02-021-6/+6
| | | | llvm-svn: 259465
* [OpenMP] Prevent nesting of target constructs within target code execution ↵Arpith Chacko Jacob2016-02-0219-56/+365
| | | | | | | | | | | | | | | | | | 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-0119-365/+56
| | | | | | > http://reviews.llvm.org/D16758 llvm-svn: 259418
* [OpenMP] Prevent nesting of target constructs within target code execution ↵Arpith Chacko Jacob2016-02-0119-56/+365
| | | | | | | | | | | | | | | | | | 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-2616-0/+1932
| | | | | | | | | | | | | 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-262-0/+69
| | | | | | | | | | | 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-2610-54/+249
| | | | | | OpenMP 4.5, alogn with array sections, allows to use variables of array type in reductions. llvm-svn: 258804
* [OpenMP] Remove '#if 1' hanging in target_map_messages.cpp. Samuel Antao2016-01-221-8/+0
| | | | llvm-svn: 258550
* [OpenMP] Update map clause SEMA to support OpenMP 4.5 possible list items.Samuel Antao2016-01-221-69/+255
| | | | | | | | | | | | | | | | | 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] Sema for depend clause on target exit data directive.Arpith Chacko Jacob2016-01-222-1/+231
| | | | | | | | | | | Summary: Accept depend clause on target exit data directive in sema and add test cases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16401 llvm-svn: 258502
* [OPENMP] Generalize codegen for 'sections'-based directive.Alexey Bataev2016-01-228-60/+78
| | | | | | If 'sections' directive has only one sub-section, the code for 'single'-based directive was emitted. Removed this codegen, because it causes crashes in different cases. llvm-svn: 258495
* [OpenMP] Sema for depend clause on target enter data directive.Arpith Chacko Jacob2016-01-222-1/+231
| | | | | | | | | | | Summary: Accept depend clause on target enter data directive in sema and add test cases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16400 llvm-svn: 258466
OpenPOWER on IntegriCloud