@@ -116,23 +116,6 @@ static cl::opt<bool>
116116 cl::desc(" Disable minimum alignment of 1 for "
117117 " arguments passed by value on stack" ));
118118
119- namespace {
120-
121- class HexagonCCState : public CCState {
122- unsigned NumNamedVarArgParams = 0 ;
123-
124- public:
125- HexagonCCState (CallingConv::ID CC, bool IsVarArg, MachineFunction &MF,
126- SmallVectorImpl<CCValAssign> &locs, LLVMContext &C,
127- unsigned NumNamedArgs)
128- : CCState(CC, IsVarArg, MF, locs, C),
129- NumNamedVarArgParams (NumNamedArgs) {}
130- unsigned getNumNamedVarArgParams () const { return NumNamedVarArgParams; }
131- };
132-
133- } // end anonymous namespace
134-
135-
136119// Implement calling convention for Hexagon.
137120
138121static bool CC_SkipOdd (unsigned &ValNo, MVT &ValVT, MVT &LocVT,
@@ -497,7 +480,6 @@ HexagonTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
497480 MachineFrameInfo &MFI = MF.getFrameInfo ();
498481 auto PtrVT = getPointerTy (MF.getDataLayout ());
499482
500- unsigned NumParams = CLI.CB ? CLI.CB ->getFunctionType ()->getNumParams () : 0 ;
501483 if (GlobalAddressSDNode *GAN = dyn_cast<GlobalAddressSDNode>(Callee))
502484 Callee = DAG.getTargetGlobalAddress (GAN->getGlobal (), dl, MVT::i32 );
503485
@@ -506,8 +488,7 @@ HexagonTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
506488
507489 // Analyze operands of the call, assigning locations to each operand.
508490 SmallVector<CCValAssign, 16 > ArgLocs;
509- HexagonCCState CCInfo (CallConv, TreatAsVarArg, MF, ArgLocs, *DAG.getContext (),
510- NumParams);
491+ CCState CCInfo (CallConv, TreatAsVarArg, MF, ArgLocs, *DAG.getContext ());
511492
512493 if (Subtarget.useHVXOps ())
513494 CCInfo.AnalyzeCallOperands (Outs, CC_Hexagon_HVX);
@@ -880,9 +861,7 @@ SDValue HexagonTargetLowering::LowerFormalArguments(
880861
881862 // Assign locations to all of the incoming arguments.
882863 SmallVector<CCValAssign, 16 > ArgLocs;
883- HexagonCCState CCInfo (CallConv, TreatAsVarArg, MF, ArgLocs,
884- *DAG.getContext (),
885- MF.getFunction ().getFunctionType ()->getNumParams ());
864+ CCState CCInfo (CallConv, TreatAsVarArg, MF, ArgLocs, *DAG.getContext ());
886865
887866 if (Subtarget.useHVXOps ())
888867 CCInfo.AnalyzeFormalArguments (Ins, CC_Hexagon_HVX);
0 commit comments