[all-commits] [llvm/llvm-project] b9f67d: [OpenMP] Replace device kernel linkage with weak_odr

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Mar 25 08:29:31 PDT 2022


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

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/amdgcn_target_codegen.cpp
    M clang/test/OpenMP/assumes_include_nvptx.cpp
    M clang/test/OpenMP/declare_target_codegen.cpp
    M clang/test/OpenMP/declare_target_link_codegen.cpp
    M clang/test/OpenMP/metadirective_device_isa_codegen_amdgcn.cpp
    M clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_firstprivate_codegen.cpp
    M clang/test/OpenMP/target_private_codegen.cpp
    M clang/test/OpenMP/target_reduction_codegen.cpp

  Log Message:
  -----------
  [OpenMP] Replace device kernel linkage with weak_odr

Currently the device kernels all have weak linkage to prevent linkage
errors on multiple defintions. However, this prevents some optimizations
from adequately analyzing them because of the nature of weak linkage.
This patch replaces the weak linkage with weak_odr linkage so we can
statically assert that multiple declarations of the same kernel will
have the same definition.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list