[all-commits] [llvm/llvm-project] ce1c15: [flang][OpenMP] Version-dependent parsing of map-t...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Sat Aug 1 11:09:48 PDT 2026


  Branch: refs/heads/users/kparzysz/p02-version-dependent-map-type
  Home:   https://github.com/llvm/llvm-project
  Commit: ce1c15a062ad4bfa8d6ad3c2f4394435ad1ee5f5
      https://github.com/llvm/llvm-project/commit/ce1c15a062ad4bfa8d6ad3c2f4394435ad1ee5f5
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2026-08-01 (Sat, 01 Aug 2026)

  Changed paths:
    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/Semantics/canonicalize-omp.cpp
    M flang/test/Parser/OpenMP/map-modifiers-v60.f90
    M flang/test/Parser/OpenMP/map-modifiers.f90

  Log Message:
  -----------
  [flang][OpenMP] Version-dependent parsing of map-type-modifier

Up until 5.2, ALWAYS, CLOSE, and PRESENT were keywords of the
map-type-modifier. Starting from 6.0 they all became their own
single-keyword modifiers. This allowed specifying them together,
unlike in the past where map-type-modifier was unique.

To avoid using a single representation of the modifiers, and be
able to validate them through non-conditional properties, the
AST was rewritten back to the older form in canonicalization
when the spec version was set to 5.2 or earlier.

Now that the parser is version-aware, it can generate the desired
AST from the start.

Additionally, extract the OMPX_HOLD modifier out of the map-type-
modifier into its own AST node regardless of version.



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