Pass calling convention to use into lower call to

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-05-12 19:56:57 +00:00
parent c57f682113
commit 9092fa310c
2 changed files with 8 additions and 7 deletions

View File

@ -928,7 +928,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
}
std::pair<SDOperand,SDOperand> CallResult =
TLI.LowerCallTo(Tmp1, Type::VoidTy, false,
TLI.LowerCallTo(Tmp1, Type::VoidTy, false, 0,
DAG.getExternalSymbol(FnName, IntPtr), Args, DAG);
Result = LegalizeOp(CallResult.second);
break;
@ -1253,7 +1253,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Args.push_back(std::make_pair(Tmp1, T));
// FIXME: should use ExpandLibCall!
std::pair<SDOperand,SDOperand> CallResult =
TLI.LowerCallTo(DAG.getEntryNode(), T, false,
TLI.LowerCallTo(DAG.getEntryNode(), T, false, 0,
DAG.getExternalSymbol(FnName, VT), Args, DAG);
Result = LegalizeOp(CallResult.first);
break;
@ -2102,7 +2102,7 @@ SDOperand SelectionDAGLegalize::ExpandLibCall(const char *Name, SDNode *Node,
// 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, Callee, Args, DAG);
TLI.LowerCallTo(InChain, RetTy, false, 0, Callee, Args, DAG);
SpliceCallInto(CallInfo.second, OutChain);
NeedsAnotherIteration = true;
@ -2198,7 +2198,7 @@ ExpandIntToFP(bool isSigned, MVT::ValueType DestTy, SDOperand Source) {
const Type *RetTy = MVT::getTypeForValueType(DestTy);
std::pair<SDOperand,SDOperand> CallResult =
TLI.LowerCallTo(InChain, RetTy, false, Callee, Args, DAG);
TLI.LowerCallTo(InChain, RetTy, false, 0, Callee, Args, DAG);
SpliceCallInto(CallResult.second, OutChain);
return CallResult.first;

View File

@ -773,7 +773,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
const FunctionType *FTy = cast<FunctionType>(PT->getElementType());
std::pair<SDOperand,SDOperand> Result =
TLI.LowerCallTo(getRoot(), I.getType(), FTy->isVarArg(), Callee, Args, DAG);
TLI.LowerCallTo(getRoot(), I.getType(), FTy->isVarArg(), I.getCallingConv(),
Callee, Args, DAG);
if (I.getType() != Type::VoidTy)
setValue(&I, Result.first);
DAG.setRoot(Result.second);
@ -798,7 +799,7 @@ void SelectionDAGLowering::visitMalloc(MallocInst &I) {
Args.push_back(std::make_pair(Src, TLI.getTargetData().getIntPtrType()));
std::pair<SDOperand,SDOperand> Result =
TLI.LowerCallTo(getRoot(), I.getType(), false,
TLI.LowerCallTo(getRoot(), I.getType(), false, 0,
DAG.getExternalSymbol("malloc", IntPtr),
Args, DAG);
setValue(&I, Result.first); // Pointers always fit in registers
@ -811,7 +812,7 @@ void SelectionDAGLowering::visitFree(FreeInst &I) {
TLI.getTargetData().getIntPtrType()));
MVT::ValueType IntPtr = TLI.getPointerTy();
std::pair<SDOperand,SDOperand> Result =
TLI.LowerCallTo(getRoot(), Type::VoidTy, false,
TLI.LowerCallTo(getRoot(), Type::VoidTy, false, 0,
DAG.getExternalSymbol("free", IntPtr), Args, DAG);
DAG.setRoot(Result.second);
}