[Openmp-commits] [PATCH] D112154: [OpenMP][NFCI] Cleanup new device RT mapping interface

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 20 17:02:22 PDT 2021


jhuber6 added inline comments.


================
Comment at: openmp/libomptarget/DeviceRTL/src/Mapping.cpp:232-239
-extern "C" {
-__attribute__((noinline)) uint32_t __kmpc_get_hardware_thread_id_in_block() {
-  return mapping::getThreadIdInBlock();
-}
-
-__attribute__((noinline)) uint32_t __kmpc_get_hardware_num_threads_in_block() {
-  return mapping::getNumberOfProcessorElements();
----------------
jdoerfert wrote:
> jhuber6 wrote:
> > Why do we want to get rid of these? I thought the idea was to keep these functions so we can generate generic IR in Clang that gets dispatched by the runtime once it's linked in.
> I think we should replace runtime call folding with store->load forwarding. The new runtime does generic store->load forwarding for IsSPMD, as an example, and it works better as we do not need to keep calls around. That said, there is an argument made for both to exist. However, even if, we can simply look for the mangled names of the new runtime once we switched over rather than some `__kmpc` names.
We use these in `OpenMPOpt` and `CGOpenMPRuntimeGPU`, could we replace the definitions in `OMPKinds.def` with the mangled names?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112154/new/

https://reviews.llvm.org/D112154



More information about the Openmp-commits mailing list