This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Fix handling of mixed (regular and thin) mode LTO
ClosedPublic

Authored by tejohnson on Sep 15 2016, 7:15 PM.

Details

Summary

In runThinLTO we start the task numbering for ThinLTO backend
tasks depending on whether there was also a regular LTO object
(CombinedModule). However, the CombinedModule is moved at
the end of runRegularLTO, so we need to save this information and
pass it into runThinLTO. Otherwise the AddOutput callback to the client
will use the same task number for both the regular LTO object
and the first ThinLTO object, which in gold-plugin caused only
one to be end up in the output filename array and therefore passed
back to gold for the final native link.

Diff Detail

Event Timeline

tejohnson updated this revision to Diff 71589.Sep 15 2016, 7:15 PM
tejohnson retitled this revision from to [LTO] Fix handling of mixed (regular and thin) mode LTO.
tejohnson updated this object.
tejohnson added reviewers: pcc, mehdi_amini.
tejohnson added a subscriber: kromanova.
mehdi_amini edited edge metadata.Sep 15 2016, 8:24 PM

Can you write the test with llvm-lto2?

tejohnson updated this revision to Diff 71596.Sep 15 2016, 9:41 PM
tejohnson edited edge metadata.

Add llvm-lto2 test

mehdi_amini accepted this revision.Sep 15 2016, 10:22 PM
mehdi_amini edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 15 2016, 10:22 PM
This revision was automatically updated to reflect the committed changes.