LLVM API Documentation
#include <SparcISelLowering.h>
Definition at line 42 of file SparcISelLowering.h.
| SparcTargetLowering::SparcTargetLowering | ( | TargetMachine & | TM | ) |
Definition at line 552 of file SparcISelLowering.cpp.
References llvm::TargetLowering::addRegisterClass(), llvm::ISD::BIT_CONVERT, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::ISD::BRIND, llvm::ISD::BSWAP, llvm::TargetLowering::computeRegisterProperties(), llvm::ISD::ConstantPool, llvm::ISD::CTLZ, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::TargetLowering::Custom, llvm::ISD::DBG_LABEL, llvm::ISD::DBG_STOPPOINT, llvm::ISD::DEBUG_LOC, llvm::ISD::DECLARE, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::EH_LABEL, llvm::TargetLowering::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FPOW, llvm::ISD::FREM, llvm::ISD::FSIN, llvm::TargetMachine::getSubtarget(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i8, llvm::TargetLowering::Legal, llvm::ISD::MEMBARRIER, llvm::MVT::Other, llvm::TargetLowering::Promote, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIVREM, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::TargetLowering::setLoadExtAction(), llvm::TargetLowering::setOperationAction(), llvm::TargetLowering::setStackPointerRegisterToSaveRestore(), llvm::TargetLowering::setTruncStoreAction(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SINT_TO_FP, llvm::ISD::SMUL_LOHI, llvm::ISD::SRA_PARTS, llvm::ISD::SREM, llvm::ISD::SRL_PARTS, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::ISD::UDIVREM, llvm::ISD::UINT_TO_FP, llvm::ISD::UMUL_LOHI, llvm::ISD::UREM, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, and llvm::ISD::VASTART.
| SDValue SparcTargetLowering::LowerOperation | ( | SDValue | Op, | |
| SelectionDAG & | DAG | |||
| ) | [virtual] |
LowerOperation - This callback is invoked for operations that are unsupported by the target, which are registered to use 'custom' lowering, and whose defined values are all legal. If the target has no operations that require custom lowering, it need not implement this. The default implementation of this aborts.
Reimplemented from llvm::TargetLowering.
Definition at line 908 of file SparcISelLowering.cpp.
References llvm::ISD::BR_CC, llvm::ISD::ConstantPool, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::FP_TO_SINT, llvm::ISD::FRAMEADDR, llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm_unreachable, LowerBR_CC(), LowerCONSTANTPOOL(), LowerDYNAMIC_STACKALLOC(), LowerFP_TO_SINT(), LowerGLOBALADDRESS(), LowerSELECT_CC(), LowerSINT_TO_FP(), LowerVAARG(), LowerVASTART(), llvm::ISD::RETURNADDR, llvm::ISD::SELECT_CC, llvm::ISD::SINT_TO_FP, llvm::ISD::VAARG, and llvm::ISD::VASTART.
| int llvm::SparcTargetLowering::getVarArgsFrameOffset | ( | ) | const [inline] |
| void SparcTargetLowering::computeMaskedBitsForTargetNode | ( | const SDValue | Op, | |
| const APInt & | Mask, | |||
| APInt & | KnownZero, | |||
| APInt & | KnownOne, | |||
| const SelectionDAG & | DAG, | |||
| unsigned | Depth = 0 | |||
| ) | const [virtual] |
computeMaskedBitsForTargetNode - Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets.
isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to be zero. Op is expected to be a target specific node. Used by DAG combiner.
Reimplemented from llvm::TargetLowering.
Definition at line 695 of file SparcISelLowering.cpp.
References llvm::SelectionDAG::ComputeMaskedBits(), llvm::APInt::getBitWidth(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SPISD::SELECT_FCC, and llvm::SPISD::SELECT_ICC.
| MachineBasicBlock * SparcTargetLowering::EmitInstrWithCustomInserter | ( | MachineInstr * | MI, | |
| MachineBasicBlock * | MBB | |||
| ) | const [virtual] |
Reimplemented from llvm::TargetLowering.
Definition at line 929 of file SparcISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineFunction::DeleteMachineInstr(), F, llvm::TargetInstrInfo::get(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::TargetMachine::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetLowering::getTargetMachine(), llvm::MachineFunction::insert(), llvm_unreachable, PHI, TII, and llvm::MachineBasicBlock::transferSuccessors().
| const char * SparcTargetLowering::getTargetNodeName | ( | unsigned | Opcode | ) | const [virtual] |
getTargetNodeName() - This method returns the name of a target specific DAG node.
Reimplemented from llvm::TargetLowering.
Definition at line 674 of file SparcISelLowering.cpp.
References llvm::SPISD::BRFCC, llvm::SPISD::BRICC, llvm::SPISD::CALL, llvm::SPISD::CMPFCC, llvm::SPISD::CMPICC, llvm::SPISD::FTOI, llvm::SPISD::Hi, llvm::SPISD::ITOF, llvm::SPISD::Lo, llvm::SPISD::RET_FLAG, llvm::SPISD::SELECT_FCC, and llvm::SPISD::SELECT_ICC.
| SparcTargetLowering::ConstraintType SparcTargetLowering::getConstraintType | ( | const std::string & | Constraint | ) | const [virtual] |
getConstraintType - Given a constraint letter, return the type of constraint it is for this target.
Reimplemented from llvm::TargetLowering.
Definition at line 1006 of file SparcISelLowering.cpp.
References llvm::TargetLowering::C_RegisterClass, and llvm::TargetLowering::getConstraintType().
| std::pair< unsigned, const TargetRegisterClass * > SparcTargetLowering::getRegForInlineAsmConstraint | ( | const std::string & | Constraint, | |
| EVT | VT | |||
| ) | const [virtual] |
getRegForInlineAsmConstraint - 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 1018 of file SparcISelLowering.cpp.
References llvm::TargetLowering::getRegForInlineAsmConstraint().
| std::vector< unsigned > SparcTargetLowering::getRegClassForInlineAsmConstraint | ( | const std::string & | Constraint, | |
| EVT | VT | |||
| ) | const [virtual] |
getRegClassForInlineAsmConstraint - Given a constraint letter (e.g. "r"), return a list of registers that can be used to satisfy the constraint. This should only be used for C_RegisterClass constraints.
Reimplemented from llvm::TargetLowering.
Definition at line 1031 of file SparcISelLowering.cpp.
| bool SparcTargetLowering::isOffsetFoldingLegal | ( | const GlobalAddressSDNode * | GA | ) | const [virtual] |
isOffsetFoldingLegal - Return true if folding a constant offset with the given GlobalAddress is legal. It is frequently not legal in PIC relocation models.
Reimplemented from llvm::TargetLowering.
Definition at line 1051 of file SparcISelLowering.cpp.
getFunctionAlignment - Return the Log2 alignment of this function.
Implements llvm::TargetLowering.
Definition at line 1057 of file SparcISelLowering.cpp.
| SDValue SparcTargetLowering::LowerFormalArguments | ( | SDValue | Chain, | |
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| const SmallVectorImpl< ISD::InputArg > & | Ins, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG, | |||
| SmallVectorImpl< SDValue > & | InVals | |||
| ) | [virtual] |
LowerFormalArguments - V8 uses a very simple ABI, where all values are passed in either one or two GPRs, including FP values. TODO: we should pass FP values in FP registers for fastcc functions.
Reimplemented from llvm::TargetLowering.
Definition at line 83 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::MachineRegisterInfo::addLiveIn(), Arg, llvm::ISD::AssertSext, llvm::ISD::BIT_CONVERT, llvm::ISD::BUILD_PAIR, llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MVT::f32, llvm::MVT::f64, FrameIdx, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getExtLoad(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::MachineFunction::getRegInfo(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::SelectionDAG::getStore(), llvm::TargetLowering::getTargetMachine(), llvm::SelectionDAG::getUNDEF(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm_unreachable, llvm::Load, MF, Offset, llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), RegInfo, llvm::ISD::SEXTLOAD, llvm::MVT::SimpleTy, llvm::SmallVectorImpl< T >::size(), llvm::ISD::TokenFactor, and llvm::ISD::TRUNCATE.
| SDValue SparcTargetLowering::LowerCall | ( | SDValue | Chain, | |
| SDValue | Callee, | |||
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| bool | isTailCall, | |||
| const SmallVectorImpl< ISD::OutputArg > & | Outs, | |||
| const SmallVectorImpl< ISD::InputArg > & | Ins, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG, | |||
| SmallVectorImpl< SDValue > & | InVals | |||
| ) | [virtual] |
LowerCall - This hook must be implemented to lower calls into the the specified DAG. The outgoing arguments to the call are described by the Outs array, and the values to be returned by the call are described by the Ins array. The implementation should fill in the InVals array with legal-type return values from the call, and return the resulting token chain value.
The isTailCall flag here is normative. If it is true, the implementation must emit a tail call. The IsEligibleForTailCallOptimization hook should be used to catch cases that cannot be handled.
Reimplemented from llvm::TargetLowering.
Definition at line 248 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::CCValAssign::AExt, llvm::ISD::ANY_EXTEND, Arg, llvm::ISD::BIT_CONVERT, llvm::SPISD::CALL, llvm::SelectionDAG::CreateStackTemporary(), E, llvm::SmallVectorImpl< T >::empty(), llvm::ISD::EXTRACT_ELEMENT, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::Flag, llvm::CCValAssign::Full, G, llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getRegister(), llvm::EVT::getSimpleVT(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SPISD::Hi, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm_unreachable, llvm::SPISD::Lo, llvm::MVT::Other, llvm::SmallVectorImpl< T >::push_back(), Reg, second, llvm::CCValAssign::SExt, llvm::ISD::SIGN_EXTEND, llvm::MVT::SimpleTy, llvm::SmallVectorImpl< T >::size(), StackPtr, llvm::SPII::Store, llvm::ISD::TokenFactor, Val, llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.
| SDValue SparcTargetLowering::LowerReturn | ( | SDValue | Chain, | |
| unsigned | CallConv, | |||
| bool | isVarArg, | |||
| const SmallVectorImpl< ISD::OutputArg > & | Outs, | |||
| DebugLoc | dl, | |||
| SelectionDAG & | DAG | |||
| ) | [virtual] |
LowerReturn - This hook must be implemented to lower outgoing return values, described by the Outs array, into the specified DAG. The implementation should return the resulting token chain value.
Reimplemented from llvm::TargetLowering.
Definition at line 37 of file SparcISelLowering.cpp.
References llvm::MachineRegisterInfo::addLiveOut(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyToReg(), llvm::CCValAssign::getLocReg(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::SDValue::getNode(), llvm::MachineFunction::getRegInfo(), llvm::SelectionDAG::getTarget(), llvm::SDValue::getValue(), llvm::CCValAssign::isRegLoc(), llvm::MachineRegisterInfo::liveout_empty(), llvm::MVT::Other, llvm::SPISD::RET_FLAG, and llvm::SmallVectorImpl< T >::size().