[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp SelectionDAGISel.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri May 13 11:50:56 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.122 -> 1.123
SelectionDAGISel.cpp updated: 1.55 -> 1.56
---
Log message:
Add an isTailCall flag to LowerCallTo
---
Diffs of the changes: (+11 -7)
LegalizeDAG.cpp | 11 +++++++----
SelectionDAGISel.cpp | 7 ++++---
2 files changed, 11 insertions(+), 7 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.122 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.123
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.122 Fri May 13 13:43:43 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri May 13 13:50:42 2005
@@ -18,6 +18,7 @@
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetOptions.h"
+#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include <iostream>
using namespace llvm;
@@ -930,7 +931,7 @@
}
std::pair<SDOperand,SDOperand> CallResult =
- TLI.LowerCallTo(Tmp1, Type::VoidTy, false, 0,
+ TLI.LowerCallTo(Tmp1, Type::VoidTy, false, CallingConv::C, false,
DAG.getExternalSymbol(FnName, IntPtr), Args, DAG);
Result = LegalizeOp(CallResult.second);
break;
@@ -1255,7 +1256,7 @@
Args.push_back(std::make_pair(Tmp1, T));
// FIXME: should use ExpandLibCall!
std::pair<SDOperand,SDOperand> CallResult =
- TLI.LowerCallTo(DAG.getEntryNode(), T, false, 0,
+ TLI.LowerCallTo(DAG.getEntryNode(), T, false, CallingConv::C, true,
DAG.getExternalSymbol(FnName, VT), Args, DAG);
Result = LegalizeOp(CallResult.first);
break;
@@ -2107,7 +2108,8 @@
// Splice the libcall in wherever FindInputOutputChains tells us to.
const Type *RetTy = MVT::getTypeForValueType(Node->getValueType(0));
std::pair<SDOperand,SDOperand> CallInfo =
- TLI.LowerCallTo(InChain, RetTy, false, 0, Callee, Args, DAG);
+ TLI.LowerCallTo(InChain, RetTy, false, CallingConv::C, false,
+ Callee, Args, DAG);
SpliceCallInto(CallInfo.second, OutChain);
NeedsAnotherIteration = true;
@@ -2204,7 +2206,8 @@
const Type *RetTy = MVT::getTypeForValueType(DestTy);
std::pair<SDOperand,SDOperand> CallResult =
- TLI.LowerCallTo(InChain, RetTy, false, 0, Callee, Args, DAG);
+ TLI.LowerCallTo(InChain, RetTy, false, CallingConv::C, true,
+ Callee, Args, DAG);
SpliceCallInto(CallResult.second, OutChain);
return CallResult.first;
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.55 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.56
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.55 Fri May 13 02:33:32 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri May 13 13:50:42 2005
@@ -13,6 +13,7 @@
#define DEBUG_TYPE "isel"
#include "llvm/CodeGen/SelectionDAGISel.h"
+#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
@@ -774,7 +775,7 @@
std::pair<SDOperand,SDOperand> Result =
TLI.LowerCallTo(getRoot(), I.getType(), FTy->isVarArg(), I.getCallingConv(),
- Callee, Args, DAG);
+ I.isTailCall(), Callee, Args, DAG);
if (I.getType() != Type::VoidTy)
setValue(&I, Result.first);
DAG.setRoot(Result.second);
@@ -799,7 +800,7 @@
Args.push_back(std::make_pair(Src, TLI.getTargetData().getIntPtrType()));
std::pair<SDOperand,SDOperand> Result =
- TLI.LowerCallTo(getRoot(), I.getType(), false, 0,
+ TLI.LowerCallTo(getRoot(), I.getType(), false, CallingConv::C, true,
DAG.getExternalSymbol("malloc", IntPtr),
Args, DAG);
setValue(&I, Result.first); // Pointers always fit in registers
@@ -812,7 +813,7 @@
TLI.getTargetData().getIntPtrType()));
MVT::ValueType IntPtr = TLI.getPointerTy();
std::pair<SDOperand,SDOperand> Result =
- TLI.LowerCallTo(getRoot(), Type::VoidTy, false, 0,
+ TLI.LowerCallTo(getRoot(), Type::VoidTy, false, CallingConv::C, true,
DAG.getExternalSymbol("free", IntPtr), Args, DAG);
DAG.setRoot(Result.second);
}
More information about the llvm-commits
mailing list