Index: lib/Target/Mips/MipsISelLowering.h =================================================================== --- lib/Target/Mips/MipsISelLowering.h +++ lib/Target/Mips/MipsISelLowering.h @@ -357,9 +357,6 @@ const SDNode *CallNode, std::vector &FuncArgs, CCState &State); - void analyzeFormalArguments(const SmallVectorImpl &Ins, - bool IsSoftFloat, - CCState &State); /// reservedArgArea - The size of the area the caller reserves for /// register arguments. This is 16-byte if ABI is O32. Index: lib/Target/Mips/MipsISelLowering.cpp =================================================================== --- lib/Target/Mips/MipsISelLowering.cpp +++ lib/Target/Mips/MipsISelLowering.cpp @@ -140,12 +140,6 @@ PreAnalyzeCallOperandsForF128(Outs, FuncArgs, CallNode); } // FIXME: Remove this from a public inteface ASAP. It's a temporary trap door - // to allow analyzeFormalArguments to be removed incrementally. - void - PreAnalyzeFormalArgumentsForF128_(const SmallVectorImpl &Ins) { - PreAnalyzeFormalArgumentsForF128(Ins); - } - // FIXME: Remove this from a public inteface ASAP. It's a temporary trap door // to clean up after the above functions. void ClearOriginalArgWasF128() { OriginalArgWasF128.clear(); } @@ -153,6 +147,13 @@ SmallVectorImpl &locs, LLVMContext &C) : CCState(CC, isVarArg, MF, locs, C) {} + void AnalyzeFormalArguments(const SmallVectorImpl &Ins, + CCAssignFn Fn) { + PreAnalyzeFormalArgumentsForF128(Ins); + CCState::AnalyzeFormalArguments(Ins, Fn); + OriginalArgWasF128.clear(); + } + void AnalyzeCallResult(const SmallVectorImpl &Ins, CCAssignFn Fn, const TargetLowering::CallLoweringInfo &CLI) { @@ -2894,11 +2895,8 @@ MipsCC MipsCCInfo(CallConv, Subtarget, CCInfo); Function::const_arg_iterator FuncArg = DAG.getMachineFunction().getFunction()->arg_begin(); - bool UseSoftFloat = Subtarget.abiUsesSoftFloat(); - CCInfo.PreAnalyzeFormalArgumentsForF128_(Ins); - MipsCCInfo.analyzeFormalArguments(Ins, UseSoftFloat, CCInfo); - CCInfo.ClearOriginalArgWasF128(); + CCInfo.AnalyzeFormalArguments(Ins, CC_Mips_FixedArg); MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), CCInfo.getInRegsParamsCount() > 0); @@ -3644,26 +3642,6 @@ } } -void MipsTargetLowering::MipsCC::analyzeFormalArguments( - const SmallVectorImpl &Args, bool IsSoftFloat, - CCState &State) { - unsigned NumArgs = Args.size(); - - for (unsigned I = 0; I != NumArgs; ++I) { - MVT ArgVT = Args[I].VT; - ISD::ArgFlagsTy ArgFlags = Args[I].Flags; - - if (!CC_Mips_FixedArg(I, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, State)) - continue; - -#ifndef NDEBUG - dbgs() << "Formal Arg #" << I << " has unhandled type " - << EVT(ArgVT).getEVTString(); -#endif - llvm_unreachable(nullptr); - } -} - unsigned MipsTargetLowering::MipsCC::reservedArgArea() const { return (Subtarget.isABI_O32() && (CallConv != CallingConv::Fast)) ? 16 : 0; }