[flang-commits] [PATCH] D82255: [flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0

Kiran Kumar T P via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jun 23 05:17:27 PDT 2020


kiranktp updated this revision to Diff 272683.
kiranktp edited the summary of this revision.
kiranktp added a comment.

Corrected the section number to 2.17.5 [from OpenMP 5.0] for taskwait construct


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82255/new/

https://reviews.llvm.org/D82255

Files:
  flang/lib/Semantics/check-omp-structure.cpp
  flang/test/Semantics/omp-clause-validity01.f90


Index: flang/test/Semantics/omp-clause-validity01.f90
===================================================================
--- flang/test/Semantics/omp-clause-validity01.f90
+++ flang/test/Semantics/omp-clause-validity01.f90
@@ -396,6 +396,9 @@
   !$omp taskyield
   !$omp barrier
   !$omp taskwait
+  !$omp taskwait depend(source)
+  !ERROR: Internal: no symbol found for 'i'
+  !$omp taskwait depend(sink:i-1)
   ! !$omp target enter data map(to:arrayA) map(alloc:arrayB)
   ! !$omp target update from(arrayA) to(arrayB)
   ! !$omp target exit data map(from:arrayA) map(delete:arrayB)
Index: flang/lib/Semantics/check-omp-structure.cpp
===================================================================
--- flang/lib/Semantics/check-omp-structure.cpp
+++ flang/lib/Semantics/check-omp-structure.cpp
@@ -666,8 +666,10 @@
     PushContext(dir.source, OmpDirective::BARRIER);
   } break;
   case parser::OmpSimpleStandaloneDirective::Directive::Taskwait: {
-    // 2.13.4 taskwait
+    // 2.17.5 taskwait [OpenMP 5.0]
     PushContext(dir.source, OmpDirective::TASKWAIT);
+    OmpClauseSet allowed{OmpClause::DEPEND};
+    SetContextAllowed(allowed);
   } break;
   case parser::OmpSimpleStandaloneDirective::Directive::Taskyield: {
     // 2.9.4 taskyield


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82255.272683.patch
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200623/8e8ef639/attachment.bin>


More information about the flang-commits mailing list