-
Notifications
You must be signed in to change notification settings - Fork 14k
[OpenMP] Add directive spellings introduced in spec v6.0 #141772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-openmp Author: Krzysztof Parzyszek (kparzysz) ChangesFor background information see Full diff: https://github.com/llvm/llvm-project/pull/141772.diff 1 Files Affected:
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 027692275b63b..04433ffd72b7b 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -677,7 +677,8 @@ def OMP_Cancel : Directive<[Spelling<"cancel">]> {
let association = AS_None;
let category = CA_Executable;
}
-def OMP_CancellationPoint : Directive<[Spelling<"cancellation point">]> {
+def OMP_CancellationPoint : Directive<[Spelling<"cancellation point", 1, 52>,
+ Spelling<"cancellation_point", 60>]> {
let allowedOnceClauses = [
VersionedClause<OMPC_CancellationConstructType>,
];
@@ -691,21 +692,24 @@ def OMP_Critical : Directive<[Spelling<"critical">]> {
let association = AS_Block;
let category = CA_Executable;
}
-def OMP_DeclareMapper : Directive<[Spelling<"declare mapper">]> {
+def OMP_DeclareMapper : Directive<[Spelling<"declare mapper", 1, 52>,
+ Spelling<"declare_mapper", 60>]> {
let requiredClauses = [
VersionedClause<OMPC_Map, 45>,
];
let association = AS_None;
let category = CA_Declarative;
}
-def OMP_DeclareReduction : Directive<[Spelling<"declare reduction">]> {
+def OMP_DeclareReduction : Directive<[Spelling<"declare reduction", 1, 52>,
+ Spelling<"declare_reduction", 60>]> {
let allowedOnceClauses = [
VersionedClause<OMPC_Initializer>,
];
let association = AS_None;
let category = CA_Declarative;
}
-def OMP_DeclareSimd : Directive<[Spelling<"declare simd">]> {
+def OMP_DeclareSimd : Directive<[Spelling<"declare simd", 1, 52>,
+ Spelling<"declare_simd", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_Aligned>,
VersionedClause<OMPC_Linear>,
@@ -721,7 +725,8 @@ def OMP_DeclareSimd : Directive<[Spelling<"declare simd">]> {
let association = AS_Declaration;
let category = CA_Declarative;
}
-def OMP_DeclareTarget : Directive<[Spelling<"declare target">]> {
+def OMP_DeclareTarget : Directive<[Spelling<"declare target", 1, 52>,
+ Spelling<"declare_target", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_Enter, 52>,
VersionedClause<OMPC_Indirect>,
@@ -734,7 +739,8 @@ def OMP_DeclareTarget : Directive<[Spelling<"declare target">]> {
let association = AS_None;
let category = CA_Declarative;
}
-def OMP_DeclareVariant : Directive<[Spelling<"declare variant">]> {
+def OMP_DeclareVariant : Directive<[Spelling<"declare variant", 1, 52>,
+ Spelling<"declare_variant", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_AdjustArgs, 51>,
];
@@ -1093,7 +1099,8 @@ def OMP_Target : Directive<[Spelling<"target">]> {
let association = AS_Block;
let category = CA_Executable;
}
-def OMP_TargetData : Directive<[Spelling<"target data">]> {
+def OMP_TargetData : Directive<[Spelling<"target data", 1, 52>,
+ Spelling<"target_data", 60>]> {
let allowedOnceClauses = [
VersionedClause<OMPC_Device>,
VersionedClause<OMPC_If>,
@@ -1106,7 +1113,8 @@ def OMP_TargetData : Directive<[Spelling<"target data">]> {
let association = AS_Block;
let category = CA_Executable;
}
-def OMP_TargetEnterData : Directive<[Spelling<"target enter data">]> {
+def OMP_TargetEnterData : Directive<[Spelling<"target enter data", 1, 52>,
+ Spelling<"target_enter_data", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_Depend>,
];
@@ -1121,7 +1129,8 @@ def OMP_TargetEnterData : Directive<[Spelling<"target enter data">]> {
let association = AS_None;
let category = CA_Executable;
}
-def OMP_TargetExitData : Directive<[Spelling<"target exit data">]> {
+def OMP_TargetExitData : Directive<[Spelling<"target exit data", 1, 52>,
+ Spelling<"target_exit_data", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_Depend>,
];
@@ -1136,7 +1145,8 @@ def OMP_TargetExitData : Directive<[Spelling<"target exit data">]> {
let association = AS_None;
let category = CA_Executable;
}
-def OMP_TargetUpdate : Directive<[Spelling<"target update">]> {
+def OMP_TargetUpdate : Directive<[Spelling<"target update", 1, 52>,
+ Spelling<"target_update", 60>]> {
let allowedClauses = [
VersionedClause<OMPC_Depend>,
VersionedClause<OMPC_From>,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b081ce6
to
4dcc159
Compare
8385ab9
to
9099611
Compare
Hi @alexey-bataev, could you check if you're ok with this? I had to modify a few clang tests to accommodate this change. |
Can you add the tests for the new spellings? |
The modified tests do contain new spellings when the version is 60. Do you want me to extract these RUN lines into separate files? Right now we don't yet parse the new names, this is just checking the names in the diagnostics. |
For background information see
https://discourse.llvm.org/t/rfc-alternative-spellings-of-openmp-directives/85507