summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOpenMP.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [OPENMP]Allow final clause in combined task-based directives.Alexey Bataev2019-10-151-3/+20
| | | | | | | The condition of the final clause must be captured in the combined task-based directives, like 'parallel master taskloop' directive. llvm-svn: 374942
* [OPNEMP]Allow num_tasks clause in combined task-based directives.Alexey Bataev2019-10-141-5/+14
| | | | | | | The expression of the num_tasks clause must be captured in the combined task-based directives, like 'parallel master taskloop' directive. llvm-svn: 374819
* [OPNEMP]Allow grainsize clause in combined task-based directives.Alexey Bataev2019-10-141-8/+97
| | | | | | | The expression of the grainsize clause must be captured in the combined task-based directives, like 'parallel master taskloop' directive. llvm-svn: 374810
* [OPENMP50]Add support for 'parallel master taskloop' construct.Alexey Bataev2019-10-141-1/+124
| | | | | | | | | 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
* [OPENMP]Fix codegen for private variably length vars in combinedAlexey Bataev2019-10-141-0/+4
| | | | | | | | | | | constructs. If OpenMP construct includes several capturing regions and the variable is declared as private, the length of the inner variable length array is not captured in outer captured regions, only in the innermost region. Patch fixes this bug. llvm-svn: 374787
* [OPENMP50]Support for 'master taskloop' directive.Alexey Bataev2019-10-101-1/+51
| | | | | | Added full support for master taskloop directive. llvm-svn: 374437
* [CUDA][HIP] Fix host/device check with -fopenmpYaxun Liu2019-10-091-87/+59
| | | | | | | | | | | | | | | | CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation to take advantages of multi-threads computation. CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine if a function is sure to be emitted. To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic. Differential Revision: https://reviews.llvm.org/D67837 llvm-svn: 374263
* [OPENMP50]Multiple vendors in vendor context must be treated as logicalAlexey Bataev2019-10-081-2/+2
| | | | | | | | | | | | | and of vendors, not or. If several vendors are provided in the same vendor context trait, the context shall match only if all vendors are matching, not one of them. This is per OpenMP 5.0, 2.3.3 Matching and Scoring Context Selectors, all selectors in the construct, device, and implementation sets of the context selector appear in the corresponding trait set of the OpenMP context. llvm-svn: 374107
* [OPENMP50]Allow functions in declare variant directive to have differentAlexey Bataev2019-10-081-1/+2
| | | | | | | | | | C linkage. After some discussion with OpenMP developers, it was decided that the functions with the different C linkage can be used in declare variant directive. llvm-svn: 374057
* [OPENMP50]Treat range-based for as canonical loop.Alexey Bataev2019-10-071-11/+38
| | | | | | | According to OpenMP 5.0, range-based for is also considered as a canonical form of loops. llvm-svn: 373939
* Properly handle instantiation-dependent array bounds.Richard Smith2019-10-041-2/+3
| | | | | | | | | We previously failed to treat an array with an instantiation-dependent but not value-dependent bound as being an instantiation-dependent type. We now track the array bound expression as part of a constant array type if it's an instantiation-dependent expression. llvm-svn: 373685
* [OPENMP50]Add parsing/sema analysis for declare variant score.Alexey Bataev2019-10-021-1/+16
| | | | | | | | Context selectors may include optional score clause in format `score(<expr>):`, where `<expr>` must be a constant integer expression. Added parsing/sema analysis only. llvm-svn: 373502
* [OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangularAlexey Bataev2019-10-011-5/+13
| | | | | | | | | loop. Missed check if the condition is also dependent when building final expressions for the collapsed loop directives. llvm-svn: 373348
* [OPENMP50]Do not emit warning for the function with the currentlyAlexey Bataev2019-09-301-2/+3
| | | | | | | | | defined body. If the function is currently defined, we should not emit a warning that it might be emitted already because it was not really emitted. llvm-svn: 373243
* [OPENMP] Fix comment, NFC.Alexey Bataev2019-09-301-1/+1
| | | | llvm-svn: 373210
* [OpenMP 5.0] Fix user-defined mapper lookup in semaMichael Kruse2019-09-261-3/+11
| | | | | | | | | | | | This patches fixes the case when a user-defined mapper is attached to the elements of an array, and to report error when a mapper is used for types other than struct, class, and union. Patch by Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D67978 llvm-svn: 373023
* [OPENMP50]Emit warnings if the functions was defined/used before markedAlexey Bataev2019-09-261-4/+8
| | | | | | | | | declare variant. We can use the original function if it was used/emitted already. So, just use warnings for these cases, not errors. llvm-svn: 373010
* [OPENMP50]Parsing/sema support for 'implementation/vendor' contextAlexey Bataev2019-09-251-5/+8
| | | | | | | | | selector. Added basic parsing/semantic support for 'implementation={vendor(<vendor>)}' context selector. llvm-svn: 372917
* [OPENMP]Use standard parsing for 'match' clause, NFC.Alexey Bataev2019-09-231-0/+7
| | | | | | | Reused standard clauses parsing scheme for parsing/matching 'match' clause in 'declare variant' directive. llvm-svn: 372635
* [OPENMP5.0]Allow multiple context selectors in the context selectorAlexey Bataev2019-09-181-31/+32
| | | | | | | | | sets. According to OpenMP 5.0, context selector set might include several context selectors, separated with commas. Patch fixes this problem. llvm-svn: 372235
* [OPENMP5.0]Introduce attribute for declare variant directive.Alexey Bataev2019-09-171-1/+37
| | | | | | | | Added attribute for declare variant directive. It will allow to handle declare variant directive at the codegen and will allow to add extra checks. llvm-svn: 372147
OpenPOWER on IntegriCloud