LLVM API Documentation
#include <MipsISelLowering.h>
Definition at line 214 of file MipsISelLowering.h.
MipsTargetLowering::MipsTargetLowering | ( | MipsTargetMachine & | TM, |
const MipsSubtarget & | STI | ||
) | [explicit] |
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.
const MipsTargetLowering * MipsTargetLowering::create | ( | MipsTargetMachine & | TM, |
const MipsSubtarget & | STI | ||
) | [static] |
Definition at line 412 of file MipsISelLowering.cpp.
References llvm::createMips16TargetLowering(), llvm::createMipsSETargetLowering(), and llvm::MipsSubtarget::inMips16Mode().
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.
MachineBasicBlock * MipsTargetLowering::EmitInstrWithCustomInserter | ( | MachineInstr * | MI, |
MachineBasicBlock * | MBB | ||
) | const [override, virtual] |
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.
SDValue llvm::MipsTargetLowering::getAddrGlobal | ( | NodeTy * | N, |
EVT | Ty, | ||
SelectionDAG & | DAG, | ||
unsigned | Flag, | ||
SDValue | Chain, | ||
const MachinePointerInfo & | PtrInfo | ||
) | const [inline, protected] |
Definition at line 290 of file MipsISelLowering.h.
References getGlobalReg(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), and llvm::MipsISD::Wrapper.
SDValue llvm::MipsTargetLowering::getAddrGlobalLargeGOT | ( | NodeTy * | N, |
EVT | Ty, | ||
SelectionDAG & | DAG, | ||
unsigned | HiFlag, | ||
unsigned | LoFlag, | ||
SDValue | Chain, | ||
const MachinePointerInfo & | PtrInfo | ||
) | const [inline, protected] |
Definition at line 304 of file MipsISelLowering.h.
References llvm::ISD::ADD, getGlobalReg(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), llvm::MipsISD::Hi, llvm::HexagonISD::Hi, llvm::ARMISD::Wrapper, and llvm::MipsISD::Wrapper.
SDValue llvm::MipsTargetLowering::getAddrLocal | ( | NodeTy * | N, |
EVT | Ty, | ||
SelectionDAG & | DAG, | ||
bool | IsN32OrN64 | ||
) | const [inline, protected] |
Definition at line 270 of file MipsISelLowering.h.
References llvm::ISD::ADD, llvm::SelectionDAG::getEntryNode(), getGlobalReg(), llvm::MachinePointerInfo::getGOT(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getNode(), 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 llvm::MipsTargetLowering::getAddrNonPIC | ( | NodeTy * | N, |
EVT | Ty, | ||
SelectionDAG & | DAG | ||
) | const [inline, protected] |
Definition at line 323 of file MipsISelLowering.h.
References llvm::ISD::ADD, llvm::SelectionDAG::getNode(), llvm::MipsISD::Hi, llvm::HexagonISD::Hi, llvm::HexagonISD::Lo, llvm::MipsISD::Lo, llvm::MipsII::MO_ABS_HI, and llvm::MipsII::MO_ABS_LO.
SDValue MipsTargetLowering::getGlobalReg | ( | SelectionDAG & | DAG, |
EVT | Ty | ||
) | const [protected] |
Definition at line 86 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 2407 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::TargetSubtargetInfo::getRegisterInfo(), llvm::SelectionDAG::getRegisterMask(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SDValue::getValue(), llvm::Function::hasFnAttribute(), llvm::MVT::i32, llvm::MVT::i64, llvm::MipsSubtarget::inMips16HardFloat(), llvm::MipsSubtarget::isABI_N64(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and Subtarget.
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] |
Definition at line 2098 of file MipsISelLowering.cpp.
References createLoadLR(), llvm::ISD::EXTLOAD, llvm::MemSDNode::getAlignment(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::LoadSDNode::getExtensionType(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::MVT::i32, llvm::MVT::i64, llvm::MipsSubtarget::isLittle(), llvm::AArch64DB::LD, llvm::MipsISD::LDL, llvm::MipsISD::LDR, llvm::MipsISD::LWL, llvm::MipsISD::LWR, llvm::ISD::NON_EXTLOAD, llvm::ISD::SEXTLOAD, llvm::ISD::SHL, llvm::ISD::SRL, Subtarget, llvm::MipsSubtarget::systemSupportsUnalignedAccess(), llvm::RegState::Undef, and llvm::ISD::ZEXTLOAD.
Referenced by LowerOperation().
SDValue MipsTargetLowering::LowerOperation | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const [override, virtual] |
LowerOperation - Provide custom lowering hooks for some operations.
Reimplemented from llvm::TargetLowering.
Reimplemented in llvm::MipsSETargetLowering.
Definition at line 786 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::FCOPYSIGN, llvm::ISD::FP_TO_SINT, llvm::ISD::FRAMEADDR, llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::ISD::JumpTable, llvm::ISD::LOAD, lowerLOAD(), lowerSTORE(), 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, llvm::ISD::VAARG, and llvm::ISD::VASTART.
Referenced by LowerOperationWrapper().
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] |
Definition at line 2223 of file MipsISelLowering.cpp.
References llvm::MemSDNode::getAlignment(), llvm::MemSDNode::getMemoryVT(), llvm::MVT::i32, llvm::MVT::i64, llvm::MipsSubtarget::isLittle(), lowerFP_TO_SINT_STORE(), lowerUnalignedIntStore(), Subtarget, and llvm::MipsSubtarget::systemSupportsUnalignedAccess().
Referenced by LowerOperation().
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().
const MipsSubtarget& llvm::MipsTargetLowering::Subtarget [protected] |
Definition at line 435 of file MipsISelLowering.h.
Referenced by llvm::MipsSETargetLowering::allowsMisalignedMemoryAccesses(), getOpndList(), llvm::MipsSETargetLowering::getRepRegClassFor(), llvm::MipsTargetLowering::MipsCC::intArgRegs(), lowerLOAD(), lowerSTORE(), llvm::MipsSETargetLowering::MipsSETargetLowering(), MipsTargetLowering(), llvm::MipsSETargetLowering::PerformDAGCombine(), PerformDAGCombine(), and llvm::MipsTargetLowering::MipsCC::reservedArgArea().