[PATCH] D93644: [Flang][openmp][5/5] Make dist_schedule clause part of OmpClause

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 09:37:38 PST 2020


sameeranjoshi created this revision.
sameeranjoshi added reviewers: kiranchandramohan, clementval, kiranktp, SouraVX.
Herald added subscribers: guansong, yaxunl.
sameeranjoshi requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Herald added a project: LLVM.

After discussion in `D93482` we found that the some of the clauses were not
following the common OmpClause convention.

The benefits of using OmpClause:

- Functionalities from structure checker are mostly aligned to work with `llvm::omp::Clause`.
- The unparsing as well can take advantage.
- Homogeneity with OpenACC and rest of the clauses in OpenMP.
- Could even generate the parser with TableGen, when there is homogeneity.
- It becomes confusing when to use `flangClass` and `flangClassValue` inside TableGen, if incase we generate parser using TableGen we could have only a single `let expression`.

This patch makes `OmpDistScheduleClause` clause part of `OmpClause`.
The unparse function for `OmpDistScheduleClause` is adapted since the keyword
and parenthesis are issued by the corresponding unparse function for
`parser::OmpClause::DistSchedule`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93644

Files:
  flang/include/flang/Parser/dump-parse-tree.h
  flang/include/flang/Parser/parse-tree.h
  flang/lib/Parser/openmp-parsers.cpp
  flang/lib/Parser/unparse.cpp
  flang/lib/Semantics/check-omp-structure.cpp
  flang/lib/Semantics/check-omp-structure.h
  llvm/include/llvm/Frontend/OpenMP/OMP.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93644.313127.patch
Type: text/x-patch
Size: 4637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201221/623330a9/attachment.bin>


More information about the llvm-commits mailing list