[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
Wed Oct 28 11:20:42 PDT 2020


sameeranjoshi created this revision.
sameeranjoshi added reviewers: kiranchandramohan, clementval, kiranktp, SouraVX, yhegde.
Herald added subscribers: llvm-commits, guansong, yaxunl.
Herald added a project: LLVM.
sameeranjoshi requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

`OmpStructureChecker` has too much boilerplate code in source file.
It was not easy to figure out the seperation of clauses inside 'OmpClause' and
the ones which had a seperate node in parse-tree.h.

This patch:

1. Removes the boilerplate by defining a few macros.
2. Makes seperation between constructs, directives and clauses(sub classes are seperated).
3. Macros could have been shared between OMP and OACC, template specilizations might have been costly hence used macros.

Follows the same strategy used for `AccStructureChecker`.

Next patch in series to simplify OmpStructureChecker would try to simplify
boilerplates inside the functions and either create abstractions or use if
something is available inside check-directive-structure.h


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90324

Files:
  flang/lib/Semantics/check-omp-structure.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90324.301349.patch
Type: text/x-patch
Size: 10158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20201028/bcf74928/attachment.bin>


More information about the flang-commits mailing list