]> granicus.if.org Git - llvm/commit
[ThinLTO/WPD] Ensure devirtualized targets use promoted symbol when necessary
authorTeresa Johnson <tejohnson@google.com>
Wed, 2 Oct 2019 16:36:59 +0000 (16:36 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 2 Oct 2019 16:36:59 +0000 (16:36 +0000)
commit27deee64136d4de67be22ee18a7c22cb27b6a211
tree4abd7047e586ffdab6c180f329b04451463786a6
parentc766f1fc508e98f38e4d0663d6a470374c3c45aa
[ThinLTO/WPD] Ensure devirtualized targets use promoted symbol when necessary

Summary:
This fixes a hole in the handling of devirtualized targets that were
local but need promoting due to devirtualization in another module. We
were not correctly referencing the promoted symbol in some cases. Make
sure the code that updates the name also looks at the ExportedGUIDs set
by utilizing a callback that checks all conditions (the callback
utilized by the internalization/promotion code).

Reviewers: pcc, davidxl, hiraditya

Subscribers: mehdi_amini, Prazek, inglorion, steven_wu, dexonsmith, dang, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373485 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO/WholeProgramDevirt.h
lib/LTO/LTO.cpp
lib/Transforms/IPO/WholeProgramDevirt.cpp
test/ThinLTO/X86/Inputs/devirt_promote.ll [new file with mode: 0644]
test/ThinLTO/X86/devirt_promote.ll [new file with mode: 0644]