[ThinLTO] Support aliased GlobalIFunc
authorSchrodinger ZHU Yifan <i@zhuyi.fan>
Wed, 20 Jul 2022 22:30:38 +0000 (15:30 -0700)
committerFangrui Song <i@maskray.me>
Wed, 20 Jul 2022 22:30:38 +0000 (15:30 -0700)
commit304027206c883b61b76465b3c2a139927ea71344
treeb3554b04aee4c2f76a237b379414a4aa116f894d
parentfe1678d1b2bf395b7b1589001f285d26d4013c37
[ThinLTO] Support aliased GlobalIFunc

Fixes https://github.com/llvm/llvm-project/issues/56290: when an ifunc is
aliased in LTO, clang will attempt to create an alias summary; however, as ifunc
is not included in the module summary, doing so will lead to crash.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D129009
llvm/include/llvm/IR/GlobalIFunc.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/Globals.cpp
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
llvm/test/ThinLTO/X86/alias-ifunc.ll [new file with mode: 0644]