@@ -6896,16 +6896,16 @@ SDValue SelectionDAGBuilder::lowerRangeToAssertZExt(SelectionDAG &DAG,
6896
6896
return DAG.getMergeValues (Ops, SL);
6897
6897
}
6898
6898
6899
- // / \brief Lower an argument list according to the target calling convention.
6900
- // /
6901
- // / \return A tuple of <return-value, token-chain>
6899
+ // / \brief Populate a CallLowerinInfo (into \p CLI) based on the properties of
6900
+ // / the call being lowered.
6902
6901
// /
6903
6902
// / This is a helper for lowering intrinsics that follow a target calling
6904
6903
// / convention or require stack pointer adjustment. Only a subset of the
6905
6904
// / intrinsic's operands need to participate in the calling convention.
6906
- std::pair<SDValue, SDValue> SelectionDAGBuilder::lowerCallOperands (
6907
- ImmutableCallSite CS, unsigned ArgIdx, unsigned NumArgs, SDValue Callee,
6908
- Type *ReturnTy, const BasicBlock *EHPadBB, bool IsPatchPoint) {
6905
+ void SelectionDAGBuilder::populateCallLoweringInfo (
6906
+ TargetLowering::CallLoweringInfo &CLI, ImmutableCallSite CS,
6907
+ unsigned ArgIdx, unsigned NumArgs, SDValue Callee, Type *ReturnTy,
6908
+ bool IsPatchPoint) {
6909
6909
TargetLowering::ArgListTy Args;
6910
6910
Args.reserve (NumArgs);
6911
6911
@@ -6924,12 +6924,12 @@ std::pair<SDValue, SDValue> SelectionDAGBuilder::lowerCallOperands(
6924
6924
Args.push_back (Entry);
6925
6925
}
6926
6926
6927
- TargetLowering::CallLoweringInfo CLI (DAG);
6928
- CLI. setDebugLoc ( getCurSDLoc ()) .setChain (getRoot ())
6929
- .setCallee (CS.getCallingConv (), ReturnTy, Callee, std::move (Args), NumArgs)
6930
- . setDiscardResult (CS-> use_empty ()). setIsPatchPoint (IsPatchPoint);
6931
-
6932
- return lowerInvokable (CLI, EHPadBB );
6927
+ CLI. setDebugLoc ( getCurSDLoc ())
6928
+ .setChain (getRoot ())
6929
+ .setCallee (CS.getCallingConv (), ReturnTy, Callee, std::move (Args),
6930
+ NumArgs)
6931
+ . setDiscardResult (CS-> use_empty ())
6932
+ . setIsPatchPoint (IsPatchPoint );
6933
6933
}
6934
6934
6935
6935
// / \brief Add a stack map intrinsic call's live variable operands to a stackmap
@@ -7070,8 +7070,11 @@ void SelectionDAGBuilder::visitPatchpoint(ImmutableCallSite CS,
7070
7070
unsigned NumCallArgs = IsAnyRegCC ? 0 : NumArgs;
7071
7071
Type *ReturnTy =
7072
7072
IsAnyRegCC ? Type::getVoidTy (*DAG.getContext ()) : CS->getType ();
7073
- std::pair<SDValue, SDValue> Result = lowerCallOperands (
7074
- CS, NumMetaOpers, NumCallArgs, Callee, ReturnTy, EHPadBB, true );
7073
+
7074
+ TargetLowering::CallLoweringInfo CLI (DAG);
7075
+ populateCallLoweringInfo (CLI, CS, NumMetaOpers, NumCallArgs, Callee, ReturnTy,
7076
+ true );
7077
+ std::pair<SDValue, SDValue> Result = lowerInvokable (CLI, EHPadBB);
7075
7078
7076
7079
SDNode *CallEnd = Result.second .getNode ();
7077
7080
if (HasDef && (CallEnd->getOpcode () == ISD::CopyFromReg))
0 commit comments