LLVM API Documentation
#include <MSP430ISelLowering.h>
Definition at line 69 of file MSP430ISelLowering.h.
MSP430TargetLowering::MSP430TargetLowering | ( | const TargetMachine & | TM | ) | [explicit] |
Definition at line 60 of file MSP430ISelLowering.cpp.
References llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::TargetLoweringBase::computeRegisterProperties(), 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::TargetLoweringBase::Expand, llvm::ISD::ExternalSymbol, llvm::ISD::EXTLOAD, llvm::ISD::GlobalAddress, HWMultIntr, HWMultMode, HWMultNoIntr, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i8, llvm::ISD::JumpTable, llvm::TargetLoweringBase::Legal, llvm::ISD::MUL, llvm::RTLIB::MUL_I16, llvm::RTLIB::MUL_I8, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::MVT::Other, llvm::ISD::POST_INC, 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::setIndexedLoadAction(), llvm::TargetLoweringBase::setIntDivIsCheap(), llvm::TargetLoweringBase::setLibcallName(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::TargetLoweringBase::setMinFunctionAlignment(), llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setPrefFunctionAlignment(), llvm::TargetLoweringBase::setStackPointerRegisterToSaveRestore(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SMUL_LOHI, llvm::ISD::SRA, llvm::ISD::SRA_PARTS, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SRL_PARTS, llvm::ISD::UDIV, llvm::ISD::UDIVREM, llvm::ISD::UMUL_LOHI, llvm::ISD::UREM, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::ISD::VASTART, llvm::TargetLoweringBase::ZeroOrOneBooleanContent, and llvm::ISD::ZEXTLOAD.
MachineBasicBlock * MSP430TargetLowering::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 1305 of file MSP430ISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), EmitShiftInstr(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), F(), llvm::MCInstrInfo::get(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetLoweringBase::getTargetMachine(), I, llvm::MachineFunction::insert(), llvm::TargetOpcode::PHI, llvm::MachineBasicBlock::splice(), TII, and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
MachineBasicBlock * MSP430TargetLowering::EmitShiftInstr | ( | MachineInstr * | MI, |
MachineBasicBlock * | BB | ||
) | const |
Definition at line 1197 of file MSP430ISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), MSP430CC::COND_E, MSP430CC::COND_NE, llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), 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::MachineFunction::getRegInfo(), llvm::TargetMachine::getSubtargetImpl(), llvm::TargetLoweringBase::getTargetMachine(), I, llvm::MachineFunction::insert(), llvm_unreachable, llvm::TargetOpcode::PHI, llvm::MachineBasicBlock::splice(), TII, and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
Referenced by EmitInstrWithCustomInserter().
TargetLowering::ConstraintType MSP430TargetLowering::getConstraintType | ( | const std::string & | Constraint | ) | const [override, virtual] |
getConstraintType - Given a constraint letter, return the type of constraint it is for this target.
Reimplemented from llvm::TargetLowering.
Definition at line 213 of file MSP430ISelLowering.cpp.
References llvm::TargetLowering::C_RegisterClass.
std::pair< unsigned, const TargetRegisterClass * > MSP430TargetLowering::getRegForInlineAsmConstraint | ( | const std::string & | Constraint, |
MVT | VT | ||
) | const [override, virtual] |
Given a physical register constraint (e.g. {edx}), return the register number and the register class for the register.
Given a register class constraint, like 'r', if this corresponds directly to an LLVM register class, return a register of 0 and the register class pointer.
This should only be used for C_Register constraints. On error, this returns a register number of 0 and a null register class pointer..
Reimplemented from llvm::TargetLowering.
Definition at line 227 of file MSP430ISelLowering.cpp.
References llvm::MVT::i8.
SDValue MSP430TargetLowering::getReturnAddressFrameIndex | ( | SelectionDAG & | DAG | ) | const |
Definition at line 1025 of file MSP430ISelLowering.cpp.
References llvm::MachineFrameInfo::CreateFixedObject(), llvm::TargetLoweringBase::getDataLayout(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::DataLayout::getPointerSize(), llvm::TargetLoweringBase::getPointerTy(), llvm::MSP430MachineFunctionInfo::getRAIndex(), and llvm::MSP430MachineFunctionInfo::setRAIndex().
Referenced by LowerRETURNADDR().
MVT llvm::MSP430TargetLowering::getScalarShiftAmountTy | ( | EVT | LHSTy | ) | const [inline, override, virtual] |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 73 of file MSP430ISelLowering.h.
References llvm::MVT::i8.
const char * MSP430TargetLowering::getTargetNodeName | ( | unsigned | Opcode | ) | const [override, virtual] |
getTargetNodeName - This method returns the name of a target specific DAG node.
Reimplemented from llvm::TargetLowering.
Definition at line 1145 of file MSP430ISelLowering.cpp.
References llvm::MSP430ISD::BR_CC, llvm::MSP430ISD::CALL, llvm::MSP430ISD::CMP, llvm::MSP430ISD::RET_FLAG, llvm::MSP430ISD::RETI_FLAG, llvm::MSP430ISD::RLA, llvm::MSP430ISD::RRA, llvm::MSP430ISD::RRC, llvm::MSP430ISD::SELECT_CC, llvm::MSP430ISD::SHL, llvm::MSP430ISD::SRA, and llvm::MSP430ISD::Wrapper.
bool MSP430TargetLowering::isTruncateFree | ( | Type * | Ty1, |
Type * | Ty2 | ||
) | const [override, virtual] |
isTruncateFree - Return true if it's free to truncate a value of type Ty1 to type Ty2. e.g. On msp430 it's free to truncate a i16 value in register R15W to i8 by referencing its sub-register R15B.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1163 of file MSP430ISelLowering.cpp.
References llvm::Type::getPrimitiveSizeInBits(), and llvm::Type::isIntegerTy().
bool MSP430TargetLowering::isTruncateFree | ( | EVT | VT1, |
EVT | VT2 | ||
) | const [override, virtual] |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1171 of file MSP430ISelLowering.cpp.
References llvm::EVT::getSizeInBits(), and llvm::EVT::isInteger().
bool MSP430TargetLowering::isZExtFree | ( | Type * | Ty1, |
Type * | Ty2 | ||
) | const [override, virtual] |
isZExtFree - Return true if any actual instruction that defines a value of type Ty1 implicit zero-extends the value to Ty2 in the result register. This does not necessarily include registers defined in unknown ways, such as incoming arguments, or copies from unknown virtual registers. Also, if isTruncateFree(Ty2, Ty1) is true, this does not necessarily apply to truncate instructions. e.g. on msp430, all instructions that define 8-bit values implicit zero-extend the result out to 16 bits.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1178 of file MSP430ISelLowering.cpp.
References llvm::Type::isIntegerTy().
Referenced by isZExtFree().
bool MSP430TargetLowering::isZExtFree | ( | EVT | VT1, |
EVT | VT2 | ||
) | const [override, virtual] |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1183 of file MSP430ISelLowering.cpp.
References llvm::MVT::i16, and llvm::MVT::i8.
bool MSP430TargetLowering::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 1188 of file MSP430ISelLowering.cpp.
References llvm::SDValue::getValueType(), and isZExtFree().
SDValue MSP430TargetLowering::LowerBlockAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 802 of file MSP430ISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetBlockAddress(), and llvm::MSP430ISD::Wrapper.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerBR_CC | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 894 of file MSP430ISelLowering.cpp.
References llvm::MSP430ISD::BR_CC, EmitCMP(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), and llvm::SDValue::getValueType().
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerExternalSymbol | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 793 of file MSP430ISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetExternalSymbol(), and llvm::MSP430ISD::Wrapper.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerFRAMEADDR | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1068 of file MSP430ISelLowering.cpp.
References llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), and llvm::MachineFrameInfo::setFrameAddressIsTaken().
Referenced by LowerOperation(), and LowerRETURNADDR().
SDValue MSP430TargetLowering::LowerGlobalAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 781 of file MSP430ISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::getOffset(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetGlobalAddress(), and llvm::MSP430ISD::Wrapper.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerJumpTable | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1101 of file MSP430ISelLowering.cpp.
References llvm::JumpTableSDNode::getIndex(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetJumpTable(), and llvm::MSP430ISD::Wrapper.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerOperation | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const [override, virtual] |
LowerOperation - Provide custom lowering hooks for some operations.
Reimplemented from llvm::TargetLowering.
Definition at line 184 of file MSP430ISelLowering.cpp.
References llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::ExternalSymbol, llvm::ISD::FRAMEADDR, llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::JumpTable, llvm_unreachable, LowerBlockAddress(), LowerBR_CC(), LowerExternalSymbol(), LowerFRAMEADDR(), LowerGlobalAddress(), LowerJumpTable(), LowerRETURNADDR(), LowerSELECT_CC(), LowerSETCC(), LowerShifts(), LowerSIGN_EXTEND(), LowerVASTART(), llvm::ISD::RETURNADDR, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SRA, llvm::ISD::SRL, and llvm::ISD::VASTART.
SDValue MSP430TargetLowering::LowerRETURNADDR | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1041 of file MSP430ISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getConstant(), llvm::TargetLoweringBase::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), getPointerSize(), llvm::TargetLoweringBase::getPointerTy(), getReturnAddressFrameIndex(), llvm::MVT::i16, LowerFRAMEADDR(), llvm::MachineFrameInfo::setReturnAddressIsTaken(), and llvm::TargetLowering::verifyReturnAddressArgumentIsConstant().
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerSELECT_CC | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 989 of file MSP430ISelLowering.cpp.
References EmitCMP(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::MSP430ISD::SELECT_CC.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerSETCC | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 909 of file MSP430ISelLowering.cpp.
References llvm::ISD::AND, AND, MSP430CC::COND_E, MSP430CC::COND_HS, MSP430CC::COND_LO, MSP430CC::COND_NE, EmitCMP(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::SDValue::hasOneUse(), llvm::MVT::i16, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MSP430ISD::SELECT_CC, llvm::ISD::SRA, llvm::ISD::TRUNCATE, and llvm::ISD::XOR.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerShifts | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 738 of file MSP430ISelLowering.cpp.
References llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), llvm_unreachable, N, llvm::MSP430ISD::RLA, llvm::MSP430ISD::RRA, llvm::MSP430ISD::RRC, llvm::MSP430ISD::SHL, llvm::ISD::SHL, llvm::MSP430ISD::SRA, llvm::ISD::SRA, llvm::MSP430ISD::SRL, and llvm::ISD::SRL.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerSIGN_EXTEND | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1011 of file MSP430ISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::MVT::i16, and llvm::ISD::SIGN_EXTEND_INREG.
Referenced by LowerOperation().
SDValue MSP430TargetLowering::LowerVASTART | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1085 of file MSP430ISelLowering.cpp.
References llvm::ISD::FrameIndex, llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getStore(), and llvm::MSP430MachineFunctionInfo::getVarArgsFrameIndex().
Referenced by LowerOperation().