This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Handle distributed backend case when doing renaming
ClosedPublic

Authored by tejohnson on Nov 2 2016, 10:18 AM.

Details

Summary

The recent change I made to consult the summary when deciding whether to
rename (to handle inline asm) in r285513 broke the distributed build
case. In a distributed backend we will only have a portion of the
combined index, specifically for imported modules we only have the
summaries for any imported definitions. When renaming on import we were
asserting because no summary entry was found for a local reference being
linked in (def wasn't imported).

We only need to consult the summary for a renaming decision for the
exporting module. For imports, we would have prevented importing any
references to NoRename values already. Handle the missing summary,
asserting that we are not exporting in that case.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 76733.Nov 2 2016, 10:18 AM
tejohnson retitled this revision from to [ThinLTO] Handle distributed backend case when doing renaming.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
tejohnson updated this revision to Diff 76746.Nov 2 2016, 11:22 AM

The previous assert was too strict - if it is NoRename and we are importing
we should only assert if it was marked as a global to import.

mehdi_amini accepted this revision.Nov 2 2016, 5:42 PM
mehdi_amini edited edge metadata.

LGTM. Thanks

This revision is now accepted and ready to land.Nov 2 2016, 5:42 PM
This revision was automatically updated to reflect the committed changes.