[all-commits] [llvm/llvm-project] 239c83: Add switch to use "source_filename" instead of a h...

Bill Wendling via All-commits all-commits at lists.llvm.org
Wed Aug 3 16:42:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 239c831de4d09530ebd4e254f9248764792afa5e
      https://github.com/llvm/llvm-project/commit/239c831de4d09530ebd4e254f9248764792afa5e
  Author: Bill Wendling <morbo at google.com>
  Date:   2022-08-03 (Wed, 03 Aug 2022)

  Changed paths:
    M llvm/include/llvm/IR/ModuleSummaryIndex.h
    M llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
    A llvm/test/ThinLTO/X86/Inputs/promote-local-name-1.ll
    A llvm/test/ThinLTO/X86/promote-local-name.ll

  Log Message:
  -----------
  Add switch to use "source_filename" instead of a hash ID for globally promoted local

During LTO a local promoted to a global gets a unique suffix based on
a hash of the module IR. This means that changes in the local's module
can affect the contents in another module that imported it (because the name
of the imported promoted local is changed, but that doesn't reflect a
real change in the importing module). So any tool that's
validating changes to the importing module will see a superficial change.

Instead of using the module hash, we can use the "source_filename" if it
exists to generate a unique identifier that doesn't change due to LTO
shenanigans.

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




More information about the All-commits mailing list