[llvm] d4b1a14 - [flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0

Kiran Kumar T P via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 21:41:39 PDT 2020


Author: Kiran Kumar T P
Date: 2020-07-16T10:10:59+05:30
New Revision: d4b1a14f0a6f6c330dbd0f1aca281d27034307c2

URL: https://github.com/llvm/llvm-project/commit/d4b1a14f0a6f6c330dbd0f1aca281d27034307c2
DIFF: https://github.com/llvm/llvm-project/commit/d4b1a14f0a6f6c330dbd0f1aca281d27034307c2.diff

LOG: [flang][OpenMP] Enhance parser support for taskwait construct to OpenMP 5.0

Summary:
This patch enhances parser support for taskwait construct to OpenMP 5.0.

2.17.5 taskwait Construct
        !$omp taskwait [clause[ [,] clause] ... ]
                where clause is one of the following:
                depend([depend-modifier,]dependence-type : locator-list)

The patch includes code changes and testcase modifications.

Reviewed By: Valentin Clement, Kiran Chandramohan

Differential Revision: https://reviews.llvm.org/D82255

Added: 
    

Modified: 
    flang/test/Semantics/omp-clause-validity01.f90
    llvm/include/llvm/Frontend/OpenMP/OMP.td

Removed: 
    


################################################################################
diff  --git a/flang/test/Semantics/omp-clause-validity01.f90 b/flang/test/Semantics/omp-clause-validity01.f90
index 77e40e323e5f..75050bdc06b5 100644
--- a/flang/test/Semantics/omp-clause-validity01.f90
+++ b/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)

diff  --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index a565bdf90b3f..2df1d2c2bec2 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -312,7 +312,11 @@ def OMP_Critical : Directive<"critical"> {
 }
 def OMP_TaskYield : Directive<"taskyield"> {}
 def OMP_Barrier : Directive<"barrier"> {}
-def OMP_TaskWait : Directive<"taskwait"> {}
+def OMP_TaskWait : Directive<"taskwait"> {
+  let allowedClauses = [
+    VersionedClause<OMPC_Depend, 50>
+  ];
+}
 def OMP_TaskGroup : Directive<"taskgroup"> {
   let allowedClauses = [
     VersionedClause<OMPC_TaskReduction>,


        


More information about the llvm-commits mailing list