[all-commits] [llvm/llvm-project] 7373f7: [llvm][EmbedBitcodePass] Prevent modifying the mod...

Paul Kirth via All-commits all-commits at lists.llvm.org
Thu May 29 13:20:57 PDT 2025


  Branch: refs/heads/users/ilovepi/fatlto-wpd-fix
  Home:   https://github.com/llvm/llvm-project
  Commit: 7373f7c53b287c9fcc2339bfe055d0eb60b974f4
      https://github.com/llvm/llvm-project/commit/7373f7c53b287c9fcc2339bfe055d0eb60b974f4
  Author: Paul Kirth <paulkirth at google.com>
  Date:   2025-05-29 (Thu, 29 May 2025)

  Changed paths:
    M llvm/lib/Transforms/IPO/EmbedBitcodePass.cpp
    M llvm/test/Transforms/EmbedBitcode/embed-wpd.ll

  Log Message:
  -----------
  [llvm][EmbedBitcodePass] Prevent modifying the module with ThinLTO

Since ThinLTOBitcodeWriterPass handles many things for CFI and WPD, like
updating vtable linkage, we need to prevent those changes from
persisting in the non-LTO object code we will compile under FatLTO.

The only non-invasive way to do that is to clone the module when
serializing the module in ThinLTOBitcodeWriterPass. We may be able to
avoid cloning in the future with additional infrastructure to restore
the IR to its original state.

Fixes #139440



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list