[llvm-branch-commits] [llvm-branch] r223042 - Merged from r221461:

Daniel Sanders daniel.sanders at imgtec.com
Mon Dec 1 08:32:03 PST 2014


Author: dsanders
Date: Mon Dec  1 10:32:03 2014
New Revision: 223042

URL: http://llvm.org/viewvc/llvm-project?rev=223042&view=rev
Log:
Merged from r221461:

[mips] Removed MipsISelLowering::analyzeFormalArguments() in favour of CCState::AnalyzeFormalArguments()

Summary:
As with returns, we must be able to identify f128 arguments despite them
being lowered away. We do this with a pre-analyze step that builds a
vector and then we use this vector from the tablegen-erated code.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

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


Modified:
    llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.cpp
    llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.h

Modified: llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.cpp?rev=223042&r1=223041&r2=223042&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.cpp Mon Dec  1 10:32:03 2014
@@ -139,12 +139,6 @@ public:
     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<ISD::InputArg> &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(); }
 
@@ -152,6 +146,13 @@ public:
               const TargetMachine &TM, SmallVectorImpl<CCValAssign> &locs, LLVMContext &C)
       : CCState(CC, isVarArg, MF, TM, locs, C) {}
 
+  void AnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins,
+                              CCAssignFn Fn) {
+    PreAnalyzeFormalArgumentsForF128(Ins);
+    CCState::AnalyzeFormalArguments(Ins, Fn);
+    OriginalArgWasF128.clear();
+  }
+
   void AnalyzeCallResult(const SmallVectorImpl<ISD::InputArg> &Ins,
                          CCAssignFn Fn,
                          const TargetLowering::CallLoweringInfo &CLI) {
@@ -2873,11 +2874,8 @@ MipsTargetLowering::LowerFormalArguments
   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);
 
@@ -3624,26 +3622,6 @@ void MipsTargetLowering::MipsCC::analyze
   }
 }
 
-void MipsTargetLowering::MipsCC::analyzeFormalArguments(
-    const SmallVectorImpl<ISD::InputArg> &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;
 }

Modified: llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.h?rev=223042&r1=223041&r2=223042&view=diff
==============================================================================
--- llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.h (original)
+++ llvm/branches/release_35/lib/Target/Mips/MipsISelLowering.h Mon Dec  1 10:32:03 2014
@@ -356,9 +356,6 @@ namespace llvm {
                                const SDNode *CallNode,
                                std::vector<ArgListEntry> &FuncArgs,
                                CCState &State);
-      void analyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &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.





More information about the llvm-branch-commits mailing list