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

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 479e335fc37c06767654141358ea076ac066de11
      https://github.com/llvm/llvm-project/commit/479e335fc37c06767654141358ea076ac066de11
  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