Skip to content

Commit

Permalink
[DAG] Pass the argument list to the CallLoweringInfo via move semanti…
Browse files Browse the repository at this point in the history
…cs. NFCI.

The argument list vector is never used after it has been passed to the
CallLoweringInfo and moving it to the CallLoweringInfo is cleaner and
pretty much as cheap as keeping a pointer to it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212135 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ributzka committed Jul 1, 2014
1 parent 99ec36c commit 7590926
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 42 deletions.
17 changes: 8 additions & 9 deletions include/llvm/Target/TargetLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -2111,7 +2111,7 @@ class TargetLowering : public TargetLoweringBase {
unsigned NumFixedArgs;
CallingConv::ID CallConv;
SDValue Callee;
ArgListTy *Args;
ArgListTy Args;
SelectionDAG &DAG;
SDLoc DL;
ImmutableCallSite *CS;
Expand All @@ -2123,7 +2123,7 @@ class TargetLowering : public TargetLoweringBase {
: RetTy(nullptr), RetSExt(false), RetZExt(false), IsVarArg(false),
IsInReg(false), DoesNotReturn(false), IsReturnValueUsed(true),
IsTailCall(false), NumFixedArgs(-1), CallConv(CallingConv::C),
Args(nullptr), DAG(DAG), CS(nullptr) {}
DAG(DAG), CS(nullptr) {}

CallLoweringInfo &setDebugLoc(SDLoc dl) {
DL = dl;
Expand All @@ -2136,19 +2136,19 @@ class TargetLowering : public TargetLoweringBase {
}

CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultType,
SDValue Target, ArgListTy *ArgsList,
SDValue Target, ArgListTy &&ArgsList,
unsigned FixedArgs = -1) {
RetTy = ResultType;
Callee = Target;
CallConv = CC;
NumFixedArgs =
(FixedArgs == static_cast<unsigned>(-1) ? Args->size() : FixedArgs);
Args = ArgsList;
(FixedArgs == static_cast<unsigned>(-1) ? Args.size() : FixedArgs);
Args = std::move(ArgsList);
return *this;
}

CallLoweringInfo &setCallee(Type *ResultType, FunctionType *FTy,
SDValue Target, ArgListTy *ArgsList,
SDValue Target, ArgListTy &&ArgsList,
ImmutableCallSite &Call) {
RetTy = ResultType;

Expand All @@ -2163,7 +2163,7 @@ class TargetLowering : public TargetLoweringBase {

CallConv = Call.getCallingConv();
NumFixedArgs = FTy->getNumParams();
Args = ArgsList;
Args = std::move(ArgsList);

CS = &Call;

Expand Down Expand Up @@ -2206,8 +2206,7 @@ class TargetLowering : public TargetLoweringBase {
}

ArgListTy &getArgs() {
assert(Args && "Arguments must be set before accessing them");
return *Args;
return Args;
}
};

Expand Down
17 changes: 9 additions & 8 deletions lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, SDNode *Node,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setTailCall(isTailCall).setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down Expand Up @@ -2095,7 +2095,7 @@ SDValue SelectionDAGLegalize::ExpandLibCall(RTLIB::Libcall LC, EVT RetVT,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue,SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down Expand Up @@ -2129,7 +2129,7 @@ SelectionDAGLegalize::ExpandChainLibCall(RTLIB::Libcall LC,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down Expand Up @@ -2266,7 +2266,7 @@ SelectionDAGLegalize::ExpandDivRemLibCall(SDNode *Node,
SDLoc dl(Node);
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(InChain)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down Expand Up @@ -2381,7 +2381,7 @@ SelectionDAGLegalize::ExpandSinCosLibCall(SDNode *Node,
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(InChain)
.setCallee(TLI.getLibcallCallingConv(LC),
Type::getVoidTy(*DAG.getContext()), Callee, &Args, 0);
Type::getVoidTy(*DAG.getContext()), Callee, std::move(Args), 0);

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);

Expand Down Expand Up @@ -2999,8 +2999,8 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node) {
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Node->getOperand(0))
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol("__sync_synchronize", TLI.getPointerTy()),
&Args, 0);
DAG.getExternalSymbol("__sync_synchronize",
TLI.getPointerTy()), std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);

Expand Down Expand Up @@ -3098,7 +3098,8 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node) {
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Node->getOperand(0))
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol("abort", TLI.getPointerTy()), &Args, 0);
DAG.getExternalSymbol("abort", TLI.getPointerTy()),
std::move(Args), 0);
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);

Results.push_back(CallResult.second);
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ void DAGTypeLegalizer::ExpandIntRes_XMULO(SDNode *N,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Func, std::move(Args), 0)
.setSExtResult();

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ DAGTypeLegalizer::ExpandChainLibCall(RTLIB::Libcall LC,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(SDLoc(Node)).setChain(InChain)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(TLI.getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = TLI.LowerCallTo(CLI);
Expand Down
6 changes: 3 additions & 3 deletions lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4158,7 +4158,7 @@ SDValue SelectionDAG::getMemcpy(SDValue Chain, SDLoc dl, SDValue Dst,
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMCPY),
Type::getVoidTy(*getContext()),
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMCPY),
TLI->getPointerTy()), &Args, 0)
TLI->getPointerTy()), std::move(Args), 0)
.setDiscardResult();
std::pair<SDValue,SDValue> CallResult = TLI->LowerCallTo(CLI);

Expand Down Expand Up @@ -4214,7 +4214,7 @@ SDValue SelectionDAG::getMemmove(SDValue Chain, SDLoc dl, SDValue Dst,
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMMOVE),
Type::getVoidTy(*getContext()),
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMMOVE),
TLI->getPointerTy()), &Args, 0)
TLI->getPointerTy()), std::move(Args), 0)
.setDiscardResult();
std::pair<SDValue,SDValue> CallResult = TLI->LowerCallTo(CLI);

Expand Down Expand Up @@ -4278,7 +4278,7 @@ SDValue SelectionDAG::getMemset(SDValue Chain, SDLoc dl, SDValue Dst,
.setCallee(TLI->getLibcallCallingConv(RTLIB::MEMSET),
Type::getVoidTy(*getContext()),
getExternalSymbol(TLI->getLibcallName(RTLIB::MEMSET),
TLI->getPointerTy()), &Args, 0)
TLI->getPointerTy()), std::move(Args), 0)
.setDiscardResult();

std::pair<SDValue,SDValue> CallResult = TLI->LowerCallTo(CLI);
Expand Down
6 changes: 3 additions & 3 deletions lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5322,7 +5322,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
CLI.setDebugLoc(sdl).setChain(getRoot())
.setCallee(CallingConv::C, I.getType(),
DAG.getExternalSymbol(TrapFuncName.data(), TLI->getPointerTy()),
&Args, 0);
std::move(Args), 0);

std::pair<SDValue, SDValue> Result = TLI->LowerCallTo(CLI);
DAG.setRoot(Result.second);
Expand Down Expand Up @@ -5495,7 +5495,7 @@ void SelectionDAGBuilder::LowerCallTo(ImmutableCallSite CS, SDValue Callee,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(getCurSDLoc()).setChain(getRoot())
.setCallee(RetTy, FTy, Callee, &Args, CS).setTailCall(isTailCall);
.setCallee(RetTy, FTy, Callee, std::move(Args), CS).setTailCall(isTailCall);

std::pair<SDValue,SDValue> Result = TLI->LowerCallTo(CLI);
assert((isTailCall || Result.second.getNode()) &&
Expand Down Expand Up @@ -6798,7 +6798,7 @@ SelectionDAGBuilder::LowerCallOperands(const CallInst &CI, unsigned ArgIdx,
Type *retTy = useVoidTy ? Type::getVoidTy(*DAG.getContext()) : CI.getType();
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(getCurSDLoc()).setChain(getRoot())
.setCallee(CI.getCallingConv(), retTy, Callee, &Args, NumArgs)
.setCallee(CI.getCallingConv(), retTy, Callee, std::move(Args), NumArgs)
.setDiscardResult(!CI.use_empty());

const TargetLowering *TLI = TM.getTargetLowering();
Expand Down
2 changes: 1 addition & 1 deletion lib/CodeGen/SelectionDAG/TargetLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ TargetLowering::makeLibCall(SelectionDAG &DAG,
Type *RetTy = RetVT.getTypeForEVT(*DAG.getContext());
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setNoReturn(doesNotReturn).setDiscardResult(!isReturnValueUsed)
.setSExtResult(isSigned).setZExtResult(!isSigned);
return LowerCallTo(CLI);
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/AArch64/AArch64ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ SDValue AArch64TargetLowering::LowerFSINCOS(SDValue Op,
StructType *RetTy = StructType::get(ArgTy, ArgTy, NULL);
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
.setCallee(CallingConv::Fast, RetTy, Callee, &Args, 0);
.setCallee(CallingConv::Fast, RetTy, Callee, std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
return CallResult.first;
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SDValue AArch64SelectionDAGInfo::EmitTargetCodeForMemset(
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol(bzeroEntry, IntPtr), &Args, 0)
DAG.getExternalSymbol(bzeroEntry, IntPtr), std::move(Args), 0)
.setDiscardResult();
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
return CallResult.second;
Expand Down
7 changes: 4 additions & 3 deletions lib/Target/ARM/ARMISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,8 @@ ARMTargetLowering::LowerToTLSGeneralDynamicModel(GlobalAddressSDNode *GA,
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(CallingConv::C, Type::getInt32Ty(*DAG.getContext()),
DAG.getExternalSymbol("__tls_get_addr", PtrVT), &Args, 0);
DAG.getExternalSymbol("__tls_get_addr", PtrVT), std::move(Args),
0);

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
return CallResult.first;
Expand Down Expand Up @@ -6095,7 +6096,7 @@ SDValue ARMTargetLowering::LowerFSINCOS(SDValue Op, SelectionDAG &DAG) const {
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()), Callee,
&Args, 0)
std::move(Args), 0)
.setDiscardResult();

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
Expand Down Expand Up @@ -10564,7 +10565,7 @@ SDValue ARMTargetLowering::LowerDivRem(SDValue Op, SelectionDAG &DAG) const {
SDLoc dl(Op);
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(InChain)
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, &Args, 0)
.setCallee(getLibcallCallingConv(LC), RetTy, Callee, std::move(Args), 0)
.setInRegister().setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = LowerCallTo(CLI);
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/ARM/ARMSelectionDAGInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc dl,
.setCallee(TLI.getLibcallCallingConv(RTLIB::MEMSET),
Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol(TLI.getLibcallName(RTLIB::MEMSET),
TLI.getPointerTy()), &Args, 0)
TLI.getPointerTy()), std::move(Args), 0)
.setDiscardResult();

std::pair<SDValue,SDValue> CallResult = TLI.LowerCallTo(CLI);
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/Mips/MipsISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(DL).setChain(DAG.getEntryNode())
.setCallee(CallingConv::C, PtrTy, TlsGetAddr, &Args, 0);
.setCallee(CallingConv::C, PtrTy, TlsGetAddr, std::move(Args), 0);
std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);

SDValue Ret = CallResult.first;
Expand Down
3 changes: 2 additions & 1 deletion lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,8 @@ SDValue PPCTargetLowering::LowerINIT_TRAMPOLINE(SDValue Op,
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol("__trampoline_setup", PtrVT), &Args, 0);
DAG.getExternalSymbol("__trampoline_setup", PtrVT),
std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
return CallResult.second;
Expand Down
4 changes: 2 additions & 2 deletions lib/Target/Sparc/SparcISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ SparcTargetLowering::LowerF128Op(SDValue Op, SelectionDAG &DAG,
}
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(SDLoc(Op)).setChain(Chain)
.setCallee(CallingConv::C, RetTyABI, Callee, &Args, 0);
.setCallee(CallingConv::C, RetTyABI, Callee, std::move(Args), 0);

std::pair<SDValue, SDValue> CallInfo = LowerCallTo(CLI);

Expand Down Expand Up @@ -2086,7 +2086,7 @@ SparcTargetLowering::LowerF128Compare(SDValue LHS, SDValue RHS,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(DL).setChain(Chain)
.setCallee(CallingConv::C, RetTy, Callee, &Args, 0);
.setCallee(CallingConv::C, RetTy, Callee, std::move(Args), 0);

std::pair<SDValue, SDValue> CallInfo = LowerCallTo(CLI);

Expand Down
4 changes: 2 additions & 2 deletions lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15084,7 +15084,7 @@ SDValue X86TargetLowering::LowerWin64_i128OP(SDValue Op, SelectionDAG &DAG) cons
CLI.setDebugLoc(dl).setChain(InChain)
.setCallee(getLibcallCallingConv(LC),
static_cast<EVT>(MVT::v2i64).getTypeForEVT(*DAG.getContext()),
Callee, &Args, 0)
Callee, std::move(Args), 0)
.setInRegister().setSExtResult(isSigned).setZExtResult(!isSigned);

std::pair<SDValue, SDValue> CallInfo = LowerCallTo(CLI);
Expand Down Expand Up @@ -16084,7 +16084,7 @@ static SDValue LowerFSINCOS(SDValue Op, const X86Subtarget *Subtarget,

TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(DAG.getEntryNode())
.setCallee(CallingConv::C, RetTy, Callee, &Args, 0);
.setCallee(CallingConv::C, RetTy, Callee, std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);

Expand Down
3 changes: 2 additions & 1 deletion lib/Target/X86/X86SelectionDAGInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ X86SelectionDAGInfo::EmitTargetCodeForMemset(SelectionDAG &DAG, SDLoc dl,
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol(bzeroEntry, IntPtr), &Args, 0)
DAG.getExternalSymbol(bzeroEntry, IntPtr), std::move(Args),
0)
.setDiscardResult();

std::pair<SDValue,SDValue> CallResult = DAG.getTargetLoweringInfo().LowerCallTo(CLI);
Expand Down
4 changes: 2 additions & 2 deletions lib/Target/XCore/XCoreISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ LowerLOAD(SDValue Op, SelectionDAG &DAG) const {
CLI.setDebugLoc(DL).setChain(Chain)
.setCallee(CallingConv::C, IntPtrTy,
DAG.getExternalSymbol("__misaligned_load", getPointerTy()),
&Args, 0);
std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
SDValue Ops[] = { CallResult.first, CallResult.second };
Expand Down Expand Up @@ -552,7 +552,7 @@ LowerSTORE(SDValue Op, SelectionDAG &DAG) const
CLI.setDebugLoc(dl).setChain(Chain)
.setCallee(CallingConv::C, Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol("__misaligned_store", getPointerTy()),
&Args, 0);
std::move(Args), 0);

std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);
return CallResult.second;
Expand Down
2 changes: 1 addition & 1 deletion lib/Target/XCore/XCoreSelectionDAGInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ EmitTargetCodeForMemcpy(SelectionDAG &DAG, SDLoc dl, SDValue Chain,
.setCallee(TLI.getLibcallCallingConv(RTLIB::MEMCPY),
Type::getVoidTy(*DAG.getContext()),
DAG.getExternalSymbol("__memcpy_4", TLI.getPointerTy()),
&Args, 0)
std::move(Args), 0)
.setDiscardResult();

std::pair<SDValue,SDValue> CallResult = TLI.LowerCallTo(CLI);
Expand Down

0 comments on commit 7590926

Please sign in to comment.