[all-commits] [llvm/llvm-project] 442aac: [Flang][openmp][1/5] Make Allocate clause part of ...
sameeranjoshi via All-commits
all-commits at lists.llvm.org
Mon Dec 21 23:24:02 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 442aac5da68c467563dc6fedf37892ee3d2b688b
https://github.com/llvm/llvm-project/commit/442aac5da68c467563dc6fedf37892ee3d2b688b
Author: sameeran joshi <sameeranjayant.joshi at amd.com>
Date: 2020-12-22 (Tue, 22 Dec 2020)
Changed paths:
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][1/5] Make Allocate 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 `allocate` clause part of `OmpClause`.The unparse function for
`OmpAllocateClause` is adapted since the keyword and parenthesis are issued by
the corresponding unparse function for `parser::OmpClause::Allocate`.
Reviewed By: clementval
Differential Revision: https://reviews.llvm.org/D93640
More information about the All-commits
mailing list