[all-commits] [llvm/llvm-project] cfd67c: [flang][OpenMP] Normalize clause modifiers that ex...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Wed Nov 20 06:33:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfd67c214938a1f4ab3eff45a79a5a3da543d4b6
      https://github.com/llvm/llvm-project/commit/cfd67c214938a1f4ab3eff45a79a5a3da543d4b6
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M flang/examples/FeatureList/FeatureList.cpp
    M flang/examples/FlangOmpReport/FlangOmpReportVisitor.cpp
    M flang/examples/FlangOmpReport/FlangOmpReportVisitor.h
    M flang/include/flang/Parser/dump-parse-tree.h
    M flang/include/flang/Parser/parse-tree.h
    M flang/lib/Lower/OpenMP/Clauses.cpp
    M flang/lib/Parser/openmp-parsers.cpp
    M flang/lib/Parser/parse-tree.cpp
    M flang/lib/Parser/unparse.cpp
    M flang/lib/Semantics/check-omp-structure.cpp
    M flang/lib/Semantics/check-omp-structure.h
    M flang/lib/Semantics/resolve-directives.cpp
    M flang/test/Parser/OpenMP/affinity-clause.f90
    M flang/test/Parser/OpenMP/depobj-construct.f90
    M flang/test/Parser/OpenMP/from-clause.f90
    M flang/test/Parser/OpenMP/in-reduction-clause.f90
    M flang/test/Parser/OpenMP/map-modifiers.f90
    M flang/test/Parser/OpenMP/reduction-modifier.f90
    M flang/test/Parser/OpenMP/target-update-to-clause.f90

  Log Message:
  -----------
  [flang][OpenMP] Normalize clause modifiers that exist on their own (#116655)

This is the first part of the effort to make parsing of clause modifiers
more uniform and robust. Currently, when multiple modifiers are allowed,
the parser will expect them to appear in a hard-coded order.
Additionally, modifier properties (such as "ultimate") are checked
separately for each case.

The overall plan is
1. Extract all modifiers into their own top-level classes, and then
equip them with sets of common properties that will allow performing the
property checks generically, without refering to the specific kind of
the modifier.
2. Define a parser (as a separate class) for each modifier.
3. For each clause define a union (std::variant) of all allowable
modifiers, and parse the modifiers as a list of these unions.

The intent is also to isolate parts of the code that could eventually be
auto-generated.

OpenMP modifier overhaul: #1/3



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list