[llvm-commits] [llvm] r95259 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll
Evan Cheng
evan.cheng at apple.com
Wed Feb 3 13:40:41 PST 2010
Author: evancheng
Date: Wed Feb 3 15:40:40 2010
New Revision: 95259
URL: http://llvm.org/viewvc/llvm-project?rev=95259&view=rev
Log:
Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/tailcall2.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=95259&r1=95258&r2=95259&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Feb 3 15:40:40 2010
@@ -52,6 +52,7 @@
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 @@
// 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)
Modified: llvm/trunk/test/CodeGen/X86/tailcall2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tailcall2.ll?rev=95259&r1=95258&r2=95259&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/tailcall2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/tailcall2.ll Wed Feb 3 15:40:40 2010
@@ -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:
More information about the llvm-commits
mailing list