This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Rework llvm-link to use the FunctionImporter
ClosedPublic

Authored by tejohnson on Jan 3 2017, 10:10 PM.

Details

Summary

Change llvm-link to use the FunctionImporter handling, instead of
manually invoking the Linker. We still need to load the module
in llvm-link to do the desired testing for invalid import requests
(weak functions), and to get the GUID (in case the function is local).

Also change the drop-debug-info test to use llvm-link so that importing
is forced (in order to test debug info handling) and independent of
import logic changes.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 83002.Jan 3 2017, 10:10 PM
tejohnson retitled this revision from to [ThinLTO] Rework llvm-link to use the FunctionImporter.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
mehdi_amini accepted this revision.Jan 3 2017, 10:14 PM
mehdi_amini edited edge metadata.

Great! Thanks :)

tools/llvm-link/llvm-link.cpp
259 ↗(On Diff #83002)

Add a comment in front of the 1.0, like:
std::make_pair(F->getGUID(), /* (Unused) threshold */ 1.0)

This revision is now accepted and ready to land.Jan 3 2017, 10:14 PM
This revision was automatically updated to reflect the committed changes.