[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 21:07:08 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG02023bca7f7d: [Flang] [OpenMP] Add parser support for THREAD_LIMIT clause on OMP TARGET… (authored by raghavendhra).

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.488469.patch
Type: text/x-patch
Size: 1107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/54f918be/attachment.bin>


More information about the llvm-commits mailing list