[all-commits] [llvm/llvm-project] 855a32: [Flang][OpenMP][NFC][1/2] Reorder OmpStructureChec...

sameeranjoshi via All-commits all-commits at lists.llvm.org
Mon Nov 2 22:20:59 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 855a32d9e55932885759979361b353c63def84c8
      https://github.com/llvm/llvm-project/commit/855a32d9e55932885759979361b353c63def84c8
  Author: Sameeran joshi <joshisameeran17 at gmail.com>
  Date:   2020-11-03 (Tue, 03 Nov 2020)

  Changed paths:
    M flang/lib/Semantics/check-omp-structure.cpp

  Log Message:
  -----------
  [Flang][OpenMP][NFC][1/2] Reorder OmpStructureChecker and simplify it.

`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

Reviewed By: kiranchandramohan, clementval

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




More information about the All-commits mailing list