diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-09 04:27:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-09 04:27:47 +0000 |
commit | 3fff30d471ee6f9453c98bdcc4e3e8ebe4692d24 (patch) | |
tree | 717d6c94b6f702c7b54219bd3934f8386a05efcf | |
parent | 88e1fd539e80827931694e667c119ef01c7d1184 (diff) |
all this logic always returns true because GOT mode is never active in x86-64 mode.
Simplify it away, someone should evaluate this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75100 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index fc77806f56..1deeb4560b 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -2057,22 +2057,11 @@ bool X86TargetLowering::IsEligibleForTailCallOptimization(CallSDNode *TheCall, return false; if (CheckTailCallReturnConstraints(TheCall, Ret)) { - MachineFunction &MF = DAG.getMachineFunction(); - unsigned CallerCC = MF.getFunction()->getCallingConv(); - unsigned CalleeCC= TheCall->getCallingConv(); - if (CalleeCC == CallingConv::Fast && CallerCC == CalleeCC) { - // On x86/32Bit PIC/GOT tail calls are supported. - if (getTargetMachine().getRelocationModel() != Reloc::PIC_ || - !Subtarget->isPICStyleGOT() || !Subtarget->is64Bit()) - return true; - - SDValue Callee = TheCall->getCallee(); - // Can only do local tail calls (in same module, hidden or protected) on - // x86_64 PIC/GOT at the moment. - if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) - return G->getGlobal()->hasHiddenVisibility() - || G->getGlobal()->hasProtectedVisibility(); - } + unsigned CallerCC = + DAG.getMachineFunction().getFunction()->getCallingConv(); + unsigned CalleeCC = TheCall->getCallingConv(); + if (CalleeCC == CallingConv::Fast && CallerCC == CalleeCC) + return true; } return false; |