[all-commits] [llvm/llvm-project] c3efd7: [OpenMP] Handle function calls from `libomp` to `l...

Shilei Tian via All-commits all-commits at lists.llvm.org
Mon May 1 15:49:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3efd7ec575cac19fe204bc5560fad28d16e9a72
      https://github.com/llvm/llvm-project/commit/c3efd7ec575cac19fe204bc5560fad28d16e9a72
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2023-05-01 (Mon, 01 May 2023)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_runtime.cpp
    M openmp/runtime/src/kmp_tasking.cpp

  Log Message:
  -----------
  [OpenMP] Handle function calls from `libomp` to `libomptarget` correctly

D132005 introduced function calls from `libomp` to `libomptarget` if offloading
is enabled. However, the external function declaration may not always work. For
example, it causes a link error on macOS. Currently it is guarded properly by
a macro, but in order to get OpenMP target offloading working on macOS, it has
to be handled correctly. This patch applies the same idea of how we support
target memory extension by using function pointer indirect call for that function.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D149557




More information about the All-commits mailing list