summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-11-06 16:36:30 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-11-06 16:36:30 +0000
commitb70e27ca7b016109a9ce3dfef1f0924db8e00212 (patch)
tree8f59713cae75e3f5193d310d38fd10dddf07a8b1
parent4dfba103a7530c323d1fcc7f8b67edae44368fcf (diff)
downloadbcm5719-llvm-b70e27ca7b016109a9ce3dfef1f0924db8e00212.tar.gz
bcm5719-llvm-b70e27ca7b016109a9ce3dfef1f0924db8e00212.zip
[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 llvm-svn: 221461
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.cpp38
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.h3
2 files changed, 8 insertions, 33 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 5a20f63b131..aa7a276c8c3 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -140,12 +140,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(); }
@@ -153,6 +147,13 @@ public:
SmallVectorImpl<CCValAssign> &locs, LLVMContext &C)
: CCState(CC, isVarArg, MF, 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) {
@@ -2885,11 +2886,8 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain,
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);
@@ -3635,26 +3633,6 @@ void MipsTargetLowering::MipsCC::analyzeCallOperands(
}
}
-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;
}
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.h b/llvm/lib/Target/Mips/MipsISelLowering.h
index 0f662a42230..cabe032a160 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.h
+++ b/llvm/lib/Target/Mips/MipsISelLowering.h
@@ -372,9 +372,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.
OpenPOWER on IntegriCloud