[all-commits] [llvm/llvm-project] 2e6e4e: [OpenMP] Add initial support for `omp [begin/end] ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Dec 16 18:07:18 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e6e4e6aeef71dd8fba038177a34a82b574d2126
      https://github.com/llvm/llvm-project/commit/2e6e4e6aeef71dd8fba038177a34a82b574d2126
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-12-16 (Wed, 16 Dec 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaLambda.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    A clang/test/OpenMP/assumes_codegen.cpp
    A clang/test/OpenMP/assumes_include_nvptx.cpp
    A clang/test/OpenMP/assumes_messages.c
    A clang/test/OpenMP/assumes_print.cpp
    A clang/test/OpenMP/assumes_template_print.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMP.td
    M llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

  Log Message:
  -----------
  [OpenMP] Add initial support for `omp [begin/end] assumes`

The `assumes` directive is an OpenMP 5.1 feature that allows the user to
provide assumptions to the optimizer. Assumptions can refer to
directives (`absent` and `contains` clauses), expressions (`holds`
clause), or generic properties (`no_openmp_routines`, `ext_ABCD`, ...).

The `assumes` spelling is used for assumptions in the global scope while
`assume` is used for executable contexts with an associated structured
block.

This patch only implements the global spellings. While clauses with
arguments are "accepted" by the parser, they will simply be ignored for
now. The implementation lowers the assumptions directly to the
`AssumptionAttr`.

Reviewed By: ABataev

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




More information about the All-commits mailing list