[Openmp-commits] [PATCH] D105211: [OpenMP][Offloading] Replace all calls to `isSPMDMode` with `__kmpc_is_spmd_exec_mode`

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jun 30 10:35:40 PDT 2021


tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, JonChesterfield, grokos.
Herald added subscribers: uenoku, guansong, yaxunl.
Herald added a reviewer: uenoku.
tianshilei1992 requested review of this revision.
Herald added a reviewer: sstefan1.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: OpenMP.

In our ongoing work, we are using `AbstractAttributor` to deduct execution model
of device functions, and potententially remove unnecessary function calls to
`__kmpc_is_spmd_exec_mode`. In current device runtime, we have mixed use of
`isSPMDMode` and `__kmpc_is_spmd_exec_mode`, but in fact in `__kmpc_is_spmd_exec_mode`
it simply calls `isSPMDMode`. Since all functions starting with `__kmpc` is C
function, which doesn't have things like name mangling. It is more optimization
friendly. In this patch, we simply replaced all calls to `isSPMDMode` with
`__kmpc_is_spmd_exec_mode` (of course except the one in `__kmpc_is_spmd_exec_mode`)
to pave the way for the optimization.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105211

Files:
  openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
  openmp/libomptarget/deviceRTLs/common/src/libcall.cu
  openmp/libomptarget/deviceRTLs/common/src/loop.cu
  openmp/libomptarget/deviceRTLs/common/src/omptarget.cu
  openmp/libomptarget/deviceRTLs/common/src/support.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105211.355619.patch
Type: text/x-patch
Size: 5979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210630/3e53abb4/attachment-0001.bin>


More information about the Openmp-commits mailing list