This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Teach GlobalDCE about dso_local_equivalent
ClosedPublic

Authored by leonardchan on Oct 13 2022, 6:26 PM.

Details

Summary

This way, C++ relative-vtables can also participate in GlobalDCE. This depends on some TypeMetadataUtils.cpp bits in D134320, but that dependency can be removed and included here if necessary.

Diff Detail

Event Timeline

leonardchan created this revision.Oct 13 2022, 6:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 6:26 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
leonardchan requested review of this revision.Oct 13 2022, 6:26 PM
leonardchan edited the summary of this revision. (Show Details)

I only stumbled upon this from a brief comment in D134320 which led to D107645. AFAICT, there isn't an easy way to statically determine which optimizations would be interesting/operate on vtables in general. Are there perhaps other ones I should consider?

*ping* any comments on this?

pcc accepted this revision.Jan 19 2023, 6:37 PM

LGTM

This revision is now accepted and ready to land.Jan 19 2023, 6:37 PM
This revision was landed with ongoing or failed builds.Feb 23 2023, 3:14 PM
This revision was automatically updated to reflect the committed changes.