mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Change interface to LowerCallTo to take a boolean isVarArg argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -786,7 +786,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
assert(0 && "Unknown op!");
|
||||
}
|
||||
std::pair<SDOperand,SDOperand> CallResult =
|
||||
TLI.LowerCallTo(Tmp1, Type::VoidTy,
|
||||
TLI.LowerCallTo(Tmp1, Type::VoidTy, false,
|
||||
DAG.getExternalSymbol(FnName, IntPtr), Args, DAG);
|
||||
Result = LegalizeOp(CallResult.second);
|
||||
break;
|
||||
@@ -1473,7 +1473,7 @@ SDOperand SelectionDAGLegalize::ExpandLibCall(const char *Name, SDNode *Node,
|
||||
// node as our input and ignore the output chain. This allows us to place
|
||||
// calls wherever we need them to satisfy data dependences.
|
||||
const Type *RetTy = MVT::getTypeForValueType(Node->getValueType(0));
|
||||
SDOperand Result = TLI.LowerCallTo(InChain, RetTy, Callee,
|
||||
SDOperand Result = TLI.LowerCallTo(InChain, RetTy, false, Callee,
|
||||
Args, DAG).first;
|
||||
switch (getTypeAction(Result.getValueType())) {
|
||||
default: assert(0 && "Unknown thing");
|
||||
@@ -1527,7 +1527,7 @@ ExpandIntToFP(bool isSigned, MVT::ValueType DestTy, SDOperand Source) {
|
||||
// node as our input and ignore the output chain. This allows us to place
|
||||
// calls wherever we need them to satisfy data dependences.
|
||||
const Type *RetTy = MVT::getTypeForValueType(DestTy);
|
||||
return TLI.LowerCallTo(InChain, RetTy, Callee, Args, DAG).first;
|
||||
return TLI.LowerCallTo(InChain, RetTy, false, Callee, Args, DAG).first;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -670,8 +670,11 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
Args.push_back(std::make_pair(ArgNode, Arg->getType()));
|
||||
}
|
||||
|
||||
const PointerType *PT = cast<PointerType>(I.getCalledValue()->getType());
|
||||
const FunctionType *FTy = cast<FunctionType>(PT->getElementType());
|
||||
|
||||
std::pair<SDOperand,SDOperand> Result =
|
||||
TLI.LowerCallTo(getRoot(), I.getType(), Callee, Args, DAG);
|
||||
TLI.LowerCallTo(getRoot(), I.getType(), FTy->isVarArg(), Callee, Args, DAG);
|
||||
if (I.getType() != Type::VoidTy)
|
||||
setValue(&I, Result.first);
|
||||
DAG.setRoot(Result.second);
|
||||
@@ -696,7 +699,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(),
|
||||
TLI.LowerCallTo(getRoot(), I.getType(), false,
|
||||
DAG.getExternalSymbol("malloc", IntPtr),
|
||||
Args, DAG);
|
||||
setValue(&I, Result.first); // Pointers always fit in registers
|
||||
@@ -709,7 +712,7 @@ void SelectionDAGLowering::visitFree(FreeInst &I) {
|
||||
TLI.getTargetData().getIntPtrType()));
|
||||
MVT::ValueType IntPtr = TLI.getPointerTy();
|
||||
std::pair<SDOperand,SDOperand> Result =
|
||||
TLI.LowerCallTo(getRoot(), Type::VoidTy,
|
||||
TLI.LowerCallTo(getRoot(), Type::VoidTy, false,
|
||||
DAG.getExternalSymbol("free", IntPtr), Args, DAG);
|
||||
DAG.setRoot(Result.second);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user