[mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 7 Nov 2014 10:45:16 +0000 (10:45 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 7 Nov 2014 10:45:16 +0000 (10:45 +0000)
Summary:
CCState objects already carry this information in their isVarArg() method.

Subscribers: llvm-commits

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

llvm-svn: 221516

llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/lib/Target/Mips/MipsISelLowering.h

index 4453aa6..2325cd2 100644 (file)
@@ -2593,8 +2593,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.
@@ -3599,12 +3598,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();
@@ -3618,7 +3616,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);
index 4fa2df2..7d42450 100644 (file)
@@ -368,7 +368,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);