mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-05 13:16:32 +00:00
Hoist simple check above more complex checking to avoid unnecessary
overheads. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2556,6 +2556,11 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
|
|||||||
if (isCalleeStructRet || isCallerStructRet)
|
if (isCalleeStructRet || isCallerStructRet)
|
||||||
return false;
|
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
|
// Do not sibcall optimize vararg calls unless all arguments are passed via
|
||||||
// registers.
|
// registers.
|
||||||
if (isVarArg && !Outs.empty()) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user