return getNode(ISD::CALLSEQ_END, DL, NodeTys, Ops);
}
+ SDValue getCALLSEQ_END(SDValue Chain, uint64_t Size1, uint64_t Size2,
+ SDValue Glue, const SDLoc &DL) {
+ return getCALLSEQ_END(
+ Chain, getIntPtrConstant(Size1, DL, /*isTarget=*/true),
+ getIntPtrConstant(Size2, DL, /*isTarget=*/true), Glue, DL);
+ }
+
/// Return true if the result of this operation is always undefined.
bool isUndef(unsigned Opcode, ArrayRef<SDValue> Ops);
DAG.getConstant(-Alignment.value(), dl, VT));
Chain = DAG.getCopyToReg(Chain, dl, SPReg, Tmp1); // Output chain
- Tmp2 = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true),
- DAG.getIntPtrConstant(0, dl, true), SDValue(), dl);
+ Tmp2 = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), dl);
Results.push_back(Tmp1);
Results.push_back(Tmp2);
assert(CI.getType()->isVoidTy() && "Stackmap cannot return a value.");
- SDValue Chain, InFlag, Callee, NullPtr;
+ SDValue Chain, InFlag, Callee;
SmallVector<SDValue, 32> Ops;
SDLoc DL = getCurSDLoc();
Callee = getValue(CI.getCalledOperand());
- NullPtr = DAG.getIntPtrConstant(0, DL, true);
// The stackmap intrinsic only records the live variables (the arguments
// passed to it) and emits NOPS (if requested). Unlike the patchpoint
Chain = DAG.getNode(ISD::STACKMAP, DL, NodeTys, Ops);
InFlag = Chain.getValue(1);
- Chain = DAG.getCALLSEQ_END(Chain, NullPtr, NullPtr, InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, InFlag, DL);
// Stackmaps don't generate values, so nothing goes into the NodeMap.
// we've carefully laid out the parameters so that when sp is reset they'll be
// in the correct location.
if (IsTailCall && !IsSibCall) {
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, InFlag, DL);
InFlag = Chain.getValue(1);
}
uint64_t CalleePopBytes =
DoesCalleeRestoreStack(CallConv, TailCallOpt) ? alignTo(NumBytes, 16) : 0;
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, DL, true),
- DAG.getIntPtrConstant(CalleePopBytes, DL, true),
- InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, CalleePopBytes, InFlag, DL);
if (!Ins.empty())
InFlag = Chain.getValue(1);
DAG.getConstant(-(uint64_t)Align->value(), dl, VT));
Chain = DAG.getCopyToReg(Chain, dl, AArch64::SP, SP);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true),
- DAG.getIntPtrConstant(0, dl, true), SDValue(), dl);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), dl);
SDValue Ops[2] = {SP, Chain};
return DAG.getMergeValues(Ops, dl);
// we've carefully laid out the parameters so that when sp is reset they'll be
// in the correct location.
if (IsTailCall && !IsSibCall) {
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getTargetConstant(NumBytes, DL, MVT::i32),
- DAG.getTargetConstant(0, DL, MVT::i32),
- InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, DL);
InFlag = Chain.getValue(1);
}
InFlag = Call.getValue(1);
uint64_t CalleePopBytes = NumBytes;
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getTargetConstant(0, DL, MVT::i32),
- DAG.getTargetConstant(CalleePopBytes, DL, MVT::i32),
- InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, CalleePopBytes, InFlag, DL);
if (!Ins.empty())
InFlag = Chain.getValue(1);
}
Chain = DAG.getCopyToReg(Chain, dl, SPReg, Tmp1); // Output chain
- Tmp2 = DAG.getCALLSEQ_END(
- Chain, DAG.getIntPtrConstant(0, dl, true),
- DAG.getIntPtrConstant(0, dl, true), SDValue(), dl);
+ Tmp2 = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), dl);
return DAG.getMergeValues({Tmp1, Tmp2}, dl);
}
// Get a count of how many bytes are to be pushed on the stack.
unsigned NumBytes = RetCCInfo.getNextStackOffset();
- auto PtrVT = getPointerTy(DAG.getDataLayout());
Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
Glue = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, dl, PtrVT, true),
- DAG.getConstant(0, dl, PtrVT, true), Glue, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, dl);
Glue = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
// we've carefully laid out the parameters so that when sp is reset they'll be
// in the correct location.
if (isTailCall && !isSibCall) {
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true),
- DAG.getIntPtrConstant(0, dl, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, InFlag, dl);
InFlag = Chain.getValue(1);
}
uint64_t CalleePopBytes =
canGuaranteeTCO(CallConv, TailCallOpt) ? alignTo(NumBytes, 16) : -1ULL;
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, dl, true),
- DAG.getIntPtrConstant(CalleePopBytes, dl, true),
- InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, CalleePopBytes, InFlag, dl);
if (!Ins.empty())
InFlag = Chain.getValue(1);
InFlag = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, DL);
if (!Ins.empty()) {
InFlag = Chain.getValue(1);
InFlag = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(
- Chain, DAG.getConstant(NumBytes, CLI.DL, PtrVT, true),
- DAG.getConstant(0, CLI.DL, PtrVT, true), InFlag, CLI.DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, CLI.DL);
InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
Glue = Chain.getValue(1);
// Mark the end of the call, which is glued to the call itself.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, DL, PtrVT, true),
- DAG.getConstant(0, DL, PtrVT, true), Glue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, DL);
Glue = Chain.getValue(1);
// Assign locations to each value returned by this call.
Glue = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, dl, true),
- DAG.getIntPtrConstant(0, dl, true), Glue, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, dl);
Glue = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
InFlag = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(
- Chain,
- DAG.getConstant(NumBytes, DL, getPointerTy(DAG.getDataLayout()), true),
- DAG.getConstant(0, DL, getPointerTy(DAG.getDataLayout()), true), InFlag,
- DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, DL);
InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
Glue = Chain.getValue(1);
// Mark the end of the call, which is glued to the call itself.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, DL, PtrVT, true),
- DAG.getConstant(0, DL, PtrVT, true), Glue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, DL);
Glue = Chain.getValue(1);
// Assign locations to each value returned by this call.
SmallVector<SDValue, 8> Ops;
if (!IsSibcall && IsTailCall) {
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getIntPtrConstant(NumBytesToPop, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytesToPop, 0, InFlag, DL);
InFlag = Chain.getValue(1);
}
// Returns a flag for retval copy to use.
if (!IsSibcall) {
- Chain = DAG.getCALLSEQ_END(
- Chain, DAG.getIntPtrConstant(NumBytesToPop, DL, true),
- DAG.getIntPtrConstant(NumBytesForCalleeToPop, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytesToPop, NumBytesForCalleeToPop,
+ InFlag, DL);
InFlag = Chain.getValue(1);
}
Chain = DAG.getCopyToReg(Chain, DL, SPReg, Result); // Output chain
}
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, DL, true),
- DAG.getIntPtrConstant(0, DL, true), SDValue(), DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), DL);
SDValue Ops[2] = {Result, Chain};
return DAG.getMergeValues(Ops, DL);
InFlag = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, dl, PtrVT, true),
- DAG.getConstant(0, dl, PtrVT, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, dl);
InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
// byval arguments to the stack.
unsigned StackAlignment = TFL->getStackAlignment();
NextStackOffset = alignTo(NextStackOffset, StackAlignment);
- SDValue NextStackOffsetVal = DAG.getIntPtrConstant(NextStackOffset, DL, true);
if (!(IsTailCall || MemcpyInByVal))
Chain = DAG.getCALLSEQ_START(Chain, NextStackOffset, 0, DL);
// Create the CALLSEQ_END node in the case of where it is not a call to
// memcpy.
if (!(MemcpyInByVal)) {
- Chain = DAG.getCALLSEQ_END(Chain, NextStackOffsetVal,
- DAG.getIntPtrConstant(0, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NextStackOffset, 0, InFlag, DL);
InFlag = Chain.getValue(1);
}
}
}
- Chain = DAG.getCALLSEQ_END(
- Chain, DAG.getIntPtrConstant(UniqueCallSite, dl, true),
- DAG.getIntPtrConstant(UniqueCallSite + 1, dl, true), InFlag, dl);
+ Chain =
+ DAG.getCALLSEQ_END(Chain, UniqueCallSite, UniqueCallSite + 1, InFlag, dl);
InFlag = Chain.getValue(1);
// Append ProxyReg instructions to the chain to make sure that `callseq_end`
Chain = EmitTailCallStoreFPAndRetAddr(DAG, Chain, LROp, FPOp, SPDiff, dl);
// Emit callseq_end just before tailcall node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, dl, true),
- DAG.getIntPtrConstant(0, dl, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, dl);
InFlag = Chain.getValue(1);
}
? NumBytes
: 0;
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, dl, true),
- DAG.getIntPtrConstant(BytesCalleePops, dl, true),
- Glue, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, BytesCalleePops, Glue, dl);
Glue = Chain.getValue(1);
return LowerCallResult(Chain, Glue, CFlags.CallConv, CFlags.IsVarArg, Ins, dl,
Glue = Chain.getValue(1);
// Mark the end of the call, which is glued to the call itself.
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getConstant(NumBytes, DL, PtrVT, true),
- DAG.getConstant(0, DL, PtrVT, true),
- Glue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, DL);
Glue = Chain.getValue(1);
// Assign locations to each value returned by this call.
Chain = DAG.getNode(SPISD::CALL, dl, NodeTys, Ops);
InFlag = Chain.getValue(1);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(ArgsSize, dl, true),
- DAG.getIntPtrConstant(0, dl, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, ArgsSize, 0, InFlag, dl);
InFlag = Chain.getValue(1);
// Assign locations to each value returned by this call.
InGlue = Chain.getValue(1);
// Revert the stack pointer immediately after the call.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(ArgsSize, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InGlue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, ArgsSize, 0, InGlue, DL);
InGlue = Chain.getValue(1);
// Now extract the return values. This is more or less the same as
InFlag};
Chain = DAG.getNode(SPISD::TLS_CALL, DL, NodeTys, Ops);
InFlag = Chain.getValue(1);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(1, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InFlag, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 1, 0, InFlag, DL);
InFlag = Chain.getValue(1);
SDValue Ret = DAG.getCopyFromReg(Chain, DL, SP::O0, PtrVT, InFlag);
Glue = Chain.getValue(1);
// Mark the end of the call, which is glued to the call itself.
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getConstant(NumBytes, DL, PtrVT, true),
- DAG.getConstant(0, DL, PtrVT, true),
- Glue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, Glue, DL);
Glue = Chain.getValue(1);
// Assign locations to each value returned by this call.
InGlue = Chain.getValue(1);
// Revert the stack pointer immediately after the call.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(ArgsSize, DL, true),
- DAG.getIntPtrConstant(0, DL, true), InGlue, DL);
+ Chain = DAG.getCALLSEQ_END(Chain, ArgsSize, 0, InGlue, DL);
InGlue = Chain.getValue(1);
// Now extract the return values. This is more or less the same as
Chain = DAG.getCALLSEQ_START(Chain, 64, 0, DL);
SDValue Args[] = {Chain, Label, DAG.getRegisterMask(Mask), Chain.getValue(1)};
Chain = DAG.getNode(VEISD::GETTLSADDR, DL, NodeTys, Args);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(64, DL, true),
- DAG.getIntPtrConstant(0, DL, true),
- Chain.getValue(1), DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 64, 0, Chain.getValue(1), DL);
Chain = DAG.getCopyFromReg(Chain, DL, VE::SX0, PtrVT, Chain.getValue(1));
// GETTLSADDR will be codegen'ed as call. Inform MFI that function has calls.
DAG.getConstant(~(Alignment->value() - 1ULL), DL, VT));
}
// Chain = Result.getValue(1);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, DL, true),
- DAG.getIntPtrConstant(0, DL, true), SDValue(), DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), DL);
SDValue Ops[2] = {Result, Chain};
return DAG.getMergeValues(Ops, DL);
SmallVector<SDValue, 8> Ops;
if (!IsSibcall && isTailCall && !IsMustTail) {
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getIntPtrConstant(NumBytesToPop, dl, true),
- DAG.getIntPtrConstant(0, dl, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytesToPop, 0, InFlag, dl);
InFlag = Chain.getValue(1);
}
// Returns a flag for retval copy to use.
if (!IsSibcall) {
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getIntPtrConstant(NumBytesToPop, dl, true),
- DAG.getIntPtrConstant(NumBytesForCalleeToPop, dl,
- true),
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytesToPop, NumBytesForCalleeToPop,
InFlag, dl);
InFlag = Chain.getValue(1);
}
Chain = DAG.getCALLSEQ_START(Chain, 0, 0, DL);
SDValue Args[] = { Chain, Offset };
Chain = DAG.getNode(X86ISD::TLSCALL, DL, NodeTys, Args);
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, DL, true),
- DAG.getIntPtrConstant(0, DL, true),
- Chain.getValue(1), DL);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, Chain.getValue(1), DL);
// TLSCALL will be codegen'ed as call. Inform MFI that function has calls.
MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
Result = SP;
}
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, dl, true),
- DAG.getIntPtrConstant(0, dl, true), SDValue(), dl);
+ Chain = DAG.getCALLSEQ_END(Chain, 0, 0, SDValue(), dl);
SDValue Ops[2] = {Result, Chain};
return DAG.getMergeValues(Ops, dl);
// Get a count of how many bytes are to be pushed on the stack.
unsigned NumBytes = RetCCInfo.getNextStackOffset();
- auto PtrVT = getPointerTy(DAG.getDataLayout());
Chain = DAG.getCALLSEQ_START(Chain, NumBytes, 0, dl);
InFlag = Chain.getValue(1);
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getConstant(NumBytes, dl, PtrVT, true),
- DAG.getConstant(0, dl, PtrVT, true), InFlag, dl);
+ Chain = DAG.getCALLSEQ_END(Chain, NumBytes, 0, InFlag, dl);
InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we