Skip to content

Commit

Permalink
Merged from r221516:
Browse files Browse the repository at this point in the history
[mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.

Summary:
CCState objects already carry this information in their isVarArg() method.

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6084

llvm-svn: 223045
  • Loading branch information
dsandersllvm committed Dec 1, 2014
1 parent 84a7df7 commit 30d2ca7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions llvm/lib/Target/Mips/MipsISelLowering.cpp
Expand Up @@ -2587,8 +2587,7 @@ MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
MipsCC MipsCCInfo(CallConv, Subtarget, CCInfo);

CCInfo.PreAnalyzeCallOperandsForF128_(Outs, CLI.getArgs(), Callee.getNode());
MipsCCInfo.analyzeCallOperands(Outs, IsVarArg, Callee.getNode(),
CLI.getArgs(), CCInfo);
MipsCCInfo.analyzeCallOperands(Outs, Callee.getNode(), CLI.getArgs(), CCInfo);
CCInfo.ClearOriginalArgWasF128();

// Get a count of how many bytes are to be pushed on the stack.
Expand Down Expand Up @@ -3588,12 +3587,11 @@ MipsTargetLowering::MipsCC::MipsCC(CallingConv::ID CC,
}

void MipsTargetLowering::MipsCC::analyzeCallOperands(
const SmallVectorImpl<ISD::OutputArg> &Args, bool IsVarArg,
const SDNode *CallNode, std::vector<ArgListEntry> &FuncArgs,
CCState &State) {
const SmallVectorImpl<ISD::OutputArg> &Args, const SDNode *CallNode,
std::vector<ArgListEntry> &FuncArgs, CCState &State) {
MipsCC::SpecialCallingConvType SpecialCallingConv =
getSpecialCallingConv(CallNode);
assert((CallConv != CallingConv::Fast || !IsVarArg) &&
assert((CallConv != CallingConv::Fast || !State.isVarArg()) &&
"CallingConv::Fast shouldn't be used for vararg functions.");

unsigned NumOpnds = Args.size();
Expand All @@ -3607,7 +3605,7 @@ void MipsTargetLowering::MipsCC::analyzeCallOperands(
ISD::ArgFlagsTy ArgFlags = Args[I].Flags;
bool R;

if (IsVarArg && !Args[I].IsFixed)
if (State.isVarArg() && !Args[I].IsFixed)
R = CC_Mips_VarArg(I, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, State);
else
R = FixedFn(I, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, State);
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/Mips/MipsISelLowering.h
Expand Up @@ -352,7 +352,7 @@ namespace llvm {
CCState &Info);

void analyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs,
bool IsVarArg, const SDNode *CallNode,
const SDNode *CallNode,
std::vector<ArgListEntry> &FuncArgs,
CCState &State);

Expand Down

0 comments on commit 30d2ca7

Please sign in to comment.