[all-commits] [llvm/llvm-project] e997dc: [OpenMP] Introduce the initial support for OpenMP ...

Shilei Tian via All-commits all-commits at lists.llvm.org
Fri Sep 29 10:11:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e997dca3333823ffe2ea3aea288299f551532dcd
      https://github.com/llvm/llvm-project/commit/e997dca3333823ffe2ea3aea288299f551532dcd
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M clang/include/clang/AST/OpenMPClause.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/OpenMPClause.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    A clang/test/OpenMP/nvptx_target_teams_ompx_bare_codegen.cpp
    A clang/test/OpenMP/ompx_bare_messages.c
    M clang/test/OpenMP/target_teams_ast_print.cpp
    M clang/test/OpenMP/target_teams_codegen.cpp
    M clang/tools/libclang/CIndex.cpp
    M flang/lib/Semantics/check-omp-structure.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMP.td

  Log Message:
  -----------
  [OpenMP] Introduce the initial support for OpenMP kernel language (#66844)

This patch starts the support for OpenMP kernel language, basically to
write
OpenMP target region in SIMT style, similar to kernel languages such as
CUDA.
What included in this first patch is the `ompx_bare` clause for `target
teams`
directive. When `ompx_bare` exists, globalization is disabled such that
local
variables will not be globalized. The runtime init/deinit function calls
will
not be emitted. That being said, almost all OpenMP executable directives
are
not supported in the region, such as parallel, task. This patch doesn't
include
the Sema checks for that, so the use of them is UB. Simple directives,
such as
atomic, can be used. We provide a set of APIs (for C, they are prefix
with
`ompx_`; for C++, they are in `ompx` namespace) to get thread id, block
id, etc.
For more details, you can refer to
https://tianshilei.me/wp-content/uploads/llvm-hpc-2023.pdf.




More information about the All-commits mailing list