]> granicus.if.org Git - llvm/commit
[ThinLTO] Handle distributed backend case when doing renaming
authorTeresa Johnson <tejohnson@google.com>
Thu, 3 Nov 2016 01:07:16 +0000 (01:07 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 3 Nov 2016 01:07:16 +0000 (01:07 +0000)
commit6e15e36dae54361e9f21b7711ad9bca48923f64a
tree07c8ced8e4599a3dada9aac7ae7011a16fa80e9c
parent2ad749ea5e2d257988092bb6b6a5698e32636a41
[ThinLTO] Handle distributed backend case when doing renaming

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.

Reviewers: mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26250

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285871 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/FunctionImportUtils.cpp
test/ThinLTO/X86/Inputs/distributed_import.ll [new file with mode: 0644]
test/ThinLTO/X86/distributed_import.ll [new file with mode: 0644]