This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable()
ClosedPublic

Authored by int3 on Feb 18 2022, 5:49 PM.

Details

Summary

Per discussion on
https://reviews.llvm.org/D59709#inline-1148734, this seems like the
right course of action. canBeOmittedFromSymbolTable() subsumes and
generalizes the previous logic. In addition to handling linkonce_odr
unnamed_addr globals, we now also internalize linkonce_odr +
local_unnamed_addr constants.

Diff Detail

Event Timeline

int3 created this revision.Feb 18 2022, 5:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 5:49 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
int3 requested review of this revision.Feb 18 2022, 5:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 5:49 PM
int3 added a comment.Mar 1 2022, 10:12 AM

bump -- @tejohnson, could you take a look? :)

tejohnson accepted this revision.Mar 2 2022, 12:17 PM

LGTM, thanks for fixing! One suggestion below for updating the test description. Also, can you update the patch description to note specifically what is changing as a result of the patch - i.e. that local_unnamed_addr constants can now also be auto hidden. The current summary mentions that the prior approach only handled linkonce_odr globals, which is still the case.

llvm/test/ThinLTO/X86/linkonce_odr_unnamed_addr.ll
1

Update comment.

This revision is now accepted and ready to land.Mar 2 2022, 12:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2022, 12:17 PM
int3 updated this revision to Diff 412512.Mar 2 2022, 12:39 PM
int3 marked an inline comment as done.
int3 edited the summary of this revision. (Show Details)

update comments and commit msg

This revision was landed with ongoing or failed builds.Mar 3 2022, 4:04 PM
This revision was automatically updated to reflect the committed changes.