[all-commits] [llvm/llvm-project] dc09ab: [flang][OpenMP] Store DECLARE_TARGET information i...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Tue Jun 2 05:29:44 PDT 2026


  Branch: refs/heads/users/kparzysz/w02-declare-target-mod
  Home:   https://github.com/llvm/llvm-project
  Commit: dc09abc584c63f344854abdab33084eb89c4a298
      https://github.com/llvm/llvm-project/commit/dc09abc584c63f344854abdab33084eb89c4a298
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M flang/examples/FlangOmpReport/FlangOmpReportVisitor.cpp
    M flang/include/flang/Parser/dump-parse-tree.h
    M flang/include/flang/Parser/parse-tree.h
    M flang/include/flang/Semantics/symbol.h
    M flang/include/flang/Support/Fortran.h
    M flang/lib/Parser/unparse.cpp
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/resolve-directives.cpp
    M flang/lib/Semantics/symbol.cpp
    M flang/test/Parser/OpenMP/declare_target-device_type.f90
    M flang/test/Parser/OpenMP/groupprivate.f90
    A flang/test/Semantics/OpenMP/declare-target-flags.f90
    A flang/test/Semantics/OpenMP/declare-target-modfile.f90
    M flang/test/Semantics/OpenMP/dump-requires-details.f90

  Log Message:
  -----------
  [flang][OpenMP] Store DECLARE_TARGET information in WithOmpDeclarative

This will be used to emit DECLARE_TARGET directives into module files.

When a symbol apperars in DECLARE_TARGET (explicitly or explicitly), the
OmpDeclareTarget flag will be set on it. The set of accompanying clauses
will be stored in the associated details, in the WithOmpDeclarative mixin.
The mixin was added to ObjectEntityDetails, ProcEntityDetails, and
CommonBlockDetails.

The design goal was to be able to reconstruct the appropriate DECLARE_
TARGET directive for individual symbols for the purpose of emitting it
in a module file. Simply storing and then unparsing the AST node may
include symbols that should not be emitted.

Additionally, refactor the WithOmpDeclarative printing code for reuse in
symbol dumping for debugging, and for printing clause sets.



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