summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP]Improve handling of possibly incorrectly mapped types.Alexey Bataev2020-01-141-2/+18
| | | | | Need to analayze the type of the expression for mapping, not the type of the declaration.
* [OPENMP]Do not diagnose references to non-integral types for ref inAlexey Bataev2020-01-071-2/+2
| | | | | | declare simd. According to the standard, a list-item that appears in a linear clause without the ref modifier must be of integral or pointer type, or must be a reference to an integral or pointer type. Added check that this restriction is applied only to non-ref items.
* [OPENMP]Fix crash on error message for declare reduction.Alexey Bataev2020-01-031-1/+2
| | | | | If the qualified reduction name is specified and not found, the compiler may crash because of not specified parameter.
* [OpenMP] diagnose zero-length array section in the depend clauseKelvin Li2020-01-031-0/+16
| | | | | | | The OpenMP specification disallows having zero-length array sections in the depend clause (OpenMP 5.0 2.17.11). Differential Revision: https://reviews.llvm.org/D71969
* [OpenMP] Fix formatting of OpenMP error message, by Wang Tianqing.Alexey Bataev2020-01-021-3/+2
| | | | | | | | | | | | | | Summary: `getListOfPossibleValues()` formatted incorrectly when there is only one value, emitting something like `expected 'conditional' or in OpenMP clause 'lastprivate'`. Reviewers: jdoerfert, ABataev Reviewed By: jdoerfert Subscribers: guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71884
* [OpenMP][NFCI] Use the libFrontend ProcBindKind in ClangJohannes Doerfert2019-12-261-7/+7
| | | | | | | | | | | | 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
* [OPENMP]Add extra checks and initialization for clause modifier.Alexey Bataev2019-12-241-0/+8
| | | | | Added initialization of the extra modifier to silence sanitizer. Added extra checks to avoid such trouble in future.
* [OPENMP50]Basic support for conditional lastprivate.Alexey Bataev2019-12-241-17/+44
| | | | Added parsing/sema checks for conditional lastprivates.
* [OPENMP50]Codegen for nontemporal clause.Alexey Bataev2019-12-231-11/+35
| | | | | | | | | | | | | | | | Summary: Basic codegen for the declarations marked as nontemporal. Also, if the base declaration in the member expression is marked as nontemporal, lvalue for member decl access inherits nonteporal flag from the base lvalue. Reviewers: rjmccall, hfinkel, jdoerfert Subscribers: guansong, arphaman, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71708
* [OPENMP50]Add parsing/sema analysis for nontemporal clause.Alexey Bataev2019-12-171-7/+84
| | | | | Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives.
* [OPENMP50]Add if clause in target teams idistribute simd directive.Alexey Bataev2019-12-161-1/+3
| | | | | | 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.
* [OPENMP50]Add if clause in target teams distribute parallel for simd directive.Alexey Bataev2019-12-161-1/+9
| | | | | | 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.
* [OPENMP50]Improve checks for declare variant functions compatibility.Alexey Bataev2019-12-121-5/+48
| | | | | Added check for functions compatibility in C and removed restriction for functions with no prototypes in declare variant constrcut.
* [OPENMP50]Add if clause in teams distribute parallel for simd directive.Alexey Bataev2019-12-111-1/+9
| | | | | | 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.
* [OPENMP50]Fix capturing of if condition in target parallel for simdAlexey Bataev2019-12-111-1/+3
| | | | | | | | directive. Fixed capturing of the if condition if no modifer was specified in this condition. Previously could capture it only in outer region and it could lead to a compiler crash.
* [OPENMP50]Add if clause in teams distribute simd directive.Alexey Bataev2019-12-111-1/+7
| | | | | | 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.
* [OPENMP50]Add if clause in target simd directive.Alexey Bataev2019-12-101-1/+7
| | | | | | 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.
* [OPENMP50]Add if clause in target parallel for simd directive.Alexey Bataev2019-12-101-1/+7
| | | | | | According to OpenMP 5.0, if clause can be used in for simd directive. If condition in the if clause is false, the non-vectorized version of the loop must be executed.
* [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.hJohannes Doerfert2019-12-101-2/+9
| | | | | | | | | | | | | | | | | | | 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
* [OpenMP] Require trivially copyable type for mappingJonas Hahnfeld2019-12-071-1/+1
| | | | | | | | | | | | | A trivially copyable type provides a trivial copy constructor and a trivial copy assignment operator. This is enough for the runtime to memcpy the data to the device. Additionally there must be no virtual functions or virtual base classes and the destructor is guaranteed to be trivial, ie performs no action. The runtime does not require trivial default constructors because on alloc the memory is undefined. Thus, weaken the warning to be only issued if the mapped type is not trivially copyable. Differential Revision: https://reviews.llvm.org/D71134
* [OPENMP50]Add if clause in distribute simd directive.Alexey Bataev2019-12-061-1/+3
| | | | | | 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.
* [OpenMP50] Add parallel master constructcchen2019-12-051-0/+38
| | | | | | | | | | | | 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
* [OPENMP50]Add support for if clause for simd part in distribute parallel for ↵Alexey Bataev2019-12-051-1/+8
| | | | | | | simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [OPENMP50]Add support for if clause for simd part in parallel master ↵Alexey Bataev2019-12-051-1/+13
| | | | | | | taskloop simd directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* [OPENMP50]Add support for if clause for simd part in master taskloop simd ↵Alexey Bataev2019-12-051-1/+3
| | | | | | | directive. According to OpenMP 5.0, the if clause can be applied to simd subdirective in the combined directives.
* Revert "[OpenMP50] Add parallel master construct, by Chi Chun Chen."Reid Kleckner2019-12-041-38/+0
| | | | | | This reverts commit 713dab21e27c987b9114547ce7136bac2e775de9. Tests do not pass on Windows.
* [OPENMP50]Add support for if clause for simd part in taskloop simdAlexey Bataev2019-12-041-15/+26
| | | | | | | directive. According to OpenMP 5.0, the `if` clause can be applied to simd subdirective in the combined directive.
* [OpenMP50] Add parallel master construct, by Chi Chun Chen.cchen2019-12-041-0/+38
| | | | | | | | | | | | Reviewers: ABataev, jdoerfert Reviewed By: ABataev Subscribers: jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem Tags: #clang Differential Revision: https://reviews.llvm.org/D70726
* [OPENMP]Use cast instead dyn_cast, NFC.Alexey Bataev2019-12-021-1/+1
| | | | Here the expression is always a DeclRefExpr, no need to use dyn_cast.
* [OPENMP50]Add if clause in parallel for simd directive.Alexey Bataev2019-11-271-1/+6
| | | | | According to OpenMP 5.0, if clause can be used in parallel for simd directive. If condition in the if clause if false, the non-vectorized version of the loop must be executed.
* [OPENMP]Simplify processing of context selectors, NFC.Alexey Bataev2019-11-221-21/+11
|
* [OPENMP]Fix behaviour of defaultmap for OpenMP 4.5.Alexey Bataev2019-11-221-6/+12
| | | | | | In OpenMP 4.5 pointers also must be considered as scalar types and defaultmap(tofrom:scalar) clause must affect mapping of the pointers too.
* [OPENMP50]Add device/kind context selector support.Alexey Bataev2019-11-211-3/+27
| | | | | | | | | | | | Summary: Added basic parsing/sema support for device/kind context selector. Reviewers: jdoerfert Subscribers: rampitec, aheejin, fedor.sergeev, simoncook, guansong, s.egerton, hfinkel, kkwli0, caomhin, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70245
* [OPENMP]Fix datasharing checks for if clause in parallel taskloopAlexey Bataev2019-11-211-3/+7
| | | | | | | | directives. If the default datasharing is set to none, the datasharing attributes for variables in the condition of the if clause for the inner taskloop directive must be verified.
* [OPENMP50]Add if clause in for simd directive.Alexey Bataev2019-11-211-1/+3
| | | | | | 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.
* [OPENMP50]Add if clause in simd directive.Alexey Bataev2019-11-191-1/+3
| | | | | | 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.
* [NFC] Refactor representation of materialized temporariesTyker2019-11-191-1/+1
| | | | | | | | | | | | | | | Summary: this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718 Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: thakis, sammccall, ilya-biryukov, rnkovacs, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69360
* Fix "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-11-181-2/+3
|
* Revert "[NFC] Refactor representation of materialized temporaries"Nico Weber2019-11-171-1/+1
| | | | | | This reverts commit 08ea1ee2db5f9d6460fef1d79d0d1d1a5eb78982. It broke ./ClangdTests/FindExplicitReferencesTest.All on the bots, see comments on https://reviews.llvm.org/D69360
* [NFC] Refactor representation of materialized temporariesTyker2019-11-161-1/+1
| | | | | | | | | | | | | | | Summary: this patch refactor representation of materialized temporaries to prevent an issue raised by rsmith in https://reviews.llvm.org/D63640#inline-612718 Reviewers: rsmith, martong, shafik Reviewed By: rsmith Subscribers: rnkovacs, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69360
* [OpenMP 5.0] - Extend defaultmap, by Chi Chun Chen.cchen2019-11-151-61/+241
| | | | | | | | | | | | | | | | | Summary: For the extended defaultmap, most of the work is inside sema. The only difference for codegen is to set different initial maptype for different implicit-behavior. Reviewers: jdoerfert, ABataev Reviewed By: ABataev Subscribers: dreachem, sandoval, cfe-commits Tags: #clang, #openmp Differential Revision: https://reviews.llvm.org/D69204
* [OPENMP50]Generalize handling of context matching/scoring.Alexey Bataev2019-11-111-19/+50
| | | | | | | | | | | | | | 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
* [OPENMP50]Add support for nested atomic and simd constructs inAlexey Bataev2019-11-111-3/+12
| | | | | | | | simd-based directives. According to OpenMP 5.0 standard, ordered simd, atomic and simd directives are allowed as nested directives in the simd-based directives.
* [OPENMP50]Simplify processing of context selector scores.Alexey Bataev2019-11-051-3/+3
| | | | | | If the context selector score was not specified, its value must be set to 0. Simplify the processing of unspecified scores + save memory in attribute representation.
* [OPENMP50]Support for imperfectly nested loops.Alexey Bataev2019-11-041-2/+4
| | | | Added support for imperfectly nested loops introduced in OpenMP 5.0.
* [OPENMP50]Add support for parallel master taskloop simd directive.Alexey Bataev2019-10-301-1/+84
| | | | Added full support for parallel master taskloop simd directive.
* [OPENMP]Fix PR43772: No warning in non-combined target regions.Alexey Bataev2019-10-291-3/+18
| | | | | | Need to analyze inner target regions in case of implicit mapping of the data members when target region is created in one of the class member functions.
* [OPENMP]Fix PR43771: Do not capture contexprs variables.Alexey Bataev2019-10-281-1/+5
| | | | If the variable is a constexpr variable, it should not be captured in the OpenMP region.
* [OPENMP50]Add support for master taskloop simd.Alexey Bataev2019-10-181-1/+64
| | | | | | Added trsing/semantics/codegen for combined construct master taskloop simd. llvm-svn: 375255
* [OPENMP]Allow priority clause in combined task-based directives.Alexey Bataev2019-10-161-13/+10
| | | | | | | The expression of the priority clause must be captured in the combined task-based directives, like 'parallel master taskloop' directive. llvm-svn: 375026
OpenPOWER on IntegriCloud