[PATCH] D154568: OpenMP GPU simd directive code generation

Eric Wright via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 23:24:54 PDT 2023


efwright created this revision.
efwright added a reviewer: jdoerfert.
Herald added subscribers: sunshaoce, guansong, hiraditya, yaxunl.
Herald added a project: All.
efwright requested review of this revision.
Herald added subscribers: llvm-commits, openmp-commits, cfe-commits, jplehr, sstefan1.
Herald added projects: clang, OpenMP, LLVM.

This is a portion of the work for implementing OpenMP's "simd" loop directive for GPUs. For now only working on upstreaming the code generation portion. Right now the runtime just runs the loop sequentially.

Style-wise we're using a similar methodology of other directives in libomptarget where the "parallel region" is outlined, and passed as an argument into the appropriate runtime function. These changes are in the OMPIRBuilder and right now are only enabled if OMPIRBuilder is enabled. The code also depends on the OMPCanonicalLoop class existing in the AST, which currently only happens when the OMPIRBuilder is enabled.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154568

Files:
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/CodeGen/CodeGenFunction.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  openmp/libomptarget/DeviceRTL/src/Workshare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154568.537592.patch
Type: text/x-patch
Size: 23566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230706/4d6cfeae/attachment.bin>


More information about the llvm-commits mailing list