This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] ThinLTO object file interfaces
AbandonedPublic

Authored by tejohnson on Aug 3 2015, 8:29 AM.

Details

Reviewers
None
Summary

This patch adds the ThinLTOObjectFile class which has interfaces for reading and writing ThinLTO blocks in bitcode files. As discussed in the File API and Data Structures RFC (see below for link), the ThinLTO information is read in different compiler/linker invocations than the rest of the Module IR, which is why the ThinLTO information uses a different ObjectFile subclass and a data structure outside of the Module class. See the RFC for more details.

The ThinLTO function index/summary data structures are defined in http://reviews.llvm.org/D11721, and the bitcode reading/writing support is defined in http://reviews.llvm.org/D11722.

Related RFCs:
RFC: ThinLTO File Format (http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-August/088947.html)
RFC: ThinLTO File API and Data Structures (http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-August/088951.html)

Diff Detail

Event Timeline

tejohnson updated this revision to Diff 31235.Aug 3 2015, 8:29 AM
tejohnson retitled this revision from to [ThinLTO] ThinLTO object file interfaces.
tejohnson updated this object.

Pinging since the first one didn't get sent to llvm-commits (I added the subscriber after uploading, which apparently doesn't work well).

tejohnson updated this object.Aug 12 2015, 2:36 PM
tejohnson updated this revision to Diff 32046.Aug 13 2015, 6:50 AM
tejohnson updated this object.

Updated to remove native wrapper support (as I did yesterday with the bitcode reading/writing patch http://reviews.llvm.org/D11722), as per discussion in RFC thread on the ThinLTO File Format.

tejohnson updated this revision to Diff 32377.Aug 17 2015, 9:38 PM

I added changes to the gold-plugin.cpp to use the interfaces here and in related patches D11721 and D11722 to implement ThinLTO phase-2 compilation which checks if the linked files contain ThinLTO information, and if so simply builds and writes the combined index file and exits.

Also removed an interface that wasn't necessary for writing the combined index..

tejohnson updated this revision to Diff 32487.Aug 18 2015, 5:57 PM

Update function name per new D11722 patch.