[all-commits] [llvm/llvm-project] c7d7b9: OpenMP 5.0 metadirective

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Fri Sep 17 14:03:34 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7d7b98e5263472f05b2f3cb767b5d16e1349e9a
      https://github.com/llvm/llvm-project/commit/c7d7b98e5263472f05b2f3cb767b5d16e1349e9a
  Author: cchen <chichun.chen at hpe.com>
  Date:   2021-09-17 (Fri, 17 Sep 2021)

  Changed paths:
    M clang/include/clang-c/Index.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/StmtOpenMP.h
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/StmtNodes.td
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/lib/AST/OpenMPClause.cpp
    M clang/lib/AST/StmtOpenMP.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/Basic/OpenMPKinds.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaExceptionSpec.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    A clang/test/OpenMP/metadirective_ast_print.c
    A clang/test/OpenMP/metadirective_device_kind_codegen.c
    A clang/test/OpenMP/metadirective_device_kind_codegen.cpp
    A clang/test/OpenMP/metadirective_empty.cpp
    A clang/test/OpenMP/metadirective_implementation_codegen.c
    A clang/test/OpenMP/metadirective_implementation_codegen.cpp
    A clang/test/OpenMP/metadirective_messages.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/tools/libclang/CXCursor.cpp
    M flang/lib/Semantics/check-omp-structure.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMP.td

  Log Message:
  -----------
  OpenMP 5.0 metadirective

This patch supports OpenMP 5.0 metadirective features.
It is implemented keeping the OpenMP 5.1 features like dynamic user condition in mind.

A new function, getBestWhenMatchForContext, is defined in llvm/Frontend/OpenMP/OMPContext.h

Currently this function return the index of the when clause with the highest score from the ones applicable in the Context.
But this function is declared with an array which can be used in OpenMP 5.1 implementation to select all the valid when clauses which can be resolved in runtime. Currently this array is set to null by default and its implementation is left for future.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list