[all-commits] [llvm/llvm-project] 1a6f43: [Flang][openmp][5/5] Make dist_schedule clause par...

sameeranjoshi via All-commits all-commits at lists.llvm.org
Tue Dec 22 01:03:01 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a6f43991ff7e5249f24660074f0dd784aeecd5f
      https://github.com/llvm/llvm-project/commit/1a6f43991ff7e5249f24660074f0dd784aeecd5f
  Author: sameeran joshi <sameeranjayant.joshi at amd.com>
  Date:   2020-12-22 (Tue, 22 Dec 2020)

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

  Log Message:
  -----------
  [Flang][openmp][5/5] Make dist_schedule clause part of OmpClause

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`.

Reviewed By: clementval, kiranktp

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




More information about the All-commits mailing list