[all-commits] [llvm/llvm-project] db2881: [llvm] Teach whole program devirtualization about ...

PiJoules via All-commits all-commits at lists.llvm.org
Thu Feb 23 14:19:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db288184765c0b4010060ebea1f6de3ac1f66445
      https://github.com/llvm/llvm-project/commit/db288184765c0b4010060ebea1f6de3ac1f66445
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/TypeMetadataUtils.h
    M llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
    M llvm/lib/Analysis/TypeMetadataUtils.cpp
    M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
    M llvm/test/ThinLTO/X86/devirt.ll
    M llvm/test/Transforms/WholeProgramDevirt/Inputs/export.yaml
    M llvm/test/Transforms/WholeProgramDevirt/branch-funnel.ll
    M llvm/test/Transforms/WholeProgramDevirt/constant-arg.ll
    M llvm/test/Transforms/WholeProgramDevirt/devirt-single-impl-check.ll
    M llvm/test/Transforms/WholeProgramDevirt/devirt-single-impl-multiple-assumes.ll
    M llvm/test/Transforms/WholeProgramDevirt/devirt-single-impl.ll
    M llvm/test/Transforms/WholeProgramDevirt/pointer-vtable.ll

  Log Message:
  -----------
  [llvm] Teach whole program devirtualization about relative vtables

Prior to this patch, WPD was not acting on relative-vtables in C++. This
involves teaching WPD about these things:

- llvm.load.relative which is how relative-vtables are indexed (instead of GEP)
- dso_local_equivalent which is used in the vtable itself when taking the
  offset between a virtual function and vtable
- Update llvm/test/ThinLTO/X86/devirt.ll to use opaque pointers and add
  equivalent tests for RV

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




More information about the All-commits mailing list