[all-commits] [llvm/llvm-project] 67c82d: [Frontend] Add leaf constructs and association to ...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Wed Mar 6 08:46:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67c82d6ffb4bbc21212116a11f390761d859297a
      https://github.com/llvm/llvm-project/commit/67c82d6ffb4bbc21212116a11f390761d859297a
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2024-03-06 (Wed, 06 Mar 2024)

  Changed paths:
    M clang/lib/Basic/OpenMPKinds.cpp
    M llvm/include/llvm/Frontend/Directive/DirectiveBase.td
    M llvm/include/llvm/Frontend/OpenACC/ACC.td
    M llvm/include/llvm/Frontend/OpenMP/OMP.td
    M llvm/include/llvm/TableGen/DirectiveEmitter.h
    M llvm/test/TableGen/directive1.td
    M llvm/test/TableGen/directive2.td
    M llvm/utils/TableGen/DirectiveEmitter.cpp

  Log Message:
  -----------
  [Frontend] Add leaf constructs and association to OpenMP/ACC directives (#83625)

Add members "leafConstructs" and "association" to .td describing
OpenMP/ACC directives. The naming follows the terminology used in the
OpenMP standard: a "leaf" construct is a construct that is itself not a
composition or a combination of other constructs, and "association" is
the source language construct to which the directive applies (e.g. loop,
block, etc.)

The tblgen-generated output then contains two additional functions
- getLeafConstructs(D), and
- getDirectiveAssociation(D)
plus "enum class Association", all in namespaces "llvm::omp" and
"llvm::acc".

Note: getLeafConstructs returns an empty sequence for a construct that
is itself a leaf construct.

Use the new functions to simplify a few OpenMP-related functions in
clang.



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