LLVM API Documentation
#include <XCoreISelLowering.h>
Public Member Functions | |
XCoreTargetLowering (const TargetMachine &TM) | |
bool | isZExtFree (SDValue Val, EVT VT2) const override |
unsigned | getJumpTableEncoding () const override |
MVT | getScalarShiftAmountTy (EVT LHSTy) 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 | |
MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const override |
bool | isLegalAddressingMode (const AddrMode &AM, Type *Ty) const override |
Definition at line 93 of file XCoreISelLowering.h.
XCoreTargetLowering::XCoreTargetLowering | ( | const TargetMachine & | TM | ) | [explicit] |
Definition at line 71 of file XCoreISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::ADJUST_TRAMPOLINE, llvm::ISD::ATOMIC_FENCE, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::TargetLoweringBase::computeRegisterProperties(), llvm::ISD::ConstantPool, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::TargetLoweringBase::Custom, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::EH_RETURN, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::ISD::FRAME_TO_ARGS_OFFSET, llvm::ISD::GlobalAddress, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::TargetLoweringBase::Legal, llvm::ISD::LOAD, llvm::TargetLoweringBase::MaxStoresPerMemcpy, llvm::TargetLoweringBase::MaxStoresPerMemcpyOptSize, llvm::TargetLoweringBase::MaxStoresPerMemmove, llvm::TargetLoweringBase::MaxStoresPerMemmoveOptSize, llvm::TargetLoweringBase::MaxStoresPerMemset, llvm::TargetLoweringBase::MaxStoresPerMemsetOptSize, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::MVT::Other, llvm::TargetLoweringBase::Promote, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SELECT_CC, llvm::TargetLoweringBase::setBooleanContents(), llvm::TargetLoweringBase::setBooleanVectorContents(), llvm::TargetLoweringBase::setExceptionPointerRegister(), llvm::TargetLoweringBase::setExceptionSelectorRegister(), llvm::TargetLoweringBase::setInsertFencesForAtomic(), llvm::TargetLoweringBase::setIntDivIsCheap(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::TargetLoweringBase::setMinFunctionAlignment(), llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setPrefFunctionAlignment(), llvm::TargetLoweringBase::setSchedulingPreference(), llvm::TargetLoweringBase::setStackPointerRegisterToSaveRestore(), llvm::TargetLoweringBase::setTargetDAGCombine(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL_PARTS, llvm::ISD::SMUL_LOHI, llvm::Sched::Source, llvm::ISD::SRA_PARTS, llvm::ISD::SRL_PARTS, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::ISD::STORE, llvm::ISD::SUB, llvm::ISD::SUBC, llvm::ISD::SUBE, llvm::ISD::TRAP, llvm::ISD::UMUL_LOHI, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::ISD::VASTART, llvm::TargetLoweringBase::ZeroOrOneBooleanContent, and llvm::ISD::ZEXTLOAD.
MachineBasicBlock * XCoreTargetLowering::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.
Definition at line 1549 of file XCoreISelLowering.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), F(), llvm::MCInstrInfo::get(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineInstr::getDebugLoc(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetLoweringBase::getTargetMachine(), llvm::MachineFunction::insert(), llvm::TargetOpcode::PHI, llvm::ISD::SELECT_CC, llvm::MachineBasicBlock::splice(), TII, and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
unsigned XCoreTargetLowering::getJumpTableEncoding | ( | ) | const [override, virtual] |
Return the entry encoding for a jump table in the current function. The returned value is a member of the MachineJumpTableInfo::JTEntryKind enum.
getJumpTableEncoding - Return the entry encoding for a jump table in the current function. The returned value is a member of the MachineJumpTableInfo::JTEntryKind enum.
Reimplemented from llvm::TargetLowering.
Definition at line 345 of file XCoreISelLowering.cpp.
References llvm::MachineJumpTableInfo::EK_Inline.
MVT llvm::XCoreTargetLowering::getScalarShiftAmountTy | ( | EVT | LHSTy | ) | const [inline, override, virtual] |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 104 of file XCoreISelLowering.h.
References llvm::MVT::i32.
const char * XCoreTargetLowering::getTargetNodeName | ( | unsigned | Opcode | ) | const [override, virtual] |
getTargetNodeName - This method returns the name of a target specific
Reimplemented from llvm::TargetLowering.
Definition at line 45 of file XCoreISelLowering.cpp.
References llvm::XCoreISD::BL, llvm::XCoreISD::BR_JT, llvm::XCoreISD::BR_JT32, llvm::XCoreISD::CPRelativeWrapper, llvm::XCoreISD::CRC8, llvm::XCoreISD::DPRelativeWrapper, llvm::XCoreISD::EH_RETURN, llvm::XCoreISD::FRAME_TO_ARGS_OFFSET, llvm::XCoreISD::LADD, llvm::XCoreISD::LDWSP, llvm::XCoreISD::LMUL, llvm::XCoreISD::LSUB, llvm::XCoreISD::MACCS, llvm::XCoreISD::MACCU, llvm::XCoreISD::MEMBARRIER, llvm::XCoreISD::PCRelativeWrapper, llvm::XCoreISD::RETSP, and llvm::XCoreISD::STWSP.
bool XCoreTargetLowering::isLegalAddressingMode | ( | const AddrMode & | AM, |
Type * | Ty | ||
) | const [override, virtual] |
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1920 of file XCoreISelLowering.cpp.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::TargetSubtargetInfo::getDataLayout(), llvm::TargetMachine::getSubtargetImpl(), llvm::DataLayout::getTypeAllocSize(), llvm::Type::getTypeID(), llvm::TargetLoweringBase::AddrMode::HasBaseReg, isImmUs(), isImmUs2(), isImmUs4(), llvm::TargetLoweringBase::AddrMode::Scale, and llvm::Type::VoidTyID.
bool XCoreTargetLowering::isZExtFree | ( | SDValue | Val, |
EVT | VT2 | ||
) | const [override, virtual] |
Return true if zero-extending the specific node Val to type VT2 is free (either because it's implicitly zero-extended such as ARM ldrb / ldrh or because it's folded such as X86 zero-extending loads).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 187 of file XCoreISelLowering.cpp.
References llvm::SDValue::getOpcode(), llvm::EVT::getSimpleVT(), llvm::SDValue::getValueType(), llvm::MVT::i8, llvm::EVT::isInteger(), llvm::EVT::isSimple(), llvm::ISD::LOAD, and llvm::MVT::SimpleTy.
SDValue XCoreTargetLowering::LowerOperation | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const [override, virtual] |
LowerOperation - Provide custom lowering hooks for some operations.
Reimplemented from llvm::TargetLowering.
Definition at line 206 of file XCoreISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ADJUST_TRAMPOLINE, llvm::ISD::ATOMIC_FENCE, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::ISD::BlockAddress, llvm::ISD::BR_JT, llvm::ISD::ConstantPool, llvm::ISD::EH_RETURN, llvm::ISD::FRAME_TO_ARGS_OFFSET, llvm::ISD::FRAMEADDR, llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INTRINSIC_WO_CHAIN, llvm_unreachable, llvm::ISD::LOAD, llvm::ISD::RETURNADDR, llvm::ISD::SMUL_LOHI, llvm::ISD::STORE, llvm::ISD::SUB, llvm::ISD::UMUL_LOHI, llvm::ISD::VAARG, and llvm::ISD::VASTART.
void XCoreTargetLowering::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 239 of file XCoreISelLowering.cpp.
References llvm::ISD::ADD, llvm::SDNode::getOpcode(), llvm_unreachable, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::ISD::SUB.