diff options
| author | Justin Holewinski <jholewinski@nvidia.com> | 2012-05-25 16:35:28 +0000 | 
|---|---|---|
| committer | Justin Holewinski <jholewinski@nvidia.com> | 2012-05-25 16:35:28 +0000 | 
| commit | aa58397b3ce17ec4fed008150911111c7025fc91 (patch) | |
| tree | 3c10e8b7c79d87f5d8d4a738ccd5a188d966ce51 /llvm/lib/Target/Mips | |
| parent | 6a65819ba3e590a8564d7f13eb0215d228092274 (diff) | |
| download | bcm5719-llvm-aa58397b3ce17ec4fed008150911111c7025fc91.tar.gz bcm5719-llvm-aa58397b3ce17ec4fed008150911111c7025fc91.zip  | |
Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
to pass around a struct instead of a large set of individual values.  This
cleans up the interface and allows more information to be added to the struct
for future targets without requiring changes to each and every target.
NV_CONTRIB
llvm-svn: 157479
Diffstat (limited to 'llvm/lib/Target/Mips')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 23 | ||||
| -rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.h | 8 | 
2 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index a8b738b1111..7335858e079 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -1640,12 +1640,12 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const      Entry.Ty = PtrTy;      Args.push_back(Entry); -    std::pair<SDValue, SDValue> CallResult = -      LowerCallTo(DAG.getEntryNode(), PtrTy, +    TargetLowering::CallLoweringInfo CLI(DAG.getEntryNode(), PtrTy,                    false, false, false, false, 0, CallingConv::C,                    /*isTailCall=*/false, /*doesNotRet=*/false,                    /*isReturnValueUsed=*/true,                    TlsGetAddr, Args, DAG, dl); +    std::pair<SDValue, SDValue> CallResult = LowerCallTo(CLI);      SDValue Ret = CallResult.first; @@ -2415,14 +2415,19 @@ PassByValArg64(SDValue& ByValChain, SDValue Chain, DebugLoc dl,  /// (physical regs)/(stack frame), CALLSEQ_START and CALLSEQ_END are emitted.  /// TODO: isTailCall.  SDValue -MipsTargetLowering::LowerCall(SDValue InChain, SDValue Callee, -                              CallingConv::ID CallConv, bool isVarArg, -                              bool doesNotRet, bool &isTailCall, -                              const SmallVectorImpl<ISD::OutputArg> &Outs, -                              const SmallVectorImpl<SDValue> &OutVals, -                              const SmallVectorImpl<ISD::InputArg> &Ins, -                              DebugLoc dl, SelectionDAG &DAG, +MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,                                SmallVectorImpl<SDValue> &InVals) const { +  SelectionDAG &DAG                     = CLI.DAG; +  DebugLoc &dl                          = CLI.DL; +  SmallVector<ISD::OutputArg, 32> &Outs = CLI.Outs; +  SmallVector<SDValue, 32> &OutVals     = CLI.OutVals; +  SmallVector<ISD::InputArg, 32> &Ins   = CLI.Ins; +  SDValue InChain                       = CLI.Chain; +  SDValue Callee                        = CLI.Callee; +  bool &isTailCall                      = CLI.IsTailCall; +  CallingConv::ID CallConv              = CLI.CallConv; +  bool isVarArg                         = CLI.IsVarArg; +    // MIPs target does not yet support tail call optimization.    isTailCall = false; diff --git a/llvm/lib/Target/Mips/MipsISelLowering.h b/llvm/lib/Target/Mips/MipsISelLowering.h index a38bb2f5ee6..008228c8736 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.h +++ b/llvm/lib/Target/Mips/MipsISelLowering.h @@ -146,13 +146,7 @@ namespace llvm {                             SmallVectorImpl<SDValue> &InVals) const;      virtual SDValue -      LowerCall(SDValue Chain, SDValue Callee, -                CallingConv::ID CallConv, bool isVarArg, -                bool doesNotRet, bool &isTailCall, -                const SmallVectorImpl<ISD::OutputArg> &Outs, -                const SmallVectorImpl<SDValue> &OutVals, -                const SmallVectorImpl<ISD::InputArg> &Ins, -                DebugLoc dl, SelectionDAG &DAG, +      LowerCall(TargetLowering::CallLoweringInfo &CLI,                  SmallVectorImpl<SDValue> &InVals) const;      virtual SDValue  | 

