Hoist simple check above more complex checking to avoid unnecessary

overheads.  No functional change intended.

llvm-svn: 133824
This commit is contained in:
Chad Rosier 2011-06-24 21:15:36 +00:00
parent 045e26166a
commit e553e75b15
1 changed files with 5 additions and 5 deletions

View File

@ -2556,6 +2556,11 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
if (isCalleeStructRet || isCallerStructRet)
return false;
// An stdcall caller is expected to clean up its arguments; the callee
// isn't going to do that.
if (!CCMatch && CallerCC==CallingConv::X86_StdCall)
return false;
// Do not sibcall optimize vararg calls unless all arguments are passed via
// registers.
if (isVarArg && !Outs.empty()) {
@ -2692,11 +2697,6 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
}
}
// An stdcall caller is expected to clean up its arguments; the callee
// isn't going to do that.
if (!CCMatch && CallerCC==CallingConv::X86_StdCall)
return false;
return true;
}