mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Perform cheap checks first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0a3ba71a05
commit
dda346aa71
@ -40,6 +40,8 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
|
||||
if (TM.getRelocationModel() != Reloc::Static &&
|
||||
TM.getCodeModel() != CodeModel::Large) {
|
||||
if (isTargetDarwin()) {
|
||||
if (!isDirectCall)
|
||||
return false;
|
||||
bool isDecl = GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode();
|
||||
if (GV->hasHiddenVisibility() &&
|
||||
(Is64Bit || (!isDecl && !GV->hasCommonLinkage())))
|
||||
@ -47,7 +49,7 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
|
||||
// target is x86-64 or the symbol is definitely defined in the current
|
||||
// translation unit.
|
||||
return false;
|
||||
return !isDirectCall && (isDecl || GV->mayBeOverridden());
|
||||
return isDecl || GV->mayBeOverridden();
|
||||
} else if (isTargetELF()) {
|
||||
// Extra load is needed for all externally visible.
|
||||
if (isDirectCall)
|
||||
|
Loading…
Reference in New Issue
Block a user