LLVM API Documentation
#include <MipsISelLowering.h>


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 MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const |
Static Public Member Functions | |
| static const MipsTargetLowering * | create (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 MipsSubtarget * | Subtarget |
| bool | HasMips64 |
| bool | IsN64 |
| bool | IsO32 |
Definition at line 172 of file MipsISelLowering.h.
| 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.
| const MipsTargetLowering * MipsTargetLowering::create | ( | MipsTargetMachine & | TM | ) | [static] |
Definition at line 410 of file MipsISelLowering.cpp.
References llvm::createMips16TargetLowering(), llvm::createMipsSETargetLowering(), llvm::MipsTargetMachine::getSubtargetImpl(), and llvm::MipsSubtarget::inMips16Mode().
Referenced by llvm::MipsTargetMachine::setHelperClassesMips16(), and llvm::MipsTargetMachine::setHelperClassesMipsSE().
| MachineBasicBlock * MipsTargetLowering::EmitInstrWithCustomInserter | ( | MachineInstr * | MI, |
| MachineBasicBlock * | MBB | ||
| ) | const [virtual] |
Reimplemented from llvm::TargetLowering.
Reimplemented in llvm::MipsSETargetLowering, and llvm::Mips16TargetLowering.
Definition at line 795 of file MipsISelLowering.cpp.
References AND, expandPseudoDIV(), llvm::MachineInstr::getOpcode(), llvm::TargetLoweringBase::getTargetMachine(), llvm_unreachable, OR, and XOR.
| SDValue MipsTargetLowering::getAddrGlobal | ( | SDValue | Op, |
| SelectionDAG & | DAG, | ||
| unsigned | Flag | ||
| ) | const [protected] |
Definition at line 127 of file MipsISelLowering.cpp.
References llvm::SelectionDAG::getEntryNode(), getGlobalReg(), llvm::MachinePointerInfo::getGOT(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), getTargetNode(), llvm::SDValue::getValueType(), and llvm::MipsISD::Wrapper.
| SDValue MipsTargetLowering::getAddrGlobalLargeGOT | ( | SDValue | Op, |
| SelectionDAG & | DAG, | ||
| unsigned | HiFlag, | ||
| unsigned | LoFlag | ||
| ) | const [protected] |
Definition at line 137 of file MipsISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getEntryNode(), getGlobalReg(), llvm::MachinePointerInfo::getGOT(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), getTargetNode(), llvm::SDValue::getValueType(), llvm::MipsISD::Hi, llvm::HexagonISD::Hi, llvm::ARMISD::Wrapper, and llvm::MipsISD::Wrapper.
| SDValue MipsTargetLowering::getAddrLocal | ( | SDValue | Op, |
| SelectionDAG & | DAG, | ||
| bool | HasMips64 | ||
| ) | const [protected] |
Definition at line 112 of file MipsISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getEntryNode(), getGlobalReg(), llvm::MachinePointerInfo::getGOT(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), getTargetNode(), llvm::SDValue::getValueType(), llvm::ARMCP::GOT, llvm::HexagonISD::Lo, llvm::MipsISD::Lo, llvm::SPII::Load, llvm::MipsII::MO_ABS_LO, llvm::AArch64II::MO_GOT, llvm::MipsII::MO_GOT_OFST, llvm::MipsII::MO_GOT_PAGE, and llvm::MipsISD::Wrapper.
| SDValue MipsTargetLowering::getGlobalReg | ( | SelectionDAG & | DAG, |
| EVT | Ty | ||
| ) | const [protected] |
Definition at line 77 of file MipsISelLowering.cpp.
References llvm::MipsFunctionInfo::getGlobalBaseReg(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), and llvm::SelectionDAG::getRegister().
Referenced by getAddrGlobal(), getAddrGlobalLargeGOT(), getAddrLocal(), and getOpndList().
| 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] |
This function fills Ops, which is the list of operands that will later be used when a function call node is created. It also generates copyToReg nodes to set up argument registers.
Definition at line 2272 of file MipsISelLowering.cpp.
References llvm::TargetLowering::CallLoweringInfo::CallConv, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::TargetLowering::CallLoweringInfo::DAG, llvm::TargetLowering::CallLoweringInfo::DL, F(), G, llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::SelectionDAG::getCopyToReg(), getGlobalReg(), llvm::MipsRegisterInfo::getMips16RetHelperMask(), llvm::SDValue::getNode(), llvm::SelectionDAG::getRegister(), llvm::TargetMachine::getRegisterInfo(), llvm::SelectionDAG::getRegisterMask(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SDValue::getValue(), llvm::Function::hasFnAttribute(), llvm::MVT::i32, llvm::MVT::i64, llvm::MipsSubtarget::inMips16HardFloat(), IsN64, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and Subtarget.
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] |
LowerOperation - Provide custom lowering hooks for some operations.
Reimplemented from llvm::TargetLowering.
Reimplemented in llvm::MipsSETargetLowering.
Definition at line 727 of file MipsISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ATOMIC_FENCE, llvm::ISD::BlockAddress, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::ISD::ConstantPool, llvm::ISD::EH_RETURN, llvm::ISD::FABS, llvm::ISD::FCOPYSIGN, llvm::ISD::FP_TO_SINT, llvm::ISD::FRAMEADDR, llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::ISD::JumpTable, llvm::ISD::LOAD, llvm::ISD::RETURNADDR, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SHL_PARTS, llvm::ISD::SRA_PARTS, llvm::ISD::SRL_PARTS, llvm::ISD::STORE, and llvm::ISD::VASTART.
Referenced by LowerOperationWrapper().
| 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().
bool llvm::MipsTargetLowering::HasMips64 [protected] |
Definition at line 330 of file MipsISelLowering.h.
Referenced by llvm::MipsSETargetLowering::MipsSETargetLowering(), and MipsTargetLowering().
bool llvm::MipsTargetLowering::IsN64 [protected] |
Definition at line 330 of file MipsISelLowering.h.
Referenced by getOpndList(), and MipsTargetLowering().
bool llvm::MipsTargetLowering::IsO32 [protected] |
Definition at line 330 of file MipsISelLowering.h.
Referenced by llvm::MipsTargetLowering::MipsCC::intArgRegs(), llvm::MipsTargetLowering::MipsCC::numIntArgRegs(), and llvm::MipsTargetLowering::MipsCC::reservedArgArea().
const MipsSubtarget* llvm::MipsTargetLowering::Subtarget [protected] |
Definition at line 328 of file MipsISelLowering.h.
Referenced by getOpndList(), llvm::MipsSETargetLowering::getRepRegClassFor(), llvm::Mips16TargetLowering::Mips16TargetLowering(), llvm::MipsSETargetLowering::MipsSETargetLowering(), MipsTargetLowering(), llvm::MipsSETargetLowering::PerformDAGCombine(), and PerformDAGCombine().