mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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() ||
|
||||
|
Reference in New Issue
Block a user