[Openmp-commits] [PATCH] D92197: [OpenMP] Avoid internal calls to external compiler interface (kmpc)

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Nov 26 15:33:57 PST 2020


protze.joachim created this revision.
protze.joachim added reviewers: hbae, AndreyChurbanov.
protze.joachim added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
protze.joachim requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

Currently, OMPT works around the issue of internal calls to the kmpc interface, because we need to collect frame and return address on entry to the runtime.
This patch adds `__kmp_aux_` variants for all internally called `__kmpc_` functions and replaces all internal calls, so that only compiler generated code will call the external kmpc interface.

The `KMP_ASSERT` in the return address guard now successfully shows that no return address is temporarily stored when we try to store a new address on entering the runtime. I'll replace the assert by `KMP_DEBUG_ASSERT`.
In my adhoc tests with epcc benchmarks I didn't see performance regressions from this patch, but I recommend to run your own regression tests.

This refactoring will allow more consistent handling of OMPT frame and state information in the next step.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92197

Files:
  openmp/runtime/src/kmp.h
  openmp/runtime/src/kmp_cancel.cpp
  openmp/runtime/src/kmp_csupport.cpp
  openmp/runtime/src/kmp_dispatch.cpp
  openmp/runtime/src/kmp_gsupport.cpp
  openmp/runtime/src/kmp_runtime.cpp
  openmp/runtime/src/kmp_taskdeps.cpp
  openmp/runtime/src/kmp_tasking.cpp
  openmp/runtime/src/ompt-general.cpp
  openmp/runtime/src/ompt-internal.h
  openmp/runtime/src/ompt-specific.h
  openmp/runtime/test/ompt/cancel/cancel_parallel.c
  openmp/runtime/test/ompt/cancel/cancel_taskgroup.c
  openmp/runtime/test/ompt/tasks/serialized.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92197.307933.patch
Type: text/x-patch
Size: 62340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201126/44d927cc/attachment-0001.bin>


More information about the Openmp-commits mailing list