aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-11-01 16:46:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-11-01 16:46:18 +0000
commit246c4fb5d91c638b337635821c7d792fe633d602 (patch)
treebc5419a4749d4415b7e5a3aa052a38f763cf14bc /llvm/lib/Target/PowerPC/PPCSubtarget.cpp
parenta017974b9aaef2e959f75c644b8b15189e81b3f8 (diff)
downloadllvm-246c4fb5d91c638b337635821c7d792fe633d602.zip
llvm-246c4fb5d91c638b337635821c7d792fe633d602.tar.gz
llvm-246c4fb5d91c638b337635821c7d792fe633d602.tar.bz2
Remove redundant calls to isMaterializable.
This removes calls to isMaterializable in the following cases: * It was redundant with a call to isDeclaration now that isDeclaration returns the correct answer for materializable functions. * It was followed by a call to Materialize. Just call Materialize and check EC. llvm-svn: 221050
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCSubtarget.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
index d6b964d..04e7ec6 100644
--- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
+++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
@@ -180,9 +180,7 @@ bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV,
// We never have stubs if HasLazyResolverStubs=false or if in static mode.
if (!HasLazyResolverStubs || TM.getRelocationModel() == Reloc::Static)
return false;
- // If symbol visibility is hidden, the extra load is not needed if
- // the symbol is definitely defined in the current translation unit.
- bool isDecl = GV->isDeclaration() && !GV->isMaterializable();
+ bool isDecl = GV->isDeclaration();
if (GV->hasHiddenVisibility() && !isDecl && !GV->hasCommonLinkage())
return false;
return GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||