[llvm-branch-commits] [llvm-branch] r110850 - /llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp

Bob Wilson bob.wilson at apple.com
Wed Aug 11 13:45:38 PDT 2010


Author: bwilson
Date: Wed Aug 11 15:45:38 2010
New Revision: 110850

URL: http://llvm.org/viewvc/llvm-project?rev=110850&view=rev
Log:
Restore option to enable/disable ARM tail calls and disable it by default.
This works around a problem where the linker cannot handle Thumb-to-Thumb
B.W instructions.  Radar 8290448.

Modified:
    llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp?rev=110850&r1=110849&r2=110850&view=diff
==============================================================================
--- llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/branches/Apple/Pertwee/lib/Target/ARM/ARMISelLowering.cpp Wed Aug 11 15:45:38 2010
@@ -51,6 +51,12 @@
 
 STATISTIC(NumTailCalls, "Number of tail calls");
 
+// This option should go away when tail calls fully work.
+static cl::opt<bool>
+EnableARMTailCalls("arm-tail-calls", cl::Hidden,
+  cl::desc("Generate tail calls (TEMPORARY OPTION)."),
+  cl::init(false));
+
 // This option should go away when Machine LICM is smart enough to hoist a 
 // reg-to-reg VDUP.
 static cl::opt<bool>
@@ -1117,6 +1123,9 @@
   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,





More information about the llvm-branch-commits mailing list