[flang-commits] [PATCH] D90324: [Flang][OpenMP][NFC][1/2] Reorder OmpStructureChecker and simplify it.

sameeran joshi via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat Oct 31 12:09:38 PDT 2020


sameeranjoshi added a comment.

In D90324#2366643 <https://reviews.llvm.org/D90324#2366643>, @kiranchandramohan wrote:

> Another way would be to classify various OpenMP clauses similar to what is done in PFT.
> https://github.com/llvm/llvm-project/blob/09662eeb46f76cda0a8d1102d8f67f7ad8ad64de/flang/include/flang/Lower/PFTBuilder.h#L115
> https://github.com/llvm/llvm-project/blob/09662eeb46f76cda0a8d1102d8f67f7ad8ad64de/flang/include/flang/Lower/PFTBuilder.h#L145
>
> And then use that classification to do what we want for different OpenMP clause classes.
> https://github.com/llvm/llvm-project/blob/09662eeb46f76cda0a8d1102d8f67f7ad8ad64de/flang/lib/Lower/PFTBuilder.cpp#L80
>
> Would that be possible?

Thank you for suggestion.

May be it seems possible.
What benefit do you see compared to the current approach? 
I see we can group all clauses at one location, compared to the one I mentioned below.

Anticipating the status of OMP/OACC  for the next 4 months I think the macros would be replaced with `Enter/Leave` functions with more checks in them from standard.
for e.g something like `Enter(const parser::OmpClause::Ordered &x)`
This function has other restrictions implemented from standard specific to the clause apart from tablegen changes.

So the macros are somewhat partial checks, having macros makes us easily figure out in this case whether the restrictions on clause are partially implemented or more detailed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90324/new/

https://reviews.llvm.org/D90324



More information about the flang-commits mailing list