[all-commits] [llvm/llvm-project] 03375a: [HIP] [AlwaysInliner] Disable AlwaysInliner to eli...
Anshil Gandhi via All-commits
all-commits at lists.llvm.org
Fri Oct 15 10:39:35 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 03375a3fb33b11e1249d9c88070b7f33cb97802a
https://github.com/llvm/llvm-project/commit/03375a3fb33b11e1249d9c88070b7f33cb97802a
Author: Anshil Gandhi <Anshil.Gandhi at amd.com>
Date: 2021-10-15 (Fri, 15 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