-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[flang][OpenMP] Mark atomic clauses as unique #137460
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
Conversation
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.
@llvm/pr-subscribers-flang-openmp Author: Krzysztof Parzyszek (kparzysz) ChangesThe current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file. Full diff: https://github.com/llvm/llvm-project/pull/137460.diff 1 Files Affected:
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index eff6d57995d2b..cdfd3e3223fa8 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -602,22 +602,20 @@ def OMP_Assume : Directive<"assume"> {
];
}
def OMP_Atomic : Directive<"atomic"> {
- let allowedClauses = [
- VersionedClause<OMPC_Capture>,
- VersionedClause<OMPC_Compare, 51>,
- VersionedClause<OMPC_Read>,
- VersionedClause<OMPC_Update>,
- VersionedClause<OMPC_Write>,
- ];
let allowedOnceClauses = [
VersionedClause<OMPC_AcqRel, 50>,
VersionedClause<OMPC_Acquire, 50>,
+ VersionedClause<OMPC_Capture>,
+ VersionedClause<OMPC_Compare, 51>,
VersionedClause<OMPC_Fail, 51>,
VersionedClause<OMPC_Hint, 50>,
+ VersionedClause<OMPC_Read>,
VersionedClause<OMPC_Relaxed, 50>,
VersionedClause<OMPC_Release, 50>,
VersionedClause<OMPC_SeqCst>,
+ VersionedClause<OMPC_Update>,
VersionedClause<OMPC_Weak, 51>,
+ VersionedClause<OMPC_Write>,
];
let association = AS_Block;
let category = CA_Executable;
@@ -668,7 +666,7 @@ def OMP_CancellationPoint : Directive<"cancellation point"> {
let category = CA_Executable;
}
def OMP_Critical : Directive<"critical"> {
- let allowedClauses = [
+ let allowedOnceClauses = [
VersionedClause<OMPC_Hint>,
];
let association = AS_Block;
|
Next PR: #137517 |
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, thanks
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.
The current implementation of the ATOMIC construct handles these clauses individually, and this change does not have an observable effect. At the same time these clauses are unique as per the OpenMP spec, and this patch reflects that in the OMP.td file.