[flang] add ORDERED construct w/ THREADS and SIMD clauses (parse error)
authorJinxin Yang <jinxiny@nvidia.com>
Thu, 11 Jul 2019 19:19:51 +0000 (12:19 -0700)
committerJinxin Yang <jinxiny@nvidia.com>
Thu, 11 Jul 2019 22:30:32 +0000 (15:30 -0700)
Original-commit: flang-compiler/f18@23a71aed74ee34ddd4dbf80ac3f906bf8c255bd9
Reviewed-on: https://github.com/flang-compiler/f18/pull/566
Tree-same-pre-rewrite: false

flang/lib/parser/dump-parse-tree.h
flang/lib/parser/openmp-grammar.h
flang/lib/parser/parse-tree.h
flang/lib/parser/unparse.cc

index 9cb92f5..4aeb620 100644 (file)
@@ -460,6 +460,8 @@ public:
   NODE(parser::OmpClause, Mergeable)
   NODE(parser::OmpClause, Nogroup)
   NODE(parser::OmpClause, Notinbranch)
+  NODE(parser::OmpClause, Threads)
+  NODE(parser::OmpClause, Simd)
   NODE(parser::OmpClause, NumTasks)
   NODE(parser::OmpClause, NumTeams)
   NODE(parser::OmpClause, NumThreads)
index 5572d70..5f85ca8 100644 (file)
@@ -166,6 +166,8 @@ TYPE_PARSER("DEFAULTMAP" >>
     "NOGROUP" >> construct<OmpClause>(construct<OmpClause::Nogroup>()) ||
     "NOTINBRANCH" >>
         construct<OmpClause>(construct<OmpClause::Notinbranch>()) ||
+    "THREADS" >> construct<OmpClause>(construct<OmpClause::Threads>()) ||
+    "SIMD" >> construct<OmpClause>(construct<OmpClause::Simd>()) ||
     "NOWAIT" >> construct<OmpClause>(construct<OmpNowait>()) ||
     "UNTIED" >> construct<OmpClause>(construct<OmpClause::Untied>()) ||
     "COLLAPSE" >> construct<OmpClause>(construct<OmpClause::Collapse>(
index 3d8acc6..be12995 100644 (file)
@@ -3418,6 +3418,8 @@ struct OmpClause {
   EMPTY_CLASS(Nogroup);
   EMPTY_CLASS(Notinbranch);
   EMPTY_CLASS(Untied);
+  EMPTY_CLASS(Threads);
+  EMPTY_CLASS(Simd);
   WRAPPER_CLASS(Collapse, ScalarIntConstantExpr);
   WRAPPER_CLASS(Copyin, OmpObjectList);
   WRAPPER_CLASS(Copyprivate, OmpObjectList);
@@ -3445,10 +3447,10 @@ struct OmpClause {
   WRAPPER_CLASS(IsDevicePtr, std::list<Name>);
   CharBlock source;
   std::variant<Defaultmap, Inbranch, Mergeable, Nogroup, Notinbranch, OmpNowait,
-      Untied, Collapse, Copyin, Copyprivate, Device, DistSchedule, Final,
-      Firstprivate, From, Grainsize, Lastprivate, NumTasks, NumTeams,
-      NumThreads, Ordered, Priority, Private, Safelen, Shared, Simdlen,
-      ThreadLimit, To, Link, Uniform, UseDevicePtr, IsDevicePtr,
+      Untied, Threads, Simd, Collapse, Copyin, Copyprivate, Device,
+      DistSchedule, Final, Firstprivate, From, Grainsize, Lastprivate, NumTasks,
+      NumTeams, NumThreads, Ordered, Priority, Private, Safelen, Shared,
+      Simdlen, ThreadLimit, To, Link, Uniform, UseDevicePtr, IsDevicePtr,
       OmpAlignedClause, OmpDefaultClause, OmpDependClause, OmpIfClause,
       OmpLinearClause, OmpMapClause, OmpProcBindClause, OmpReductionClause,
       OmpScheduleClause>
index 0d1c311..70482f3 100644 (file)
@@ -1861,6 +1861,8 @@ public:
   void Before(const OmpClause::Nogroup &x) { Word("NOGROUP"); }
   void Before(const OmpClause::Notinbranch &x) { Word("NOTINBRANCH"); }
   void Before(const OmpClause::Untied &x) { Word("UNTIED"); }
+  void Before(const OmpClause::Threads &x) { Word("THREADS"); }
+  void Before(const OmpClause::Simd &x) { Word("SIMD"); }
   void Unparse(const OmpNowait &) { Word("NOWAIT"); }
   void Unparse(const OmpClause::Collapse &x) {
     Word("COLLAPSE(");