[all-commits] [llvm/llvm-project] f72c38: [Flang][openmp][2/5] Make Default clause part of O...

sameeranjoshi via All-commits all-commits at lists.llvm.org
Mon Dec 21 23:48:14 PST 2020


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

  Changed paths:
    M flang/lib/Lower/OpenMP.cpp
    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][2/5] Make Default 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 `OmpDefaultClause` clause part of `OmpClause`.
The unparse function is dropped as the unparsing is done by `WALK_NESTED_ENUM`
for `OmpDefaultClause`.

Reviewed By: clementval, kiranktp

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




More information about the All-commits mailing list