[PATCH] D97013: [LTO] Fix cloning of llvm*.used when splitting module

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 17:26:29 PST 2021


tejohnson created this revision.
tejohnson added a reviewer: MaskRay.
Herald added subscribers: steven_wu, hiraditya, inglorion.
tejohnson requested review of this revision.
Herald added a project: LLVM.

Refines the fix in 3c4c205060c9398da705eb71b63ddd8a04999de9 <https://reviews.llvm.org/rG3c4c205060c9398da705eb71b63ddd8a04999de9> to only
put globals whose defs were cloned into the split regular LTO module
on the cloned llvm*.used globals. This avoids an issue where one of the
attached values was a local that was promoted in the original module
after the module was cloned. We only need to have the values defined in
the new module on those globals.

Fixes PR49251.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97013

Files:
  llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  llvm/lib/Transforms/Utils/ModuleUtils.cpp
  llvm/test/Transforms/ThinLTOBitcodeWriter/split-used.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97013.324822.patch
Type: text/x-patch
Size: 4481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210219/fc5ebb56/attachment.bin>


More information about the llvm-commits mailing list