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

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 1 07:50:18 PST 2020


jdoerfert added a comment.

I'm not convinced. I didn't go over everything but I think we should discuss the goal and choices here first.

I checked the `OmptReturnAddressGuard` and it looks like it is a noop to store a return address if one is set already, right? (assuming same thread)
Could we unconditionally execute `OMPT_STORE_RETURN_ADDRESS(gtid);` instead to avoid the `_aux` stuff?

(Partially related, @AndreyChurbanov  I'd argue the branch in `OmptReturnAddressGuard` is `UNLIKELY` as well, basically all that check `ompt_enabled.enabled` are?)



================
Comment at: openmp/runtime/src/kmp_barrier.cpp:327
     child = 1;
+    OMPT_REDUCTION_DECL_IF(this_thr, gtid, reduce);
     do {
----------------
This is unrelated, right?


================
Comment at: openmp/runtime/src/kmp_cancel.cpp:30
+kmp_int32 __forceinline __kmp_cancel_impl(ident_t *loc_ref, kmp_int32 gtid,
+                                          kmp_int32 cncl_kind) {
   kmp_info_t *this_thr = __kmp_threads[gtid];
----------------
No `__forceinline` please, also elsewhere.


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

https://reviews.llvm.org/D92197



More information about the Openmp-commits mailing list