[all-commits] [llvm/llvm-project] 0d16c2: [OpenMP] Do not create offloading entries for inte...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Mar 23 15:27:32 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d16c23af1da2e7c83c84cf64f8b76947f038044
      https://github.com/llvm/llvm-project/commit/0d16c23af1da2e7c83c84cf64f8b76947f038044
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    A clang/test/OpenMP/declare_target_visibility_codegen.cpp
    M clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp

  Log Message:
  -----------
  [OpenMP] Do not create offloading entries for internal or hidden symbols

Currently we create offloading entries to register device variables with
the host. When we register a variable we will look up the symbol in the
device image and map the device address to the host address. This is a
problem when the symbol is declared with hidden visibility or internal
linkage. This means the symbol is not accessible externally and we
cannot get its address. We should still allow static variables to be
declared on the device, but ew should not create an offloading entry for
them so they exist independently on the host and device.

Fixes #54309

Reviewed By: jdoerfert

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




More information about the All-commits mailing list