aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/OpenMPKinds.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10[OPENMP50]Support for acquire clause.Alexey Bataev1-1/+3
Added full support for acquire clause in flush|atomic directives.
2020-02-07[OPENMP50]Add parsing/sema for acq_rel clause.Alexey Bataev1-1/+16
Added basic support (representation + parsing/sema/(de)serialization) for acq_rel clause in flush/atomic directives.
2020-02-03[OPENMP50]Basic parsing/sema analysis for order(concurrent) clause.Alexey Bataev1-0/+18
Added parsing/sema/serialization support for order(concurrent) clause in loop|simd-based directives.
2019-12-26[OpenMP][NFCI] Use the libFrontend ProcBindKind in ClangJohannes Doerfert1-10/+8
This removes the OpenMPProcBindClauseKind enum in favor of llvm::omp::ProcBindKind which lives in OpenMPConstants.h and was introduced in D70109. No change in behavior is expected. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D70289
2019-12-24[OPENMP50]Basic support for conditional lastprivate.Alexey Bataev1-2/+15
Added parsing/sema checks for conditional lastprivates.
2019-12-17[OPENMP50]Add parsing/sema analysis for nontemporal clause.Alexey Bataev1-0/+5
Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives.
2019-12-11[OPENMP50]Add if clause in teams distribute simd directive.Alexey Bataev1-0/+2
According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
2019-12-10[OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.hJohannes Doerfert1-26/+2
Summary: The new OpenMPConstants.h is a location for all OpenMP related constants (and helpers) to live. This patch moves the directives there (the enum OpenMPDirectiveKind) and rewires Clang to use the new location. Initially part of D69785. Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim Subscribers: jholewinski, ppenzin, penzn, llvm-commits, cfe-commits, jfb, guansong, bollu, hiraditya, mgorny Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D69853
2019-12-06[OPENMP50]Add if clause in distribute simd directive.Alexey Bataev1-0/+2
According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
2019-12-05[OpenMP50] Add parallel master constructcchen1-0/+12
Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
2019-12-04Revert "[OpenMP50] Add parallel master construct, by Chi Chun Chen."Reid Kleckner1-12/+0
This reverts commit 713dab21e27c987b9114547ce7136bac2e775de9. Tests do not pass on Windows.
2019-12-04[OpenMP50] Add parallel master construct, by Chi Chun Chen.cchen1-0/+12
Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
2019-11-21[OPENMP50]Add if clause in for simd directive.Alexey Bataev1-0/+2
According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
2019-11-19[OPENMP50]Add if clause in simd directive.Alexey Bataev1-1/+4
According to OpenMP 5.0, if clause can be used in simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
2019-11-11[OPENMP50]Generalize handling of context matching/scoring.Alexey Bataev1-0/+43
Summary: Untie context matching/scoring from the attribute for declare variant directive to simplify future uses in other context-dependent directives. Reviewers: jdoerfert Subscribers: guansong, kkwli0, caomhin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69952
2019-10-30[OPENMP50]Add support for parallel master taskloop simd directive.Alexey Bataev1-4/+19
Added full support for parallel master taskloop simd directive.
2019-10-18[OPENMP50]Add support for master taskloop simd.Alexey Bataev1-2/+14
Added trsing/semantics/codegen for combined construct master taskloop simd. llvm-svn: 375255
2019-10-14[OPENMP50]Add support for 'parallel master taskloop' construct.Alexey Bataev1-3/+20
Added parsing/sema/codegen support for 'parallel master taskloop' constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final' and 'priority' are not supported in full, only constant expressions can be used currently in these clauses. llvm-svn: 374791
2019-10-10[OPENMP50]Support for 'master taskloop' directive.Alexey Bataev1-2/+15
Added full support for master taskloop directive. llvm-svn: 374437
2019-09-23[OPENMP]Use standard parsing for 'match' clause, NFC.Alexey Bataev1-1/+15
Reused standard clauses parsing scheme for parsing/matching 'match' clause in 'declare variant' directive. llvm-svn: 372635
2019-09-13[OPENMP5.0]Add basic support for declare variant directive.Alexey Bataev1-2/+3
Added basic support for declare variant directive and its match clause with user context selector. llvm-svn: 371892
2019-08-23[OPENMP5.0]Add support for device_type clause in declare targetAlexey Bataev1-0/+18
construct. OpenMP 5.0 introduced new clause for declare target directive, device_type clause, which may accept values host, nohost, and any. Host means that the function must be emitted only for the host, nohost - only for the device, and any - for both, device and the host. llvm-svn: 369775
2019-03-27[OPENMP]Initial support for 'allocate' clause.Alexey Bataev1-4/+2
Added parsing/sema analysis of the allocate clause. llvm-svn: 357068
2019-03-12[OPENMP 5.0]Initial support for 'allocator' clause.Alexey Bataev1-1/+12
Added parsing/sema analysis/serialization/deserialization for the 'allocator' clause of the 'allocate' directive. llvm-svn: 355952
2019-03-07[OPENMP 5.0]Add initial support for 'allocate' directive.Alexey Bataev1-0/+6
Added parsing/sema analysis/serialization/deserialization support for 'allocate' directive. llvm-svn: 355614
2019-03-06[clang][OpenMP] Revert "OMPFlushClause is synthetic, no such clause exists"Roman Lebedev1-2/+0
Summary: This reverts rL352390 / D57280. As discussed in https://reviews.llvm.org/D57112#inline-506781, 'flush' clause does not exist in the OpenMP spec, it can not be specified, and `OMPFlushClause` class is just a helper class. Now, here's the caveat. I have read @ABataev's > Well, I think it would be good to filter out OMPC_flush somehow > because there is no such clause actually, it is a pseudo clause > for better handling of the flush directive. as if that clause is pseudo clause that only exists for the sole purpose of simplifying the parser. As in, it never reaches AST. I did not however try to verify that. Too bad, i was wrong. It absolutely *does* reach AST. Therefore my understanding/justification for the change was flawed, which makes the patch a regression which **must** be reverted. @gribozavr has brought that up again in https://reviews.llvm.org/D57112#inline-521238 > > ... > Sorry to be late for this discussion, but I don't think this conclusion > follows. ASTMatchers are supposed to match the AST as it is. > Even if OMPC_flush is synthetic, it exists in the AST, and users might > want to match it. I think users would find anything else (trying to filter > out AST nodes that are not in the source code) to be surprising. For example, > there's a matcher materializeTemporaryExpr even though this AST node is a > Clang invention and is not a part of the C++ spec. > > Matching only constructs that appear in the source code is not feasible with > ASTMatchers, because they are based on Clang's AST that exposes tons of semantic > information, and its design is dictated by the structure of the semantic information. > See "RFC: Tree-based refactorings with Clang" in cfe-dev for a library that will > focus on representing source code as faithfully as possible. > > Not to even mention that this code is in ASTTypeTraits, a general library for > handling AST nodes, not specifically for AST Matchers... Reviewers: gribozavr, ABataev, rjmccall, aaron.ballman Reviewed By: gribozavr, ABataev Subscribers: dylanmckay, guansong, arphaman, jdoerfert, cfe-commits, gribozavr, ABataev Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D58979 llvm-svn: 355486
2019-02-25[OpenMP 5.0] Parsing/sema support for from clause with mapper modifier.Michael Kruse1-2/+18
This patch implements the parsing and sema support for the OpenMP 'from'-clause with potential user-defined mappers attached. User-defined mappers are a new feature in OpenMP 5.0. A 'from'-clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len]) struct S ss; #pragma omp target update from(mapper(id): ss) // use the mapper with name 'id' to map ss from device Contributed-by: Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D58638 llvm-svn: 354817
2019-02-22[OpenMP 5.0] Parsing/sema support for to clause with mapper modifier.Michael Kruse1-2/+18
This patch implements the parsing and sema support for OpenMP to clause with potential user-defined mappers attached. User defined mapper is a new feature in OpenMP 5.0. A to/from clause can have an explicit or implicit associated mapper, which instructs the compiler to generate and use customized mapping functions. An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(id: struct S s) map(s, s.d[0:s.len]) struct S ss; #pragma omp target update to(mapper(id): ss) // use the mapper with name 'id' to map ss to device Contributed-by: <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D58523 llvm-svn: 354698
2019-02-01[OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.Michael Kruse1-0/+11
This patch implements parsing and sema for "omp declare mapper" directive. User defined mapper, i.e., declare mapper directive, is a new feature in OpenMP 5.0. It is introduced to extend existing map clauses for the purpose of simplifying the copy of complex data structures between host and device (i.e., deep copy). An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(struct S s) map(s, s.d[0:s.len]) // Memory region that d points to is also mapped using this mapper. Contributed-by: Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D56326 llvm-svn: 352906
2019-01-28[clang][OpenMP] OMPFlushClause is synthetic, no such clause existsRoman Lebedev1-0/+2
Summary: As discussed in https://reviews.llvm.org/D57112#inline-506781, 'flush' clause does not exist in the OpenMP spec, it can not be specified, and `OMPFlushClause` class is just a helper class. Therefore `OPENMP_CLAUSE()` in `clang/Basic/OpenMPKinds.def` should not contain 'flush' "clause". I have simply removed the `OPENMP_CLAUSE(flush, OMPFlushClause)` from `clang/Basic/OpenMPKinds.def`, grepped for `OPENMP_CLAUSE` and added `OPENMP_CLAUSE(flush, OMPFlushClause)` back to the **every** place where `OPENMP_CLAUSE` is defined and `clang/Basic/OpenMPKinds.def` is then included. So as-is, this patch is a NFC. Possibly, some of these `OPENMP_CLAUSE(flush, OMPFlushClause)` should be dropped, i don't really know. Test plan: `ninja check-clang` Reviewers: ABataev Reviewed By: ABataev Subscribers: guansong, arphaman, cfe-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D57280 llvm-svn: 352390
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-12-18[OPENMP] parsing and sema support for 'close' map-type-modifierKelvin Li1-2/+9
A map clause with the close map-type-modifier is a hint to prefer that the variables are mapped using a copy into faster memory. Patch by Ahsan Saghir (saghir) Differential Revision: https://reviews.llvm.org/D55719 llvm-svn: 349551
2018-11-02Add support for 'atomic_default_mem_order' clause on 'requires' directive. ↵Patrick Lyster1-0/+16
Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 llvm-svn: 345967
2018-10-11Add support for 'dynamic_allocators' clause on 'requires' directive. ↵Patrick Lyster1-0/+2
Differential Revision: https://reviews.llvm.org/D53079 llvm-svn: 344249
2018-10-03[OPENMP] Add reverse_offload clause to requires directivePatrick Lyster1-0/+2
llvm-svn: 343711
2018-10-01Add support for unified_shared_memory clause on requires directivePatrick Lyster1-0/+2
llvm-svn: 343472
2018-09-26[OPENMP] Add support for OMP5 requires directive + unified_address clauseKelvin Li1-0/+13
Add support for OMP5.0 requires directive and unified_address clause. Patches to follow will include support for additional clauses. Differential Revision: https://reviews.llvm.org/D52359 llvm-svn: 343063
2018-05-09Remove \brief commands from doxygen comments.Adrian Prantl1-1/+1
This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
2018-01-15[OPENMP] Initial codegen for `target teams distribute parallel forAlexey Bataev1-1/+1
simd`. Added host codegen + codegen for devices with default codegen for `#pragma omp target teams distribute parallel for simd` directive. llvm-svn: 322515
2018-01-15[OPENMP] Add codegen for `depend` clauses on `target` directive.Alexey Bataev1-0/+4
Added basic support for codegen of `depend` clauses on `target` directive. llvm-svn: 322501
2018-01-03[OpenMP] Initial implementation of code generation for pragma 'target teams ↵Carlo Bertolli1-1/+5
distribute parallel for' on host https://reviews.llvm.org/D41709 This patch includes code generation and testing for offloading when target device is host. llvm-svn: 321759
2017-12-13[OPENMP] Initial codegen for `target teams distribute simd` directive.Alexey Bataev1-1/+1
Host + generic device codegen for `target teams distribute simd` directive. llvm-svn: 320608
2017-12-08[OPENMP] Initial codegen for `target teams distribute` directive.Alexey Bataev1-1/+1
Host + default devices codegen for `target teams distribute` directive. llvm-svn: 320149
2017-12-04[OpenMP] Initial implementation of code generation for pragma 'teams ↵Carlo Bertolli1-1/+1
distribute parallel for simd' on host https://reviews.llvm.org/D40795 This includes regression tests for all associated clauses. llvm-svn: 319696
2017-11-28[OPENMP] Generalize capturing of clauses expressions.Alexey Bataev1-7/+9
The handling and capturing of the non-constant expressions of some of the capturable clauses in combined directives is generalized. llvm-svn: 319227
2017-11-27[OPENMP] Codegen for `distribute parallel for simd` directive.Alexey Bataev1-1/+1
Added proper codegen for `distribute parallel for simd` directive. llvm-svn: 319078
2017-11-22[OPENMP] General improvement of code, NFC.Alexey Bataev1-11/+11
llvm-svn: 318849
2017-11-21[OPENMP] Initial support for asynchronous data update, NFC.Alexey Bataev1-3/+5
OpenMP 5.0 introduces asynchronous data update/dependecies clauses on target data directives. Patch adds initial support for outer task regions to use task-based codegen for future async target data directives. llvm-svn: 318781
2017-11-20[OpenMP] Initial implementation of code generation for pragma 'teams ↵Carlo Bertolli1-1/+4
distribute parallel for' on host https://reviews.llvm.org/D40187 This patch implements code gen for 'teams distribute parallel for' on the host, including all its clauses and related regression tests. llvm-svn: 318692
2017-11-17[OPENMP] Codegen for `target simd` construct.Alexey Bataev1-1/+3
Added codegen support for `target simd` directive. llvm-svn: 318536