[Flang][openmp][3/5] Make ProcBind clause part of OmpClause
authorsameeran joshi <sameeranjayant.joshi@amd.com>
Mon, 21 Dec 2020 13:13:44 +0000 (18:43 +0530)
committerSameeran joshi <joshisameeran17@gmail.com>
Tue, 22 Dec 2020 08:10:38 +0000 (13:40 +0530)
commit34958d11c3457c8e05bbe2b31d5e013c04aecb55
treed08eb4ec7504a4027561ed6aa35539738c032b6d
parentb8c37153d5393aad96feefe0b4689b7b62bc160d
[Flang][openmp][3/5] Make ProcBind 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 `OmpProcBindClause` clause part of `OmpClause`.
The unparse function is dropped as the unparsing is done by `WALK_NESTED_ENUM`
for `OmpProcBindClause`.

Reviewed By: clementval, kiranktp

Differential Revision: https://reviews.llvm.org/D93642
flang/lib/Lower/OpenMP.cpp
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