[all-commits] [llvm/llvm-project] 32808c: [IR] Track users of comdats

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jan 6 00:14:16 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32808cfb24b8d83a99223b7f797be1dbe5573c10
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-01-06 (Thu, 06 Jan 2022)

  Changed paths:
    M llvm/include/llvm/IR/Comdat.h
    M llvm/include/llvm/IR/GlobalObject.h
    M llvm/lib/IR/Comdat.cpp
    M llvm/lib/IR/Globals.cpp
    M llvm/lib/Transforms/Utils/ModuleUtils.cpp
    M llvm/unittests/IR/ConstantsTest.cpp

  Log Message:
  [IR] Track users of comdats

Track all GlobalObjects that reference a given comdat, which allows
determining whether a function in a comdat is dead without scanning
the whole module.

In particular, this makes filterDeadComdatFunctions() have complexity
O(#DeadFunctions) rather than O(#SymbolsInModule), which addresses
half of the compile-time issue exposed by D115545.

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

More information about the All-commits mailing list