the "isDirectCall" operand of GVRequiresRegister is always false, eliminate it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75229 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-07-10 05:37:11 +00:00
parent 0aa43de1d0
commit 04b304caf6
3 changed files with 9 additions and 11 deletions

View File

@@ -76,15 +76,14 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
/// cases where GVRequiresExtraLoad is true. Some variations of PIC require
/// a register, but not an extra load.
bool X86Subtarget::GVRequiresRegister(const GlobalValue *GV,
const TargetMachine& TM,
bool isDirectCall) const {
if (GVRequiresExtraLoad(GV, TM, isDirectCall))
const TargetMachine &TM) const {
if (GVRequiresExtraLoad(GV, TM, false))
return true;
// Code below here need only consider cases where GVRequiresExtraLoad
// returns false.
if (TM.getRelocationModel() == Reloc::PIC_)
return !isDirectCall &&
(GV->hasLocalLinkage() || GV->hasExternalLinkage());
return GV->hasLocalLinkage() || GV->hasExternalLinkage();
return false;
}