diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-02-03 21:40:40 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-02-03 21:40:40 +0000 |
| commit | f4139067ee26ab01c6f536e8ba3f3572838589b7 (patch) | |
| tree | 81363a0f38e23a1e73de7eb7cfcea7c503f92b84 /llvm | |
| parent | 112a871fe27f6eed40be8f3ea4db79b66e99d19f (diff) | |
| download | bcm5719-llvm-f4139067ee26ab01c6f536e8ba3f3572838589b7.tar.gz bcm5719-llvm-f4139067ee26ab01c6f536e8ba3f3572838589b7.zip | |
Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
llvm-svn: 95259
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/tailcall2.ll | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 9d6b5a39b2a..2b5ff3ca1a9 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -52,6 +52,7 @@ using namespace llvm; STATISTIC(NumTailCalls, "Number of tail calls"); +static cl::opt<unsigned> TailCallLimit("tailcall-limit", cl::init(0)); static cl::opt<bool> DisableMMX("disable-mmx", cl::Hidden, cl::desc("Disable use of MMX")); @@ -2271,6 +2272,8 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee, // Look for obvious safe cases to perform tail call optimization that does not // requite ABI changes. This is what gcc calls sibcall. + if (NumTailCalls >= TailCallLimit) + return false; // Do not tail call optimize vararg calls for now. if (isVarArg) diff --git a/llvm/test/CodeGen/X86/tailcall2.ll b/llvm/test/CodeGen/X86/tailcall2.ll index 3cd8b26f608..b35fc4b5a58 100644 --- a/llvm/test/CodeGen/X86/tailcall2.ll +++ b/llvm/test/CodeGen/X86/tailcall2.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=32 ; RUN: llc < %s -march=x86-64 -asm-verbose=false | FileCheck %s -check-prefix=64 +; XFAIL: * define void @t1(i32 %x) nounwind ssp { entry: |

