diff options
author | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-07 23:21:52 +0000 |
---|---|---|
committer | Johannes Doerfert <jdoerfert@anl.gov> | 2019-10-07 23:21:52 +0000 |
commit | 766f2cc1a4bbe5008efc75d0439e8cee2813e76c (patch) | |
tree | ebf23f4069d6c49b0fdee59473b9b5ca66fbe5ab /llvm/lib/Transforms | |
parent | 661db04b98c9905ec38a218bd421327b7b888c13 (diff) | |
download | bcm5719-llvm-766f2cc1a4bbe5008efc75d0439e8cee2813e76c.tar.gz bcm5719-llvm-766f2cc1a4bbe5008efc75d0439e8cee2813e76c.zip |
[Attributor] Use local linkage instead of internal
Local linkage is internal or private, and private is a specialization of
internal, so either is fine for all our "local linkage" queries.
llvm-svn: 373986
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/Attributor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 6c389f33f73..0bd454d8865 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -2081,7 +2081,7 @@ struct AAIsDeadImpl : public AAIsDead { for (const Instruction &I : BB) if (ImmutableCallSite ICS = ImmutableCallSite(&I)) if (const Function *F = ICS.getCalledFunction()) - if (F->hasInternalLinkage()) + if (F->hasLocalLinkage()) A.markLiveInternalFunction(*F); } @@ -3933,7 +3933,7 @@ bool Attributor::checkForAllCallSites( if (!AssociatedFunction) return false; - if (RequireAllCallSites && !AssociatedFunction->hasInternalLinkage()) { + if (RequireAllCallSites && !AssociatedFunction->hasLocalLinkage()) { LLVM_DEBUG( dbgs() << "[Attributor] Function " << AssociatedFunction->getName() @@ -4319,7 +4319,7 @@ ChangeStatus Attributor::run(Module &M) { // below fixpoint loop will identify and eliminate them. SmallVector<Function *, 8> InternalFns; for (Function &F : M) - if (F.hasInternalLinkage()) + if (F.hasLocalLinkage()) InternalFns.push_back(&F); bool FoundDeadFn = true; @@ -4634,7 +4634,7 @@ static bool runAttributorOnModule(Module &M, AnalysisGetter &AG) { // We look at internal functions only on-demand but if any use is not a // direct call, we have to do it eagerly. - if (F.hasInternalLinkage()) { + if (F.hasLocalLinkage()) { if (llvm::all_of(F.uses(), [](const Use &U) { return ImmutableCallSite(U.getUser()) && ImmutableCallSite(U.getUser()).isCallee(&U); |