More thoroughly disable tails calls by default.
authorDale Johannesen <dalej@apple.com>
Fri, 4 Jun 2010 18:04:24 +0000 (18:04 +0000)
committerDale Johannesen <dalej@apple.com>
Fri, 4 Jun 2010 18:04:24 +0000 (18:04 +0000)
8060143, although this doesn't fix the real problem with tail call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105472 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp

index 3803937a4933a3d72c0afffabf32dabad4080c34..59790911019ed0b2448e8298ed17cee564e7c8ca 100644 (file)
@@ -999,14 +999,14 @@ ARMTargetLowering::LowerCall(SDValue Chain, SDValue Callee,
   MachineFunction &MF = DAG.getMachineFunction();
   bool IsStructRet    = (Outs.empty()) ? false : Outs[0].Flags.isSRet();
   bool IsSibCall = false;
+  // Temporarily disable tail calls so things don't break.
+  if (!EnableARMTailCalls)
+    isTailCall = false;
   if (isTailCall) {
     // Check if it's really possible to do a tail call.
     isTailCall = IsEligibleForTailCallOptimization(Callee, CallConv,
                     isVarArg, IsStructRet, MF.getFunction()->hasStructRetAttr(),
                                                    Outs, Ins, DAG);
-    // Temporarily disable tail calls so things don't break.
-    if (!EnableARMTailCalls)
-      isTailCall = false;
     // We don't support GuaranteedTailCallOpt for ARM, only automatically
     // detected sibcalls.
     if (isTailCall) {