LLVM API Documentation

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
llvm::MipsTargetLowering Class Reference

#include <MipsISelLowering.h>

Inheritance diagram for llvm::MipsTargetLowering:
Inheritance graph
[legend]
Collaboration diagram for llvm::MipsTargetLowering:
Collaboration graph
[legend]

List of all members.

Classes

struct  ByValArgInfo
 ByValArgInfo - Byval argument information. More...
struct  LTStr
class  MipsCC

Public Member Functions

 MipsTargetLowering (MipsTargetMachine &TM, const MipsSubtarget &STI)
FastISelcreateFastISel (FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo) const override
MVT getScalarShiftAmountTy (EVT LHSTy) const override
void LowerOperationWrapper (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
SDValue LowerOperation (SDValue Op, SelectionDAG &DAG) const override
 LowerOperation - Provide custom lowering hooks for some operations.
void ReplaceNodeResults (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
const char * getTargetNodeName (unsigned Opcode) const override
 getTargetNodeName - This method returns the name of a target specific
EVT getSetCCResultType (LLVMContext &Context, EVT VT) const override
 getSetCCResultType - get the ISD::SETCC result ValueType
SDValue PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const override
MachineBasicBlockEmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const override

Static Public Member Functions

static const MipsTargetLoweringcreate (MipsTargetMachine &TM, const MipsSubtarget &STI)

Protected Member Functions

SDValue getGlobalReg (SelectionDAG &DAG, EVT Ty) const
template<class NodeTy >
SDValue getAddrLocal (NodeTy *N, EVT Ty, SelectionDAG &DAG, bool IsN32OrN64) const
template<class NodeTy >
SDValue getAddrGlobal (NodeTy *N, EVT Ty, SelectionDAG &DAG, unsigned Flag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
template<class NodeTy >
SDValue getAddrGlobalLargeGOT (NodeTy *N, EVT Ty, SelectionDAG &DAG, unsigned HiFlag, unsigned LoFlag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
template<class NodeTy >
SDValue getAddrNonPIC (NodeTy *N, EVT Ty, SelectionDAG &DAG) const
virtual void getOpndList (SmallVectorImpl< SDValue > &Ops, std::deque< std::pair< unsigned, SDValue > > &RegsToPass, bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage, CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const
SDValue lowerLOAD (SDValue Op, SelectionDAG &DAG) const
SDValue lowerSTORE (SDValue Op, SelectionDAG &DAG) const

Protected Attributes

const MipsSubtargetSubtarget

Detailed Description

Definition at line 214 of file MipsISelLowering.h.


Constructor & Destructor Documentation

Definition at line 212 of file MipsISelLowering.cpp.

References llvm::ISD::ADD, llvm::TargetLoweringBase::AddPromotedToType(), llvm::ISD::AND, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::ISD::BSWAP, llvm::ISD::ConstantPool, llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::TargetLoweringBase::Custom, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::EH_RETURN, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FEXP, llvm::ISD::FLOG, llvm::ISD::FLOG10, llvm::ISD::FLOG2, llvm::ISD::FMA, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FPOW, llvm::ISD::FPOWI, llvm::ISD::FREM, llvm::ISD::FSIN, llvm::ISD::FSINCOS, llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::MipsSubtarget::hasCnMips(), llvm::MipsSubtarget::hasMips32(), llvm::MipsSubtarget::hasMips32r2(), llvm::MipsSubtarget::hasMips32r6(), llvm::MipsSubtarget::hasMips64(), llvm::MipsSubtarget::hasMips64r2(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::MipsSubtarget::inMicroMipsMode(), llvm::MipsSubtarget::inMips16Mode(), llvm::MipsSubtarget::isABI_N32(), llvm::MipsSubtarget::isABI_N64(), llvm::MipsSubtarget::isGP64bit(), llvm::ISD::JumpTable, llvm::TargetLoweringBase::Legal, llvm::ISD::LOAD, llvm::TargetLoweringBase::MaxStoresPerMemcpy, llvm::ISD::OR, llvm::MVT::Other, llvm::TargetLoweringBase::Promote, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIV, llvm::ISD::SDIVREM, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::TargetLoweringBase::setBooleanContents(), llvm::TargetLoweringBase::setBooleanVectorContents(), llvm::ISD::SETCC, llvm::TargetLoweringBase::setExceptionPointerRegister(), llvm::TargetLoweringBase::setExceptionSelectorRegister(), llvm::TargetLoweringBase::setInsertFencesForAtomic(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::TargetLoweringBase::setMinFunctionAlignment(), llvm::TargetLoweringBase::setMinStackArgumentAlignment(), llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setStackPointerRegisterToSaveRestore(), llvm::TargetLoweringBase::setTargetDAGCombine(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA_PARTS, llvm::ISD::SREM, llvm::ISD::SRL_PARTS, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::ISD::STORE, Subtarget, llvm::ISD::TRAP, llvm::ISD::UDIV, llvm::ISD::UDIVREM, llvm::ISD::UINT_TO_FP, llvm::ISD::UREM, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::ISD::VASTART, llvm::TargetLoweringBase::ZeroOrNegativeOneBooleanContent, llvm::TargetLoweringBase::ZeroOrOneBooleanContent, and llvm::ISD::ZEXTLOAD.


Member Function Documentation

FastISel * MipsTargetLowering::createFastISel ( FunctionLoweringInfo funcInfo,
const TargetLibraryInfo libInfo 
) const [override, virtual]

createFastISel - This method returns a target specific FastISel object, or null if the target does not support "fast" ISel.

Reimplemented from llvm::TargetLowering.

Definition at line 422 of file MipsISelLowering.cpp.

References EnableMipsFastISel.

This method should be implemented by targets that mark instructions with the 'usesCustomInserter' flag. These instructions are special in various ways, which require special support to insert. The specified MachineInstr is created but not inserted into any basic blocks, and this method is called to expand it into a sequence of instructions, potentially also creating new basic blocks and control flow.

Reimplemented from llvm::TargetLowering.

Reimplemented in llvm::MipsSETargetLowering, and llvm::Mips16TargetLowering.

Definition at line 862 of file MipsISelLowering.cpp.

References AND, llvm::MachineInstr::getOpcode(), llvm::TargetLoweringBase::getTargetMachine(), insertDivByZeroTrap(), llvm_unreachable, OR, and XOR.

template<class NodeTy >
SDValue llvm::MipsTargetLowering::getAddrGlobal ( NodeTy *  N,
EVT  Ty,
SelectionDAG DAG,
unsigned  Flag,
SDValue  Chain,
const MachinePointerInfo PtrInfo 
) const [inline, protected]
template<class NodeTy >
SDValue llvm::MipsTargetLowering::getAddrGlobalLargeGOT ( NodeTy *  N,
EVT  Ty,
SelectionDAG DAG,
unsigned  HiFlag,
unsigned  LoFlag,
SDValue  Chain,
const MachinePointerInfo PtrInfo 
) const [inline, protected]
template<class NodeTy >
SDValue llvm::MipsTargetLowering::getAddrLocal ( NodeTy *  N,
EVT  Ty,
SelectionDAG DAG,
bool  IsN32OrN64 
) const [inline, protected]
template<class NodeTy >
SDValue llvm::MipsTargetLowering::getAddrNonPIC ( NodeTy *  N,
EVT  Ty,
SelectionDAG DAG 
) const [inline, protected]
SDValue MipsTargetLowering::getGlobalReg ( SelectionDAG DAG,
EVT  Ty 
) const [protected]
void MipsTargetLowering::getOpndList ( SmallVectorImpl< SDValue > &  Ops,
std::deque< std::pair< unsigned, SDValue > > &  RegsToPass,
bool  IsPICCall,
bool  GlobalOrExternal,
bool  InternalLinkage,
CallLoweringInfo CLI,
SDValue  Callee,
SDValue  Chain 
) const [protected, virtual]
MVT llvm::MipsTargetLowering::getScalarShiftAmountTy ( EVT  LHSTy) const [inline, override, virtual]

Reimplemented from llvm::TargetLoweringBase.

Definition at line 228 of file MipsISelLowering.h.

References llvm::MVT::i32.

Referenced by performMULCombine().

EVT MipsTargetLowering::getSetCCResultType ( LLVMContext Context,
EVT  VT 
) const [override, virtual]

getSetCCResultType - get the ISD::SETCC result ValueType

Reimplemented from llvm::TargetLoweringBase.

Definition at line 429 of file MipsISelLowering.cpp.

References llvm::EVT::changeVectorElementTypeToInteger(), llvm::MVT::i32, and llvm::EVT::isVector().

const char * MipsTargetLowering::getTargetNodeName ( unsigned  Opcode) const [override, virtual]

getTargetNodeName - This method returns the name of a target specific

Reimplemented from llvm::TargetLowering.

Definition at line 122 of file MipsISelLowering.cpp.

References llvm::MipsISD::BuildPairF64, llvm::MipsISD::CMovFP_F, llvm::MipsISD::CMovFP_T, llvm::MipsISD::DivRem, llvm::MipsISD::DivRem16, llvm::MipsISD::DivRemU, llvm::MipsISD::DivRemU16, llvm::MipsISD::EH_RETURN, llvm::MipsISD::Ext, llvm::MipsISD::EXTP, llvm::MipsISD::EXTPDP, llvm::MipsISD::EXTR_R_W, llvm::MipsISD::EXTR_RS_W, llvm::MipsISD::EXTR_S_H, llvm::MipsISD::EXTR_W, llvm::MipsISD::ExtractElementF64, llvm::MipsISD::FPBrcond, llvm::MipsISD::FPCmp, llvm::MipsISD::GPRel, llvm::MipsISD::Hi, llvm::MipsISD::ILVEV, llvm::MipsISD::ILVL, llvm::MipsISD::ILVOD, llvm::MipsISD::ILVR, llvm::MipsISD::Ins, llvm::MipsISD::INSVE, llvm::MipsISD::JmpLink, llvm::MipsISD::LDL, llvm::MipsISD::LDR, llvm::MipsISD::Lo, llvm::MipsISD::LWL, llvm::MipsISD::LWR, llvm::MipsISD::MAdd, llvm::MipsISD::MADD_DSP, llvm::MipsISD::MAddu, llvm::MipsISD::MADDU_DSP, llvm::MipsISD::MFHI, llvm::MipsISD::MFLO, llvm::MipsISD::MSub, llvm::MipsISD::MSUB_DSP, llvm::MipsISD::MSubu, llvm::MipsISD::MSUBU_DSP, llvm::MipsISD::MTHLIP, llvm::MipsISD::MTLOHI, llvm::MipsISD::Mult, llvm::MipsISD::MULT, llvm::MipsISD::Multu, llvm::MipsISD::MULTU, llvm::MipsISD::PCKEV, llvm::MipsISD::PCKOD, llvm::MipsISD::Ret, llvm::MipsISD::SDL, llvm::MipsISD::SDR, llvm::MipsISD::SELECT_CC_DSP, llvm::MipsISD::SETCC_DSP, llvm::MipsISD::SHF, llvm::MipsISD::SHILO, llvm::MipsISD::SHLL_DSP, llvm::MipsISD::SHRA_DSP, llvm::MipsISD::SHRL_DSP, llvm::MipsISD::SWL, llvm::MipsISD::SWR, llvm::MipsISD::Sync, llvm::MipsISD::TailCall, llvm::MipsISD::ThreadPointer, llvm::MipsISD::TruncIntFP, llvm::MipsISD::VALL_NONZERO, llvm::MipsISD::VALL_ZERO, llvm::MipsISD::VANY_NONZERO, llvm::MipsISD::VANY_ZERO, llvm::MipsISD::VCEQ, llvm::MipsISD::VCLE_S, llvm::MipsISD::VCLE_U, llvm::MipsISD::VCLT_S, llvm::MipsISD::VCLT_U, llvm::MipsISD::VEXTRACT_SEXT_ELT, llvm::MipsISD::VEXTRACT_ZEXT_ELT, llvm::MipsISD::VNOR, llvm::MipsISD::VSHF, llvm::MipsISD::VSMAX, llvm::MipsISD::VSMIN, llvm::MipsISD::VUMAX, llvm::MipsISD::VUMIN, and llvm::MipsISD::Wrapper.

SDValue MipsTargetLowering::lowerLOAD ( SDValue  Op,
SelectionDAG DAG 
) const [protected]
SDValue MipsTargetLowering::LowerOperation ( SDValue  Op,
SelectionDAG DAG 
) const [override, virtual]
void MipsTargetLowering::LowerOperationWrapper ( SDNode N,
SmallVectorImpl< SDValue > &  Results,
SelectionDAG DAG 
) const [override, virtual]

This callback is invoked by the type legalizer to legalize nodes with an illegal operand type but legal result types. It replaces the LowerOperation callback in the type Legalizer. The reason we can not do away with LowerOperation entirely is that LegalizeDAG isn't yet ready to use this callback.

TODO: Consider merging with ReplaceNodeResults.

The target places new result values for the node in Results (their number and types must exactly match those of the original return values of the node), or leaves Results empty, which indicates that the node is not to be custom lowered after all. The default implementation calls LowerOperation.

Reimplemented from llvm::TargetLowering.

Definition at line 769 of file MipsISelLowering.cpp.

References llvm::SDNode::getNumValues(), llvm::SDValue::getValue(), I, LowerOperation(), and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

Referenced by ReplaceNodeResults().

SDValue MipsTargetLowering::lowerSTORE ( SDValue  Op,
SelectionDAG DAG 
) const [protected]
SDValue MipsTargetLowering::PerformDAGCombine ( SDNode N,
DAGCombinerInfo DCI 
) const [override, virtual]

This method will be invoked for all target nodes and for any target-independent nodes that the target has registered with invoke it for.

The semantics are as follows: Return Value: SDValue.Val == 0 - No change was made SDValue.Val == N - N was replaced, is dead, and is already handled. otherwise - N should be replaced by the returned Operand.

In addition, methods provided by DAGCombinerInfo may be used to perform more complex transformations.

Reimplemented from llvm::TargetLowering.

Reimplemented in llvm::MipsSETargetLowering.

Definition at line 745 of file MipsISelLowering.cpp.

References llvm::ISD::ADD, llvm::ISD::AND, llvm::TargetLowering::DAGCombinerInfo::DAG, llvm::SDNode::getOpcode(), llvm::ISD::OR, performADDCombine(), performANDCombine(), performDivRemCombine(), performORCombine(), performSELECTCombine(), llvm::ISD::SDIVREM, llvm::ISD::SELECT, Subtarget, and llvm::ISD::UDIVREM.

void MipsTargetLowering::ReplaceNodeResults ( SDNode N,
SmallVectorImpl< SDValue > &  Results,
SelectionDAG DAG 
) const [override, virtual]

ReplaceNodeResults - Replace the results of node with an illegal result type with new values built out of custom code.

Reimplemented from llvm::TargetLowering.

Definition at line 779 of file MipsISelLowering.cpp.

References LowerOperationWrapper().


Member Data Documentation


The documentation for this class was generated from the following files: