This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO/gold] Enable summary-based internalization
ClosedPublic

Authored by tejohnson on Jun 7 2016, 8:53 AM.

Details

Summary

Enable existing summary-based importing support in the gold-plugin.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 59897.Jun 7 2016, 8:53 AM
tejohnson retitled this revision from to [ThinLTO/gold] Enable summary-based internalization.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
pcc added a subscriber: pcc.Jun 7 2016, 10:58 AM

Test cases please (for the changes to FunctionImport and the gold plugin).

tejohnson updated this revision to Diff 59966.Jun 7 2016, 4:22 PM
  • Add new tests.
In D21080#451305, @pcc wrote:

Test cases please (for the changes to FunctionImport and the gold plugin).

Done - 2 test cases added.

mehdi_amini edited edge metadata.Jun 8 2016, 11:21 AM

(Forgot to click submit in phab)

lib/Transforms/IPO/FunctionImport.cpp
534 ↗(On Diff #59966)

Note: we plan to change the alias representation to https://llvm.org/bugs/show_bug.cgi?id=27866 ; which I believe will make this issue obsolete. It may even remove the need for the aliases representation in the summary (not sure what are the implications about comdats).

Also, this seems like a bug fix that could be exposed with llvm-lto, and thus be split out of this patch?

mehdi_amini added inline comments.Jun 8 2016, 11:25 AM
tools/gold/gold-plugin.cpp
1326 ↗(On Diff #59966)

Could these contain directly GUIDs?

1367 ↗(On Diff #59966)

Isn't there an API to subtract a set from another one?

tejohnson added inline comments.Jun 8 2016, 11:33 AM
lib/Transforms/IPO/FunctionImport.cpp
534 ↗(On Diff #59966)

Ok, I can add a FIXME to reevaluate this after that bug is fixed.

Let me see if I can provoke this with llvm-lto and split it out.

tools/gold/gold-plugin.cpp
1326 ↗(On Diff #59966)

Yes, will switch.

1367 ↗(On Diff #59966)

Not that I could find in either StringSet or DenseSet.

tejohnson added inline comments.Jun 8 2016, 11:52 AM
lib/Transforms/IPO/FunctionImport.cpp
534 ↗(On Diff #59966)

Can't reproduce with llvm-lto. I think it is specific to the way the gold plugin handles setting up the list of symbols to link in (it doesn't link in the preempted weak symbol).

tejohnson updated this revision to Diff 60086.Jun 8 2016, 12:55 PM
tejohnson edited edge metadata.
  • Address Mehdi's comments.
mehdi_amini accepted this revision.Jun 8 2016, 6:18 PM
mehdi_amini edited edge metadata.
This revision is now accepted and ready to land.Jun 8 2016, 6:18 PM
This revision was automatically updated to reflect the committed changes.