[PATCH] D141493: [Flang] [OpenMP] Add parser support for THREAD_LIMIT clause on OMP TARGET directive.
Raghu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 19:42:56 PST 2023
raghavendhra updated this revision to Diff 488459.
raghavendhra added a comment.
Rebasing
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141493/new/
https://reviews.llvm.org/D141493
Files:
flang/test/Semantics/OpenMP/omp-device-constructs.f90
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
@@ -625,6 +625,7 @@
];
let allowedOnceClauses = [
VersionedClause<OMPC_Device>,
+ VersionedClause<OMPC_ThreadLimit, 51>,
VersionedClause<OMPC_DefaultMap>,
VersionedClause<OMPC_NoWait>
];
Index: flang/test/Semantics/OpenMP/omp-device-constructs.f90
===================================================================
--- flang/test/Semantics/OpenMP/omp-device-constructs.f90
+++ flang/test/Semantics/OpenMP/omp-device-constructs.f90
@@ -56,6 +56,19 @@
enddo
!$omp end target
+ !$omp target thread_limit(4)
+ do i = 1, N
+ a = 3.14
+ enddo
+ !$omp end target
+
+ !ERROR: At most one THREAD_LIMIT clause can appear on the TARGET directive
+ !$omp target thread_limit(4) thread_limit(8)
+ do i = 1, N
+ a = 3.14
+ enddo
+ !$omp end target
+
!$omp teams num_teams(3) thread_limit(10) default(shared) private(i) shared(a)
do i = 1, N
a = 3.14
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141493.488459.patch
Type: text/x-patch
Size: 1107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/1cb7e34a/attachment.bin>
More information about the llvm-commits
mailing list