[PATCH] D135427: [ThinLTO] Make local linkage GlobalValue in non-prevailing comdat available_externally

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 00:31:14 PDT 2022


MaskRay created this revision.
MaskRay added reviewers: rnk, tejohnson, xur.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, inglorion.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

See the updated linkonce_resolution_comdat.ll. For a local linkage GV in a
non-prevailing comdat, it remains defined while its leader has been made
available_externally. This violates the comdat rule that its members must be
retained or discarded as a unit.

To fix this, track such non-prevailing COMDAT and make all members available_externally.

Fix https://github.com/llvm/llvm-project/issues/58215: a private profd in a
non-prevailing comdat was not made available_externally.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135427

Files:
  llvm/lib/Transforms/IPO/FunctionImport.cpp
  llvm/test/ThinLTO/X86/Inputs/linkonce_resolution_comdat.ll
  llvm/test/ThinLTO/X86/linkonce_resolution_comdat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135427.465984.patch
Type: text/x-patch
Size: 6143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221007/d8a77a65/attachment.bin>


More information about the llvm-commits mailing list