[all-commits] [llvm/llvm-project] 55c7d5: [llvm][EmbedBitcodePass] Prevent modifying the mod...

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 55c7d5cdadc4dd0fab843992e0fb31ef7ea6fda4
      https://github.com/llvm/llvm-project/commit/55c7d5cdadc4dd0fab843992e0fb31ef7ea6fda4
  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 (#139999)

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