[PATCH] D84353: [flang][openmp] Required clauses are allowed
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 18:31:47 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3b8ffdec0772: [flang][openmp] Required clauses are allowed (authored by clementval).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84353/new/
https://reviews.llvm.org/D84353
Files:
flang/lib/Semantics/check-omp-structure.cpp
llvm/include/llvm/Frontend/OpenMP/OMP.td
Index: llvm/include/llvm/Frontend/OpenMP/OMP.td
===================================================================
--- llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -402,7 +402,6 @@
}
def OMP_TargetData : Directive<"target data"> {
let allowedClauses = [
- VersionedClause<OMPC_Map>,
VersionedClause<OMPC_UseDevicePtr>,
VersionedClause<OMPC_UseDeviceAddr, 50>
];
@@ -416,19 +415,20 @@
}
def OMP_TargetEnterData : Directive<"target enter data"> {
let allowedClauses = [
- VersionedClause<OMPC_Depend>,
- VersionedClause<OMPC_Map>
+ VersionedClause<OMPC_Depend>
];
let allowedOnceClauses = [
VersionedClause<OMPC_If>,
VersionedClause<OMPC_Device>,
VersionedClause<OMPC_NoWait>
];
+ let requiredClauses = [
+ VersionedClause<OMPC_Map>
+ ];
}
def OMP_TargetExitData : Directive<"target exit data"> {
let allowedClauses = [
- VersionedClause<OMPC_Depend>,
- VersionedClause<OMPC_Map>
+ VersionedClause<OMPC_Depend>
];
let allowedOnceClauses = [
VersionedClause<OMPC_Device>,
Index: flang/lib/Semantics/check-omp-structure.cpp
===================================================================
--- flang/lib/Semantics/check-omp-structure.cpp
+++ flang/lib/Semantics/check-omp-structure.cpp
@@ -44,7 +44,8 @@
void OmpStructureChecker::CheckAllowed(llvm::omp::Clause type) {
if (!GetContext().allowedClauses.test(type) &&
!GetContext().allowedOnceClauses.test(type) &&
- !GetContext().allowedExclusiveClauses.test(type)) {
+ !GetContext().allowedExclusiveClauses.test(type) &&
+ !GetContext().requiredClauses.test(type)) {
context_.Say(GetContext().clauseSource,
"%s clause is not allowed on the %s directive"_err_en_US,
parser::ToUpperCaseLetters(llvm::omp::getOpenMPClauseName(type).str()),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84353.279996.patch
Type: text/x-patch
Size: 1868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/63fa44ac/attachment.bin>
More information about the llvm-commits
mailing list