[llvm-commits] [llvm] r42962 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Evan Cheng evan.cheng at apple.com
Sun Oct 14 03:09:40 PDT 2007


Author: evancheng
Date: Sun Oct 14 05:09:39 2007
New Revision: 42962

URL: http://llvm.org/viewvc/llvm-project?rev=42962&view=rev
Log:
Unbreak x86-64.

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=42962&r1=42961&r2=42962&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Oct 14 05:09:39 2007
@@ -1839,7 +1839,7 @@
 
   ArgValues.push_back(Root);
   // Tail call convention (fastcc) needs callee pop.
-  if (CC == CallingConv::Fast && PerformTailCallOpt){
+  if (CC == CallingConv::Fast && PerformTailCallOpt) {
     BytesToPopOnReturn = StackSize;  // Callee pops everything.
     BytesCallerReserves = 0;
   } else {
@@ -1864,7 +1864,7 @@
   // Analyze operands of the call, assigning locations to each operand.
   SmallVector<CCValAssign, 16> ArgLocs;
   CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs);
-  if (CC==CallingConv::Fast)
+  if (CC==CallingConv::Fast && PerformTailCallOpt)
     CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_64_TailCall);
   else
     CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_64_C);
@@ -1982,9 +1982,8 @@
                       NodeTys, &Ops[0], Ops.size());
   InFlag = Chain.getValue(1);
   int NumBytesForCalleeToPush = 0;
-   if (CC==CallingConv::Fast) {
+   if (CC==CallingConv::Fast && PerformTailCallOpt) {
     NumBytesForCalleeToPush = NumBytes;  // Callee pops everything
-  
   } else {
     NumBytesForCalleeToPush = 0;  // Callee pops nothing.
   }





More information about the llvm-commits mailing list