This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Import virtual method with single implementation in hybrid mode
ClosedPublic

Authored by evgeny777 on Oct 10 2019, 4:26 AM.

Details

Summary

At the moment this is being done in index based WPD, but would be nice to have in hybrid LTO mode as well.

Diff Detail

Event Timeline

evgeny777 created this revision.Oct 10 2019, 4:26 AM
tejohnson added inline comments.Oct 15 2019, 6:32 AM
lib/Transforms/IPO/WholeProgramDevirt.cpp
999 ↗(On Diff #224310)

It might be good to add a comment here about why the return value can be ignored (any needed promotion would have been taken care of when the LTO unit was split IIRC).

1861 ↗(On Diff #224310)

Probably should go ahead and fold markSummaryHasTypeTestAssumeUsers into addSummaryTypeTestAssumeUser since that is the only callsite now.

test/ThinLTO/X86/devirt_single_hybrid.ll
24 ↗(On Diff #224310)

importing it certainly signals that it must have been devirtualized, but it would probably be good to test this explicitly, e.g either checking the call or the pass remark

evgeny777 updated this revision to Diff 225035.Oct 15 2019, 7:33 AM
evgeny777 marked an inline comment as done.

Addressed

This revision is now accepted and ready to land.Oct 15 2019, 8:12 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2019, 12:48 AM