[all-commits] [llvm/llvm-project] 148774: [LTO] Prevent devirtualization for symbols dynamic...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Wed Jan 27 15:54:40 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1487747e990ce9f8851f3d92c3006a74134d7518
      https://github.com/llvm/llvm-project/commit/1487747e990ce9f8851f3d92c3006a74134d7518
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2021-01-27 (Wed, 27 Jan 2021)

  Changed paths:
    M lld/ELF/LTO.cpp
    M lld/ELF/Symbols.h
    A lld/test/ELF/lto/devirt_vcall_vis_export_dynamic.ll
    M lld/test/ELF/lto/devirt_vcall_vis_public.ll
    M llvm/include/llvm/LTO/LTO.h
    M llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOCodeGenerator.cpp
    M llvm/lib/LTO/ThinLTOCodeGenerator.cpp
    M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
    A llvm/test/tools/gold/X86/devirt_vcall_vis_export_dynamic.ll
    M llvm/test/tools/gold/X86/devirt_vcall_vis_public.ll
    M llvm/tools/gold/gold-plugin.cpp
    M llvm/tools/opt/opt.cpp

  Log Message:
  -----------
  [LTO] Prevent devirtualization for symbols dynamically exported

Identify dynamically exported symbols (--export-dynamic[-symbol=],
--dynamic-list=, or definitions needed to preempt shared objects) and
prevent their LTO visibility from being upgraded.
This helps avoid use of whole program devirtualization when there may
be overrides in dynamic libraries.

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




More information about the All-commits mailing list