summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86ISelLowering.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-06-24 21:15:36 +0000
committerChad Rosier <mcrosier@apple.com>2011-06-24 21:15:36 +0000
commite553e75b15ac089282e2fab43022f22b9aa6640e (patch)
tree264afeef18841e24d0f8cf5fb15958061f96b51b /llvm/lib/Target/X86/X86ISelLowering.cpp
parent045e26166a0dfc8f3c8af04eb4eda63eaff68e76 (diff)
downloadbcm5719-llvm-e553e75b15ac089282e2fab43022f22b9aa6640e.tar.gz
bcm5719-llvm-e553e75b15ac089282e2fab43022f22b9aa6640e.zip
Hoist simple check above more complex checking to avoid unnecessary
overheads. No functional change intended. llvm-svn: 133824
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 13bef08fe53..6c606be5912 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -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;
}
OpenPOWER on IntegriCloud