summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-02-06 16:07:35 +0000
committerTeresa Johnson <tejohnson@google.com>2016-02-06 16:07:35 +0000
commit5e22e4461d23130484dfdc83d2646f1a92d8e74d (patch)
treec325e41e05c24cfba8d985fef7e09f3d143ce6bb /llvm/lib/IR
parent63b1ecab7ddc4d766263415c70f0794cedc2c11f (diff)
downloadbcm5719-llvm-5e22e4461d23130484dfdc83d2646f1a92d8e74d.tar.gz
bcm5719-llvm-5e22e4461d23130484dfdc83d2646f1a92d8e74d.zip
[ThinLTO] Include linkage type in function summary
Summary: Adds the linkage type to both the per-module and combined function summaries, which subsumes the current islocal bit. This will eventually be used to optimized linkage types based on global summary-based analysis. Reviewers: joker.eph Subscribers: joker.eph, davidxl, llvm-commits Differential Revision: http://reviews.llvm.org/D16943 llvm-svn: 259993
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/FunctionInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/FunctionInfo.cpp b/llvm/lib/IR/FunctionInfo.cpp
index 17a67bcf047..e5f3dbbdb74 100644
--- a/llvm/lib/IR/FunctionInfo.cpp
+++ b/llvm/lib/IR/FunctionInfo.cpp
@@ -50,7 +50,8 @@ void FunctionInfoIndex::mergeFrom(std::unique_ptr<FunctionInfoIndex> Other,
Info->functionSummary()->setModulePath(ModPath);
// If it is a local function, rename it.
- if (Info->functionSummary()->isLocalFunction()) {
+ if (GlobalValue::isLocalLinkage(
+ Info->functionSummary()->getFunctionLinkage())) {
// Any local functions are virtually renamed when being added to the
// combined index map, to disambiguate from other functions with
// the same name. The symbol table created for the combined index
OpenPOWER on IntegriCloud