[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

Sandeep via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 3 00:46:21 PDT 2023


sandeepkosuri created this revision.
sandeepkosuri added reviewers: ABataev, soumitra, koops, RitanyaB, dreachem.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
sandeepkosuri requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, jplehr, sstefan1.
Herald added projects: clang, OpenMP, LLVM.

- This patch adds support for thread_limit clause on target directive according to OpenMP 51 [2.14.5]
- The idea is to create an outer task for target region, when there is a thread_limit clause, and manipulate the thread_limit of task instead. This way, thread_limit will be applied to all the relevant constructs enclosed by the target region.




Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152054

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.h
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/test/OpenMP/target_codegen.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_csupport.cpp
  openmp/runtime/src/kmp_ftn_entry.h
  openmp/runtime/src/kmp_global.cpp
  openmp/runtime/src/kmp_runtime.cpp
  openmp/runtime/test/target/target_thread_limit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152054.528076.patch
Type: text/x-patch
Size: 16129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230603/64c7cce3/attachment-0001.bin>


More information about the cfe-commits mailing list