Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6 |
|
#
0c6f2f62 |
| 06-Jun-2023 |
Animesh Kumar <animesh.kumar@amd.com> |
[OpenMP] Update the default version of OpenMP to 5.1
The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, t
[OpenMP] Update the default version of OpenMP to 5.1
The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1. After modifying the Frontend for that, various LIT tests were updated. This patch contains all such changes. At a high level, these are the patterns of changes observed in LIT tests -
# RUN lines which mentioned `-fopenmp-version=50` need to kept only if the IR for version 5.0 and 5.1 are different. Otherwise only one RUN line with no version info(i.e. default version) needs to be there.
# Test cases of this sort already had the RUN lines with respect to the older default version 5.0 and the version 5.1. Only swapping the version specification flag `-fopenmp-version` from newer version RUN line to older version RUN line is required.
# Diagnostics: Remove the 5.0 version specific RUN lines if there was no difference in the Diagnostics messages with respect to the default 5.1.
# Diagnostics: In case there was any difference in diagnostics messages between 5.0 and 5.1, mention version specific messages in tests.
# If the test contained version specific ifdef's e.g. "#ifdef OMP5" but there were no RUN lines for any other version than 5.X, then bring the code guarded by ifdef's outside and remove the ifdef's.
# Some tests had RUN lines for both 5.0 and 5.1 versions, but it is found that the IR for 5.0 is not different from the 5.1, therefore such RUN lines are redundant. So, such duplicated lines are removed.
# To generate CHECK lines automatically, use the script llvm/utils/update_cc_test_checks.py
Reviewed By: saiislam, ABataev
Differential Revision: https://reviews.llvm.org/D129635
(cherry picked from commit 9dd2999907dc791136a75238a6000f69bf67cf4e)
show more ...
|
Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
49f23afd |
| 03-Jan-2022 |
Saiyedul Islam <Saiyedul.Islam@amd.com> |
[OpenMP] Add nec and nvidia as compiler vendors for OpenMP
OpenMP Specs 5.0[1] and 5.1[2] recognizes nec and nvidia as known compiler vendors and their absence is causing compilation error in one of
[OpenMP] Add nec and nvidia as compiler vendors for OpenMP
OpenMP Specs 5.0[1] and 5.1[2] recognizes nec and nvidia as known compiler vendors and their absence is causing compilation error in one of the vendor based metadirective test of sollve_vv project[3].
[1] https://www.openmp.org/wp-content/uploads/Context-Definitions-5.0-v1.0.pdf [2] https://www.openmp.org/wp-content/uploads/OpenMP-API-Additional-Definitions-2-0.pdf [3] https://github.com/SOLLVE/sollve_vv/blob/master/tests/5.0/metadirective/test_metadirective_arch_nvidia_or_amd.c
Differential Revision: https://reviews.llvm.org/D116540
show more ...
|
Revision tags: llvmorg-13.0.1-rc1 |
|
#
d8699391 |
| 14-Oct-2021 |
Mike Rice <michael.p.rice@intel.com> |
[OPENMP51]Initial parsing/sema for append_args clause for 'declare variant'
Adds initial parsing and sema for the 'append_args' clause.
Note that an AST clause is not created as it instead adds its
[OPENMP51]Initial parsing/sema for append_args clause for 'declare variant'
Adds initial parsing and sema for the 'append_args' clause.
Note that an AST clause is not created as it instead adds its values to the OMPDeclareVariantAttr.
Differential Revision: https://reviews.llvm.org/D111854
show more ...
|
#
fb4c4510 |
| 12-Oct-2021 |
Mike Rice <michael.p.rice@intel.com> |
[OPENMP51]Initial parsing/sema for adjust_args clause for 'declare variant'
Adds initial parsing and sema for the 'adjust_args' clause.
Note that an AST clause is not created as it instead adds its
[OPENMP51]Initial parsing/sema for adjust_args clause for 'declare variant'
Adds initial parsing and sema for the 'adjust_args' clause.
Note that an AST clause is not created as it instead adds its expressions to the OMPDeclareVariantAttr.
Differential Revision: https://reviews.llvm.org/D99905
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
36c4dc9b |
| 24-Dec-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
[OpenMP][FIX] Ensure the isa trait is evaluated last
Since isa can cause diagnostics we want it to be evaluated last to avoid the "unknown isa" warning if the rest of the selector wouldn't match any
[OpenMP][FIX] Ensure the isa trait is evaluated last
Since isa can cause diagnostics we want it to be evaluated last to avoid the "unknown isa" warning if the rest of the selector wouldn't match anyway. That allows us to guard isa with arch properly.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D93785
show more ...
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
58ea1059 |
| 23-Apr-2020 |
Haojian Wu <hokein.wu@gmail.com> |
[AST][RecoveryExpr] Build recovery expressions by default for C++.
Reland https://reviews.llvm.org/D76696 All known crashes have been fixed, another attemption.
We have rolled out this to all inter
[AST][RecoveryExpr] Build recovery expressions by default for C++.
Reland https://reviews.llvm.org/D76696 All known crashes have been fixed, another attemption.
We have rolled out this to all internal users for a while, didn't see big issues, we consider it is stable enough.
Reviewed By: sammccall
Subscribers: rsmith, hubert.reinterpretcast, ebevhan, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78350
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
befb4be3 |
| 25-Feb-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
[OpenMP] `omp begin/end declare variant` - part 2, sema ("+CG")
This is the second part loosely extracted from D71179 and cleaned up.
This patch provides semantic analysis support for `omp begin/en
[OpenMP] `omp begin/end declare variant` - part 2, sema ("+CG")
This is the second part loosely extracted from D71179 and cleaned up.
This patch provides semantic analysis support for `omp begin/end declare variant`, mostly as defined in OpenMP technical report 8 (TR8) [0]. The sema handling makes code generation obsolete as we generate "the right" calls that can just be handled as usual. This handling also applies to the existing, albeit problematic, `omp declare variant support`. As a consequence a lot of unneeded code generation and complexity is removed.
A major purpose of this patch is to provide proper `math.h`/`cmath` support for OpenMP target offloading. See PR42061, PR42798, PR42799. The current code was developed with this feature in mind, see [1].
The logic is as follows:
If we have seen a `#pragma omp begin declare variant match(<SELECTOR>)` but not the corresponding `end declare variant`, and we find a function definition we will: 1) Create a function declaration for the definition we were about to generate. 2) Create a function definition but with a mangled name (according to `<SELECTOR>`). 3) Annotate the declaration with the `OMPDeclareVariantAttr`, the same one used already for `omp declare variant`, using and the mangled function definition as specialization for the context defined by `<SELECTOR>`.
When a call is created we inspect it. If the target has an `OMPDeclareVariantAttr` attribute we try to specialize the call. To this end, all variants are checked, the best applicable one is picked and a new call to the specialization is created. The new call is used instead of the original one to the base function. To keep the AST printing and tooling possible we utilize the PseudoObjectExpr. The original call is the syntactic expression, the specialized call is the semantic expression.
[0] https://www.openmp.org/wp-content/uploads/openmp-TR8.pdf [1] https://reviews.llvm.org/D61399#change-496lQkg0mhRN
Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim, aaron.ballman
Subscribers: bollu, guansong, openmp-commits, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75779
show more ...
|
#
095cecbe |
| 21-Feb-2020 |
Johannes Doerfert <johannes@jdoerfert.de> |
[OpenMP] `omp begin/end declare variant` - part 1, parsing
This is the first part extracted from D71179 and cleaned up.
This patch provides parsing support for `omp begin/end declare variant`, as d
[OpenMP] `omp begin/end declare variant` - part 1, parsing
This is the first part extracted from D71179 and cleaned up.
This patch provides parsing support for `omp begin/end declare variant`, as defined in OpenMP technical report 8 (TR8) [0].
A major purpose of this patch is to provide proper math.h/cmath support for OpenMP target offloading. See PR42061, PR42798, PR42799. The current code was developed with this feature in mind, see [1].
[0] https://www.openmp.org/wp-content/uploads/openmp-TR8.pdf [1] https://reviews.llvm.org/D61399#change-496lQkg0mhRN
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D74941
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
#
1228d42d |
| 20-Dec-2019 |
Johannes Doerfert <johannes@jdoerfert.de> |
[OpenMP][Part 2] Use reusable OpenMP context/traits handling
This patch implements an almost complete handling of OpenMP contexts/traits such that we can reuse most of the logic in Flang through the
[OpenMP][Part 2] Use reusable OpenMP context/traits handling
This patch implements an almost complete handling of OpenMP contexts/traits such that we can reuse most of the logic in Flang through the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.
All but construct SIMD specifiers, e.g., inbranch, and the device ISA selector are define in `llvm/lib/Frontend/OpenMP/OMPKinds.def`. From these definitions we generate the enum classes `TraitSet`, `TraitSelector`, and `TraitProperty` as well as conversion and helper functions in `llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}`.
The above enum classes are used in the parser, sema, and the AST attribute. The latter is not a collection of multiple primitive variant arguments that contain encodings via numbers and strings but instead a tree that mirrors the `match` clause (see `struct OpenMPTraitInfo`).
The changes to the parser make it more forgiving when wrong syntax is read and they also resulted in more specialized diagnostics. The tests are updated and the core issues are detected as before. Here and elsewhere this patch tries to be generic, thus we do not distinguish what selector set, selector, or property is parsed except if they do behave exceptionally, as for example `user={condition(EXPR)}` does.
The sema logic changed in two ways: First, the OMPDeclareVariantAttr representation changed, as mentioned above, and the sema was adjusted to work with the new `OpenMPTraitInfo`. Second, the matching and scoring logic moved into `OMPContext.{h,cpp}`. It is implemented on a flat representation of the `match` clause that is not tied to clang. `OpenMPTraitInfo` provides a method to generate this flat structure (see `struct VariantMatchInfo`) by computing integer score values and boolean user conditions from the `clang::Expr` we keep for them.
The OpenMP context is now an explicit object (see `struct OMPContext`). This is in anticipation of construct traits that need to be tracked. The OpenMP context, as well as the `VariantMatchInfo`, are basically made up of a set of active or respectively required traits, e.g., 'host', and an ordered container of constructs which allows duplication. Matching and scoring is kept as generic as possible to allow easy extension in the future.
---
Test changes:
The messages checked in `OpenMP/declare_variant_messages.{c,cpp}` have been auto generated to match the new warnings and notes of the parser. The "subset" checks were reversed causing the wrong version to be picked. The tests have been adjusted to correct this. We do not print scores if the user did not provide one. We print spaces to make lists in the `match` clause more legible.
Reviewers: kiranchandramohan, ABataev, RaviNarayanaswamy, gtbercea, grokos, sdmitriev, JonChesterfield, hfinkel, fghanim
Subscribers: merge_guards_bot, rampitec, mgorny, hiraditya, aheejin, fedor.sergeev, simoncook, bollu, guansong, dexonsmith, jfb, s.egerton, llvm-commits, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D71830
show more ...
|
#
0ee89c1b |
| 12-Dec-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Improve checks for declare variant functions compatibility.
Added check for functions compatibility in C and removed restriction for functions with no prototypes in declare variant constrc
[OPENMP50]Improve checks for declare variant functions compatibility.
Added check for functions compatibility in C and removed restriction for functions with no prototypes in declare variant constrcut.
show more ...
|
Revision tags: llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
4e8231b5 |
| 05-Nov-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Add device/kind context selector support.
Summary: Added basic parsing/sema support for device/kind context selector.
Reviewers: jdoerfert
Subscribers: rampitec, aheejin, fedor.sergeev,
[OPENMP50]Add device/kind context selector support.
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
show more ...
|
#
70d2e542 |
| 08-Oct-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Do not allow multiple same context traits in the same context selector.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-selector-name can only be specified once.
[OPENMP50]Do not allow multiple same context traits in the same context selector.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-selector-name can only be specified once. Added check for this restriction.
llvm-svn: 374093
show more ...
|
#
5d154c3e |
| 08-Oct-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Prohibit multiple context selector sets in context selectors.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-set-selector-name can only be specified once. Added
[OPENMP50]Prohibit multiple context selector sets in context selectors.
According to OpenMP 5.0, 2.3.2 Context Selectors, Restrictions, each trait-set-selector-name can only be specified once. Added check to implement this restriction.
llvm-svn: 374072
show more ...
|
#
6b06ead1 |
| 08-Oct-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Allow functions in declare variant directive to have different C linkage.
After some discussion with OpenMP developers, it was decided that the functions with the different C linkage can b
[OPENMP50]Allow functions in declare variant directive to have different 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
show more ...
|
#
1c9e1731 |
| 04-Oct-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Suppport for multiple vendors in the same vendor context selector.
According to OpenMP 5.0, multiple vendors could be specified in the vendor context selector via ',' as a separator.
llvm
[OPENMP50]Suppport for multiple vendors in the same vendor context selector.
According to OpenMP 5.0, multiple vendors could be specified in the vendor context selector via ',' as a separator.
llvm-svn: 373756
show more ...
|
#
a15a1413 |
| 02-Oct-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Add parsing/sema analysis for declare variant score.
Context selectors may include optional score clause in format `score(<expr>):`, where `<expr>` must be a constant integer expression. A
[OPENMP50]Add parsing/sema analysis for declare variant score.
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
show more ...
|
#
218bea97 |
| 30-Sep-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Do not emit warning for the function with the currently defined body.
If the function is currently defined, we should not emit a warning that it might be emitted already because it was not
[OPENMP50]Do not emit warning for the function with the currently 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
show more ...
|
#
1202614d |
| 26-Sep-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Emit warnings if the functions was defined/used before marked declare variant.
We can use the original function if it was used/emitted already. So, just use warnings for these cases, not e
[OPENMP50]Emit warnings if the functions was defined/used before marked 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
show more ...
|
#
9ff34745 |
| 25-Sep-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP50]Parsing/sema support for 'implementation/vendor' context selector.
Added basic parsing/semantic support for 'implementation={vendor(<vendor>)}' context selector.
llvm-svn: 372917
|
#
0736f7f5 |
| 18-Sep-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP5.0]Allow multiple context selectors in the context selector sets.
According to OpenMP 5.0, context selector set might include several context selectors, separated with commas. Patch fixes th
[OPENMP5.0]Allow multiple context selectors in the context selector sets.
According to OpenMP 5.0, context selector set might include several context selectors, separated with commas. Patch fixes this problem.
llvm-svn: 372235
show more ...
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6 |
|
#
d158cf64 |
| 13-Sep-2019 |
Alexey Bataev <a.bataev@hotmail.com> |
[OPENMP5.0]Add basic support for declare variant directive.
Added basic support for declare variant directive and its match clause with user context selector.
llvm-svn: 371892
|