This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Only emit referenced type id records in index files
ClosedPublic

Authored by tejohnson on Jul 19 2018, 1:51 PM.

Details

Summary

Currently all type ids are emitted into the index file when it is
written. For distributed ThinLTO, that meant that all type ids were
being duplicated into every single distributed index file, regardless of
whether they were referenced, leading to huge amounts of unnecessary
duplication and size bloat.

Keep track of the type id GUIDs actually referenced by the GV summary
records being emitted, and only emit those type IDs.

Add a new test, and fix test/Assembler/thinlto-summary.ll so that all
type ids are referenced to prevent deletion in that test.

Diff Detail

Event Timeline

tejohnson created this revision.Jul 19 2018, 1:51 PM
pcc accepted this revision.Jul 19 2018, 2:24 PM

LGTM

test/ThinLTO/X86/cfi-distributed.ll
19

You mean @test2?

25

Ditto

This revision is now accepted and ready to land.Jul 19 2018, 2:24 PM
tejohnson marked 2 inline comments as done.Jul 19 2018, 3:29 PM
tejohnson added inline comments.
test/ThinLTO/X86/cfi-distributed.ll
19

Yep, fixed here and below.

tejohnson updated this revision to Diff 156377.Jul 19 2018, 3:30 PM
tejohnson marked an inline comment as done.

Fix test comments

This revision was automatically updated to reflect the committed changes.