[llvm-commits] [llvm] r133824 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Chad Rosier
mcrosier at apple.com
Fri Jun 24 14:15:36 PDT 2011
Author: mcrosier
Date: Fri Jun 24 16:15:36 2011
New Revision: 133824
URL: http://llvm.org/viewvc/llvm-project?rev=133824&view=rev
Log:
Hoist simple check above more complex checking to avoid unnecessary
overheads. No functional change intended.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=133824&r1=133823&r2=133824&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jun 24 16:15:36 2011
@@ -2556,6 +2556,11 @@
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 @@
}
}
- // 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;
}
More information about the llvm-commits
mailing list