[all-commits] [llvm/llvm-project] 0567f0: [HIP] [AlwaysInliner] Disable AlwaysInliner to eli...

Anshil Gandhi via All-commits all-commits at lists.llvm.org
Mon Oct 18 15:53:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0567f0333176e476e15b7f32b463f58f7475ff22
      https://github.com/llvm/llvm-project/commit/0567f0333176e476e15b7f32b463f58f7475ff22
  Author: Anshil Gandhi <Anshil.Gandhi at amd.com>
  Date:   2021-10-18 (Mon, 18 Oct 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/CodeGenCUDA/amdgpu-alias-undef-symbols.cu
    M llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
    M llvm/test/CodeGen/AMDGPU/inline-calls.ll

  Log Message:
  -----------
  [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

By default clang emits complete contructors as alias of base constructors if they are the same.
The backend is supposed to emit symbols for the alias, otherwise it causes undefined symbols.
@yaxunl observed that this issue is related to the llvm options `-amdgpu-early-inline-all=true`
and `-amdgpu-function-calls=false`. This issue is resolved by only inlining global values
with internal linkage. The `getCalleeFunction()` in AMDGPUResourceUsageAnalysis also had
to be extended to support aliases to functions. inline-calls.ll was corrected appropriately.

Reviewed By: yaxunl, #amdgpu

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




More information about the All-commits mailing list