[Openmp-commits] [PATCH] D105955: [NFC][OpenMP][Offloading] Replaced explicit parallel level computation with function `__kmpc_parallel_level`

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Jul 14 01:55:17 PDT 2021


JonChesterfield added a comment.

kmpc_parallel_level is defined in parallel.cu as

  EXTERN uint16_t __kmpc_parallel_level(kmp_Ident *loc, uint32_t global_tid) {
    PRINT0(LD_IO, "call to __kmpc_parallel_level\n");
  
    return parallelLevel[GetWarpId()] & (OMP_ACTIVE_PARALLEL_LEVEL - 1);
  }

Similar to the last patch, we should drop the PRINT0 in that call before adding extra calls to it elsewhere.

The function interface is clang-internal, let's change it to take void instead of a couple of ignored arguments. That will slightly simplify clang codegen and means the pass that looks for and replaces calls to it doesn't have to check for side effects in the computation of the subsequently ignored arguments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105955



More information about the Openmp-commits mailing list