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)
virtual MVT getScalarShiftAmountTy (EVT LHSTy) const
virtual void LowerOperationWrapper (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
virtual SDValue LowerOperation (SDValue Op, SelectionDAG &DAG) const
 LowerOperation - Provide custom lowering hooks for some operations.
virtual void ReplaceNodeResults (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
virtual const char * getTargetNodeName (unsigned Opcode) const
 getTargetNodeName - This method returns the name of a target specific
EVT getSetCCResultType (LLVMContext &Context, EVT VT) const
 getSetCCResultType - get the ISD::SETCC result ValueType
virtual SDValue PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const
virtual MachineBasicBlockEmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const

Static Public Member Functions

static const MipsTargetLoweringcreate (MipsTargetMachine &TM)

Protected Member Functions

SDValue getGlobalReg (SelectionDAG &DAG, EVT Ty) const
SDValue getAddrLocal (SDValue Op, SelectionDAG &DAG, bool HasMips64) const
SDValue getAddrGlobal (SDValue Op, SelectionDAG &DAG, unsigned Flag) const
SDValue getAddrGlobalLargeGOT (SDValue Op, SelectionDAG &DAG, unsigned HiFlag, unsigned LoFlag) 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

Protected Attributes

const MipsSubtargetSubtarget
bool HasMips64
bool IsN64
bool IsO32

Detailed Description

Definition at line 172 of file MipsISelLowering.h.


Constructor & Destructor Documentation

MipsTargetLowering::MipsTargetLowering ( MipsTargetMachine TM) [explicit]

Definition at line 215 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::ISD::EHSELECTION, llvm::ISD::EXCEPTIONADDR, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FABS, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FEXP, llvm::ISD::FLOG, llvm::ISD::FLOG10, llvm::ISD::FLOG2, llvm::ISD::FMA, llvm::ISD::FNEG, 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::hasBitCount(), llvm::MipsSubtarget::hasMips32r2(), HasMips64, llvm::MipsSubtarget::hasMips64r2(), llvm::MipsSubtarget::hasSEInReg(), llvm::MipsSubtarget::hasSwap(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, IsN64, llvm::ISD::JumpTable, llvm::ISD::LOAD, llvm::TargetLoweringBase::MaxStoresPerMemcpy, llvm::TargetOptions::NoNaNsFPMath, llvm::TargetMachine::Options, 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::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::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

const MipsTargetLowering * MipsTargetLowering::create ( MipsTargetMachine TM) [static]
MachineBasicBlock * MipsTargetLowering::EmitInstrWithCustomInserter ( MachineInstr MI,
MachineBasicBlock MBB 
) const [virtual]
SDValue MipsTargetLowering::getAddrGlobal ( SDValue  Op,
SelectionDAG DAG,
unsigned  Flag 
) const [protected]
SDValue MipsTargetLowering::getAddrGlobalLargeGOT ( SDValue  Op,
SelectionDAG DAG,
unsigned  HiFlag,
unsigned  LoFlag 
) const [protected]
SDValue MipsTargetLowering::getAddrLocal ( SDValue  Op,
SelectionDAG DAG,
bool  HasMips64 
) const [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]
virtual MVT llvm::MipsTargetLowering::getScalarShiftAmountTy ( EVT  LHSTy) const [inline, virtual]

Reimplemented from llvm::TargetLoweringBase.

Definition at line 178 of file MipsISelLowering.h.

References llvm::MVT::i32.

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

getSetCCResultType - get the ISD::SETCC result ValueType

Reimplemented from llvm::TargetLoweringBase.

Definition at line 417 of file MipsISelLowering.cpp.

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

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

getTargetNodeName - This method returns the name of a target specific

Reimplemented from llvm::TargetLowering.

Definition at line 150 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::ExtractLOHI, llvm::MipsISD::FPBrcond, llvm::MipsISD::FPCmp, llvm::MipsISD::GPRel, llvm::MipsISD::Hi, llvm::MipsISD::Ins, llvm::MipsISD::InsertLOHI, 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::MSub, llvm::MipsISD::MSUB_DSP, llvm::MipsISD::MSubu, llvm::MipsISD::MSUBU_DSP, llvm::MipsISD::MTHLIP, llvm::MipsISD::Mult, llvm::MipsISD::MULT, llvm::MipsISD::Multu, llvm::MipsISD::MULTU, llvm::MipsISD::Ret, llvm::MipsISD::SDL, llvm::MipsISD::SDR, llvm::MipsISD::SELECT_CC_DSP, llvm::MipsISD::SETCC_DSP, 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, and llvm::MipsISD::Wrapper.

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

LowerOperationWrapper - 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 710 of file MipsISelLowering.cpp.

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

Referenced by ReplaceNodeResults().

SDValue MipsTargetLowering::PerformDAGCombine ( SDNode N,
DAGCombinerInfo DCI 
) const [virtual]

PerformDAGCombine - 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 686 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 [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 720 of file MipsISelLowering.cpp.

References LowerOperationWrapper().


Member Data Documentation

Definition at line 330 of file MipsISelLowering.h.

Referenced by getOpndList(), and MipsTargetLowering().


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