LLVM API Documentation
#include <SparcISelLowering.h>
Public Member Functions | |
SparcTargetLowering (TargetMachine &TM) | |
virtual SDValue | LowerOperation (SDValue Op, SelectionDAG &DAG) const |
virtual void | computeMaskedBitsForTargetNode (const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth=0) const |
virtual MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const |
virtual const char * | getTargetNodeName (unsigned Opcode) const |
This method returns the name of a target specific DAG node. More... | |
ConstraintType | getConstraintType (const std::string &Constraint) const |
std::pair< unsigned, const TargetRegisterClass * > | getRegForInlineAsmConstraint (const std::string &Constraint, MVT VT) const |
virtual bool | isOffsetFoldingLegal (const GlobalAddressSDNode *GA) const |
virtual MVT | getScalarShiftAmountTy (EVT LHSTy) const |
virtual SDValue | LowerFormalArguments (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const |
SDValue | LowerFormalArguments_32 (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const |
SDValue | LowerFormalArguments_64 (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const |
virtual SDValue | LowerCall (TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const |
SDValue | LowerCall_32 (TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const |
SDValue | LowerCall_64 (TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const |
virtual SDValue | LowerReturn (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc dl, SelectionDAG &DAG) const |
SDValue | LowerReturn_32 (SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc DL, SelectionDAG &DAG) const |
SDValue | LowerReturn_64 (SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc DL, SelectionDAG &DAG) const |
SDValue | LowerGlobalAddress (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerGlobalTLSAddress (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerConstantPool (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerBlockAddress (SDValue Op, SelectionDAG &DAG) const |
unsigned | getSRetArgSize (SelectionDAG &DAG, SDValue Callee) const |
SDValue | withTargetFlags (SDValue Op, unsigned TF, SelectionDAG &DAG) const |
SDValue | makeHiLoPair (SDValue Op, unsigned HiTF, unsigned LoTF, SelectionDAG &DAG) const |
SDValue | makeAddress (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerF128_LibCallArg (SDValue Chain, ArgListTy &Args, SDValue Arg, SDLoc DL, SelectionDAG &DAG) const |
SDValue | LowerF128Op (SDValue Op, SelectionDAG &DAG, const char *LibFuncName, unsigned numArgs) const |
SDValue | LowerF128Compare (SDValue LHS, SDValue RHS, unsigned &SPCC, SDLoc DL, SelectionDAG &DAG) const |
bool | ShouldShrinkFPConstant (EVT VT) const |
virtual void | ReplaceNodeResults (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const |
![]() | |
TargetLowering (const TargetMachine &TM, const TargetLoweringObjectFile *TLOF) | |
NOTE: The constructor takes ownership of TLOF. More... | |
virtual bool | getPreIndexedAddressParts (SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const |
virtual bool | getPostIndexedAddressParts (SDNode *, SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const |
virtual unsigned | getJumpTableEncoding () const |
virtual const MCExpr * | LowerCustomJumpTableEntry (const MachineJumpTableInfo *, const MachineBasicBlock *, unsigned, MCContext &) const |
virtual SDValue | getPICJumpTableRelocBase (SDValue Table, SelectionDAG &DAG) const |
Returns relocation base for the given PIC jumptable. More... | |
virtual const MCExpr * | getPICJumpTableRelocBaseExpr (const MachineFunction *MF, unsigned JTI, MCContext &Ctx) const |
bool | isInTailCallPosition (SelectionDAG &DAG, SDNode *Node, SDValue &Chain) const |
void | softenSetCCOperands (SelectionDAG &DAG, EVT VT, SDValue &NewLHS, SDValue &NewRHS, ISD::CondCode &CCCode, SDLoc DL) const |
std::pair< SDValue, SDValue > | makeLibCall (SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT, const SDValue *Ops, unsigned NumOps, bool isSigned, SDLoc dl, bool doesNotReturn=false, bool isReturnValueUsed=true) const |
Returns a pair of (return value, chain). More... | |
bool | SimplifyDemandedBits (SDValue Op, const APInt &DemandedMask, APInt &KnownZero, APInt &KnownOne, TargetLoweringOpt &TLO, unsigned Depth=0) const |
virtual unsigned | ComputeNumSignBitsForTargetNode (SDValue Op, unsigned Depth=0) const |
SDValue | SimplifySetCC (EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond, bool foldBooleans, DAGCombinerInfo &DCI, SDLoc dl) const |
virtual bool | isGAPlusOffset (SDNode *N, const GlobalValue *&GA, int64_t &Offset) const |
virtual SDValue | PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const |
virtual bool | isTypeDesirableForOp (unsigned, EVT VT) const |
virtual bool | isDesirableToTransformToIntegerOp (unsigned, EVT) const |
virtual bool | IsDesirableToPromoteOp (SDValue, EVT &) const |
std::pair< SDValue, SDValue > | LowerCallTo (CallLoweringInfo &CLI) const |
virtual void | HandleByVal (CCState *, unsigned &, unsigned) const |
Target-specific cleanup for formal ByVal parameters. More... | |
virtual bool | CanLowerReturn (CallingConv::ID, MachineFunction &, bool, const SmallVectorImpl< ISD::OutputArg > &, LLVMContext &) const |
virtual bool | isUsedByReturnOnly (SDNode *, SDValue &) const |
virtual bool | mayBeEmittedAsTailCall (CallInst *) const |
virtual MVT | getTypeForExtArgOrReturn (MVT VT, ISD::NodeType) const |
virtual const uint16_t * | getScratchRegisters (CallingConv::ID CC) const |
virtual void | LowerOperationWrapper (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const |
virtual FastISel * | createFastISel (FunctionLoweringInfo &, const TargetLibraryInfo *) const |
virtual bool | ExpandInlineAsm (CallInst *) const |
virtual AsmOperandInfoVector | ParseConstraints (ImmutableCallSite CS) const |
virtual ConstraintWeight | getMultipleConstraintMatchWeight (AsmOperandInfo &info, int maIndex) const |
virtual ConstraintWeight | getSingleConstraintMatchWeight (AsmOperandInfo &info, const char *constraint) const |
virtual void | ComputeConstraintToUse (AsmOperandInfo &OpInfo, SDValue Op, SelectionDAG *DAG=0) const |
virtual const char * | LowerXConstraint (EVT ConstraintVT) const |
virtual void | LowerAsmOperandForConstraint (SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const |
SDValue | BuildExactSDIV (SDValue Op1, SDValue Op2, SDLoc dl, SelectionDAG &DAG) const |
Given an exact SDIV by a constant, create a multiplication with the multiplicative inverse of the constant. More... | |
SDValue | BuildSDIV (SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, std::vector< SDNode * > *Created) const |
Given an ISD::SDIV node expressing a divide by constant, return a DAG expression to select that will generate the same value by multiplying by a magic number. See: http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html More... | |
SDValue | BuildUDIV (SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, std::vector< SDNode * > *Created) const |
Given an ISD::UDIV node expressing a divide by constant, return a DAG expression to select that will generate the same value by multiplying by a magic number. See: http://the.wall.riscom.net/books/proc/ppc/cwg/code2.html More... | |
virtual void | AdjustInstrPostInstrSelection (MachineInstr *MI, SDNode *Node) const |
![]() | |
TargetLoweringBase (const TargetMachine &TM, const TargetLoweringObjectFile *TLOF) | |
NOTE: The constructor takes ownership of TLOF. More... | |
virtual | ~TargetLoweringBase () |
const TargetMachine & | getTargetMachine () const |
const DataLayout * | getDataLayout () const |
const TargetLoweringObjectFile & | getObjFileLowering () const |
bool | isBigEndian () const |
bool | isLittleEndian () const |
virtual MVT | getPointerTy (uint32_t=0) const |
unsigned | getPointerSizeInBits (uint32_t AS=0) const |
unsigned | getPointerTypeSizeInBits (Type *Ty) const |
EVT | getShiftAmountTy (EVT LHSTy) const |
virtual MVT | getVectorIdxTy () const |
bool | isSelectExpensive () const |
Return true if the select operation is expensive for this target. More... | |
virtual bool | isSelectSupported (SelectSupportKind) const |
virtual bool | shouldSplitVectorElementType (EVT) const |
bool | isIntDivCheap () const |
bool | isSlowDivBypassed () const |
Returns true if target has indicated at least one type should be bypassed. More... | |
const DenseMap< unsigned int, unsigned int > & | getBypassSlowDivWidths () const |
bool | isPow2DivCheap () const |
Return true if pow2 div is cheaper than a chain of srl/add/sra. More... | |
bool | isJumpExpensive () const |
bool | isPredictableSelectExpensive () const |
virtual bool | isLoadBitCastBeneficial (EVT, EVT) const |
virtual EVT | getSetCCResultType (LLVMContext &Context, EVT VT) const |
virtual MVT::SimpleValueType | getCmpLibcallReturnType () const |
BooleanContent | getBooleanContents (bool isVec) const |
Sched::Preference | getSchedulingPreference () const |
Return target scheduling preference. More... | |
virtual Sched::Preference | getSchedulingPreference (SDNode *) const |
virtual const TargetRegisterClass * | getRegClassFor (MVT VT) const |
virtual const TargetRegisterClass * | getRepRegClassFor (MVT VT) const |
virtual uint8_t | getRepRegClassCostFor (MVT VT) const |
bool | isTypeLegal (EVT VT) const |
const ValueTypeActionImpl & | getValueTypeActions () const |
LegalizeTypeAction | getTypeAction (LLVMContext &Context, EVT VT) const |
LegalizeTypeAction | getTypeAction (MVT VT) const |
EVT | getTypeToTransformTo (LLVMContext &Context, EVT VT) const |
EVT | getTypeToExpandTo (LLVMContext &Context, EVT VT) const |
unsigned | getVectorTypeBreakdown (LLVMContext &Context, EVT VT, EVT &IntermediateVT, unsigned &NumIntermediates, MVT &RegisterVT) const |
virtual bool | getTgtMemIntrinsic (IntrinsicInfo &, const CallInst &, unsigned) const |
virtual bool | isFPImmLegal (const APFloat &, EVT) const |
virtual bool | isShuffleMaskLegal (const SmallVectorImpl< int > &, EVT) const |
virtual bool | canOpTrap (unsigned Op, EVT VT) const |
virtual bool | isVectorClearMaskLegal (const SmallVectorImpl< int > &, EVT) const |
LegalizeAction | getOperationAction (unsigned Op, EVT VT) const |
bool | isOperationLegalOrCustom (unsigned Op, EVT VT) const |
bool | isOperationLegalOrPromote (unsigned Op, EVT VT) const |
bool | isOperationExpand (unsigned Op, EVT VT) const |
bool | isOperationLegal (unsigned Op, EVT VT) const |
Return true if the specified operation is legal on this target. More... | |
LegalizeAction | getLoadExtAction (unsigned ExtType, MVT VT) const |
bool | isLoadExtLegal (unsigned ExtType, EVT VT) const |
Return true if the specified load with extension is legal on this target. More... | |
LegalizeAction | getTruncStoreAction (MVT ValVT, MVT MemVT) const |
bool | isTruncStoreLegal (EVT ValVT, EVT MemVT) const |
LegalizeAction | getIndexedLoadAction (unsigned IdxMode, MVT VT) const |
bool | isIndexedLoadLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. More... | |
LegalizeAction | getIndexedStoreAction (unsigned IdxMode, MVT VT) const |
bool | isIndexedStoreLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. More... | |
LegalizeAction | getCondCodeAction (ISD::CondCode CC, MVT VT) const |
bool | isCondCodeLegal (ISD::CondCode CC, MVT VT) const |
Return true if the specified condition code is legal on this target. More... | |
MVT | getTypeToPromoteTo (unsigned Op, MVT VT) const |
EVT | getValueType (Type *Ty, bool AllowUnknown=false) const |
MVT | getSimpleValueType (Type *Ty, bool AllowUnknown=false) const |
Return the MVT corresponding to this LLVM type. See getValueType. More... | |
virtual unsigned | getByValTypeAlignment (Type *Ty) const |
MVT | getRegisterType (MVT VT) const |
Return the type of registers that this ValueType will eventually require. More... | |
MVT | getRegisterType (LLVMContext &Context, EVT VT) const |
Return the type of registers that this ValueType will eventually require. More... | |
unsigned | getNumRegisters (LLVMContext &Context, EVT VT) const |
bool | hasTargetDAGCombine (ISD::NodeType NT) const |
unsigned | getMaxStoresPerMemset (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memset. More... | |
unsigned | getMaxStoresPerMemcpy (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memcpy. More... | |
unsigned | getMaxStoresPerMemmove (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memmove. More... | |
virtual bool | allowsUnalignedMemoryAccesses (EVT, bool *=0) const |
Determine if the target supports unaligned memory accesses. More... | |
virtual EVT | getOptimalMemOpType (uint64_t, unsigned, unsigned, bool, bool, bool, MachineFunction &) const |
virtual bool | isSafeMemOpType (MVT) const |
bool | usesUnderscoreSetJmp () const |
Determine if we should use _setjmp or setjmp to implement llvm.setjmp. More... | |
bool | usesUnderscoreLongJmp () const |
Determine if we should use _longjmp or longjmp to implement llvm.longjmp. More... | |
bool | supportJumpTables () const |
Return whether the target can generate code for jump tables. More... | |
int | getMinimumJumpTableEntries () const |
unsigned | getStackPointerRegisterToSaveRestore () const |
unsigned | getExceptionPointerRegister () const |
unsigned | getExceptionSelectorRegister () const |
unsigned | getJumpBufSize () const |
unsigned | getJumpBufAlignment () const |
unsigned | getMinStackArgumentAlignment () const |
Return the minimum stack alignment of an argument. More... | |
unsigned | getMinFunctionAlignment () const |
Return the minimum function alignment. More... | |
unsigned | getPrefFunctionAlignment () const |
Return the preferred function alignment. More... | |
unsigned | getPrefLoopAlignment () const |
Return the preferred loop alignment. More... | |
bool | getInsertFencesForAtomic () const |
virtual bool | getStackCookieLocation (unsigned &, unsigned &) const |
virtual unsigned | getMaximalGlobalOffset () const |
virtual bool | isNoopAddrSpaceCast (unsigned SrcAS, unsigned DestAS) const |
Returns true if a cast between SrcAS and DestAS is a noop. More... | |
virtual void | resetOperationActions () |
Reset the operation actions based on target options. More... | |
virtual bool | GetAddrModeArguments (IntrinsicInst *, SmallVectorImpl< Value * > &, Type *&) const |
virtual bool | isLegalAddressingMode (const AddrMode &AM, Type *Ty) const |
virtual int | getScalingFactorCost (const AddrMode &AM, Type *Ty) const |
Return the cost of the scaling factor used in the addressing mode represented by AM for this target, for a load/store of the specified type. More... | |
virtual bool | isLegalICmpImmediate (int64_t) const |
virtual bool | isLegalAddImmediate (int64_t) const |
virtual bool | isTruncateFree (Type *, Type *) const |
virtual bool | allowTruncateForTailCall (Type *, Type *) const |
virtual bool | isTruncateFree (EVT, EVT) const |
virtual bool | isZExtFree (Type *, Type *) const |
virtual bool | isZExtFree (EVT, EVT) const |
virtual bool | hasPairedLoad (Type *, unsigned &) const |
virtual bool | hasPairedLoad (EVT, unsigned &) const |
virtual bool | isZExtFree (SDValue Val, EVT VT2) const |
virtual bool | isFNegFree (EVT VT) const |
virtual bool | isFAbsFree (EVT VT) const |
virtual bool | isFMAFasterThanFMulAndFAdd (EVT) const |
virtual bool | isNarrowingProfitable (EVT, EVT) const |
void | setLibcallName (RTLIB::Libcall Call, const char *Name) |
Rename the default libcall routine name for the specified libcall. More... | |
const char * | getLibcallName (RTLIB::Libcall Call) const |
Get the libcall routine name for the specified libcall. More... | |
void | setCmpLibcallCC (RTLIB::Libcall Call, ISD::CondCode CC) |
ISD::CondCode | getCmpLibcallCC (RTLIB::Libcall Call) const |
void | setLibcallCallingConv (RTLIB::Libcall Call, CallingConv::ID CC) |
Set the CallingConv that should be used for the specified libcall. More... | |
CallingConv::ID | getLibcallCallingConv (RTLIB::Libcall Call) const |
Get the CallingConv that should be used for the specified libcall. More... | |
LegalizeKind | getTypeConversion (LLVMContext &Context, EVT VT) const |
int | InstructionOpcodeToISD (unsigned Opcode) const |
Get the ISD node that corresponds to the Instruction class opcode. More... | |
std::pair< unsigned, MVT > | getTypeLegalizationCost (Type *Ty) const |
Estimate the cost of type-legalization and the legalized type. More... | |
Definition at line 54 of file SparcISelLowering.h.
SparcTargetLowering::SparcTargetLowering | ( | TargetMachine & | TM | ) |
Definition at line 1305 of file SparcISelLowering.cpp.
References llvm::RTLIB::ADD_F128, llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::ATOMIC_FENCE, llvm::ISD::BITCAST, llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::ISD::BRIND, llvm::ISD::BSWAP, llvm::TargetLoweringBase::computeRegisterProperties(), 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::RTLIB::DIV_F128, llvm::ISD::DYNAMIC_STACKALLOC, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f128, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FABS, llvm::ISD::FADD, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FDIV, llvm::ISD::FMA, llvm::ISD::FMUL, llvm::ISD::FNEG, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::RTLIB::FPEXT_F32_F128, llvm::RTLIB::FPEXT_F64_F128, llvm::ISD::FPOW, llvm::RTLIB::FPROUND_F128_F32, llvm::RTLIB::FPROUND_F128_F64, llvm::RTLIB::FPTOSINT_F128_I32, llvm::RTLIB::FPTOSINT_F128_I64, llvm::RTLIB::FPTOUINT_F128_I32, llvm::RTLIB::FPTOUINT_F128_I64, llvm::ISD::FREM, llvm::ISD::FSIN, llvm::ISD::FSINCOS, llvm::ISD::FSQRT, llvm::ISD::FSUB, llvm::TargetLoweringBase::getPointerTy(), llvm::TargetMachine::getSubtarget(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::SparcSubtarget::hasHardQuad(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::SparcSubtarget::is64Bit(), llvm::SparcSubtarget::isV9(), llvm::TargetLoweringBase::Legal, llvm::ISD::LOAD, llvm::RTLIB::MUL_F128, llvm::MVT::Other, llvm::TargetLoweringBase::Promote, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SDIVREM, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::TargetLoweringBase::setExceptionPointerRegister(), llvm::TargetLoweringBase::setExceptionSelectorRegister(), llvm::TargetLoweringBase::setLibcallName(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::TargetLoweringBase::setMinFunctionAlignment(), llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setStackPointerRegisterToSaveRestore(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SEXTLOAD, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SINT_TO_FP, llvm::RTLIB::SINTTOFP_I32_F128, llvm::RTLIB::SINTTOFP_I64_F128, llvm::ISD::SMUL_LOHI, llvm::RTLIB::SQRT_F128, llvm::ISD::SRA_PARTS, llvm::ISD::SREM, llvm::ISD::SRL_PARTS, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::ISD::STORE, llvm::RTLIB::SUB_F128, llvm::ISD::SUBC, llvm::ISD::SUBE, llvm::ISD::UDIVREM, llvm::ISD::UINT_TO_FP, llvm::RTLIB::UINTTOFP_I32_F128, llvm::RTLIB::UINTTOFP_I64_F128, llvm::ISD::UMUL_LOHI, llvm::ISD::UREM, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, and llvm::ISD::VASTART.
|
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 1606 of file SparcISelLowering.cpp.
References llvm::SelectionDAG::ComputeMaskedBits(), llvm::APInt::getBitWidth(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SPISD::SELECT_FCC, llvm::SPISD::SELECT_ICC, and llvm::SPISD::SELECT_XCC.
|
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 2655 of file SparcISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), 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::MachineOperand::getImm(), llvm::TargetMachine::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetLoweringBase::getTargetMachine(), llvm::MachineFunction::insert(), llvm_unreachable, llvm::next(), llvm::TargetOpcode::PHI, llvm::MachineBasicBlock::splice(), TII, and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
|
virtual |
getConstraintType - Given a constraint letter, return the type of constraint it is for this target.
Reimplemented from llvm::TargetLowering.
Definition at line 2739 of file SparcISelLowering.cpp.
References llvm::TargetLowering::C_RegisterClass, and llvm::TargetLowering::getConstraintType().
|
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 2751 of file SparcISelLowering.cpp.
References llvm::TargetLowering::getRegForInlineAsmConstraint().
Reimplemented from llvm::TargetLoweringBase.
Definition at line 80 of file SparcISelLowering.h.
References llvm::MVT::i32.
unsigned SparcTargetLowering::getSRetArgSize | ( | SelectionDAG & | DAG, |
SDValue | Callee | ||
) | const |
Definition at line 962 of file SparcISelLowering.cpp.
References llvm::Function::arg_begin(), llvm::dyn_cast(), G, llvm::TargetLoweringBase::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::Module::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::GlobalValue::getParent(), llvm::DataLayout::getTypeAllocSize(), llvm::Function::hasStructRetAttr(), and isFP128ABICall().
Referenced by LowerCall_32().
|
virtual |
This method returns the name of a target specific DAG node.
Reimplemented from llvm::TargetLowering.
Definition at line 1575 of file SparcISelLowering.cpp.
References llvm::SPISD::BRFCC, llvm::SPISD::BRICC, llvm::SPISD::BRXCC, llvm::SPISD::CALL, llvm::SPISD::CMPFCC, llvm::SPISD::CMPICC, llvm::SPISD::FLUSHW, llvm::SPISD::FTOI, llvm::SPISD::FTOX, llvm::SPISD::GLOBAL_BASE_REG, llvm::SPISD::Hi, llvm::SPISD::ITOF, llvm::SPISD::Lo, llvm::SPISD::RET_FLAG, llvm::SPISD::SELECT_FCC, llvm::SPISD::SELECT_ICC, llvm::SPISD::SELECT_XCC, llvm::SPISD::TLS_ADD, llvm::SPISD::TLS_CALL, llvm::SPISD::TLS_LD, and llvm::SPISD::XTOF.
|
virtual |
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 2764 of file SparcISelLowering.cpp.
SDValue SparcTargetLowering::LowerBlockAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1750 of file SparcISelLowering.cpp.
References makeAddress().
Referenced by LowerOperation().
|
virtual |
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.
Reimplemented from llvm::TargetLowering.
Definition at line 645 of file SparcISelLowering.cpp.
References llvm::SparcSubtarget::is64Bit(), LowerCall_32(), and LowerCall_64().
SDValue SparcTargetLowering::LowerCall_32 | ( | TargetLowering::CallLoweringInfo & | CLI, |
SmallVectorImpl< SDValue > & | InVals | ||
) | const |
Definition at line 675 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::CCValAssign::AExt, Align(), llvm::CCState::AnalyzeCallOperands(), llvm::CCState::AnalyzeCallResult(), llvm::ISD::ANY_EXTEND, llvm::CCValAssign::BCvt, llvm::ISD::BITCAST, llvm::SPISD::CALL, llvm::TargetLowering::CallLoweringInfo::CallConv, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::TargetLowering::CallLoweringInfo::Chain, llvm::MachineFrameInfo::CreateStackObject(), llvm::SelectionDAG::CreateStackTemporary(), llvm::TargetLowering::CallLoweringInfo::CS, llvm::TargetLowering::CallLoweringInfo::DAG, llvm::TargetLowering::CallLoweringInfo::DL, llvm::SmallVectorBase::empty(), llvm::MVT::f32, llvm::MVT::f64, llvm::CCValAssign::Full, G, llvm::ISD::ArgFlagsTy::getByValAlign(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::SparcRegisterInfo::getCallPreservedMask(), 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::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemcpy(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getRegisterMask(), llvm::SparcRegisterInfo::getRTCallPreservedMask(), getSRetArgSize(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SDValue::getValue(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, hasReturnsTwiceAttr(), llvm::HexagonISD::Hi, llvm::MVT::i32, llvm::MipsISD::Ins, llvm::TargetLowering::CallLoweringInfo::Ins, llvm::ISD::ArgFlagsTy::isByVal(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::ISD::ArgFlagsTy::isSRet(), llvm::TargetLowering::CallLoweringInfo::IsTailCall, llvm::TargetLowering::CallLoweringInfo::IsVarArg, llvm_unreachable, llvm::HexagonISD::Lo, llvm::CCValAssign::needsCustom(), llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::Outs, llvm::TargetLowering::CallLoweringInfo::OutVals, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::CCValAssign::SExt, llvm::ISD::SIGN_EXTEND, llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::SPII::Store, toCallerWindow(), llvm::ISD::TokenFactor, llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.
Referenced by LowerCall().
SDValue SparcTargetLowering::LowerCall_64 | ( | TargetLowering::CallLoweringInfo & | CLI, |
SmallVectorImpl< SDValue > & | InVals | ||
) | const |
Definition at line 1033 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::CCValAssign::AExt, llvm::CCState::AnalyzeCallOperands(), llvm::CCState::AnalyzeCallResult(), llvm::ISD::ANY_EXTEND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::CCValAssign::BCvt, llvm::ISD::BITCAST, llvm::SPISD::CALL, llvm::TargetLowering::CallLoweringInfo::CallConv, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::TargetLowering::CallLoweringInfo::Chain, llvm::ISD::CopyFromReg, llvm::TargetLowering::CallLoweringInfo::CS, llvm::TargetLowering::CallLoweringInfo::DAG, llvm::TargetLowering::CallLoweringInfo::DL, llvm::SmallVectorBase::empty(), fixupVariableFloatArgs(), llvm::CCValAssign::Full, G, llvm::SparcRegisterInfo::getCallPreservedMask(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getIntPtrConstant(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getRegisterMask(), llvm::SparcRegisterInfo::getRTCallPreservedMask(), llvm::SparcSubtarget::getStackPointerBias(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTarget(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SDValue::getValue(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, hasReturnsTwiceAttr(), llvm::MVT::i32, llvm::MVT::i64, llvm::TargetLowering::CallLoweringInfo::Ins, llvm::CCValAssign::isExtInLoc(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::TargetLowering::CallLoweringInfo::IsTailCall, llvm::TargetLowering::CallLoweringInfo::IsVarArg, llvm_unreachable, llvm::CCValAssign::needsCustom(), llvm::A64CC::NV, llvm::ISD::OR, llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::Outs, llvm::TargetLowering::CallLoweringInfo::OutVals, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::RoundUpToAlignment(), llvm::CCValAssign::SExt, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::SmallVectorTemplateCommon< T >::size(), llvm::ISD::SRL, toCallerWindow(), llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.
Referenced by LowerCall().
SDValue SparcTargetLowering::LowerConstantPool | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1745 of file SparcISelLowering.cpp.
References makeAddress().
Referenced by LowerOperation().
SDValue SparcTargetLowering::LowerF128_LibCallArg | ( | SDValue | Chain, |
ArgListTy & | Args, | ||
SDValue | Arg, | ||
SDLoc | DL, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 1853 of file SparcISelLowering.cpp.
References llvm::MachineFrameInfo::CreateStackObject(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getStore(), llvm::EVT::getTypeForEVT(), llvm::PointerType::getUnqual(), llvm::SDValue::getValueType(), llvm::Type::isFP128Ty(), llvm::TargetLowering::ArgListEntry::Node, and llvm::TargetLowering::ArgListEntry::Ty.
Referenced by LowerF128Compare(), and LowerF128Op().
SDValue SparcTargetLowering::LowerF128Compare | ( | SDValue | LHS, |
SDValue | RHS, | ||
unsigned & | SPCC, | ||
SDLoc | DL, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 1944 of file SparcISelLowering.cpp.
References llvm::ISD::AND, llvm::CallingConv::C, llvm::SPISD::CMPICC, llvm::SPCC::FCC_E, llvm::SPCC::FCC_G, llvm::SPCC::FCC_GE, llvm::SPCC::FCC_L, llvm::SPCC::FCC_LE, llvm::SPCC::FCC_LG, llvm::SPCC::FCC_NE, llvm::SPCC::FCC_O, llvm::SPCC::FCC_U, llvm::SPCC::FCC_UE, llvm::SPCC::FCC_UG, llvm::SPCC::FCC_UGE, llvm::SPCC::FCC_UL, llvm::SPCC::FCC_ULE, llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExternalSymbol(), llvm::Type::getInt32Ty(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::MVT::Glue, llvm::SPCC::ICC_E, llvm::SPCC::ICC_G, llvm::SPCC::ICC_NE, llvm::SparcSubtarget::is64Bit(), llvm_unreachable, llvm::TargetLowering::LowerCallTo(), and LowerF128_LibCallArg().
Referenced by LowerBR_CC(), and LowerSELECT_CC().
SDValue SparcTargetLowering::LowerF128Op | ( | SDValue | Op, |
SelectionDAG & | DAG, | ||
const char * | LibFuncName, | ||
unsigned | numArgs | ||
) | const |
Definition at line 1885 of file SparcISelLowering.cpp.
References llvm::CallingConv::C, llvm::MachineFrameInfo::CreateStackObject(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExternalSymbol(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SDNode::getNumOperands(), llvm::SDValue::getOperand(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getTypeForEVT(), llvm::PointerType::getUnqual(), llvm::SDValue::getValueType(), llvm::Type::getVoidTy(), llvm::SparcSubtarget::is64Bit(), llvm::Type::isFP128Ty(), llvm::TargetLowering::ArgListEntry::isReturned, llvm::TargetLowering::ArgListEntry::isSRet, llvm::TargetLowering::LowerCallTo(), LowerF128_LibCallArg(), llvm::TargetLowering::ArgListEntry::Node, and llvm::TargetLowering::ArgListEntry::Ty.
Referenced by LowerF128_FPEXTEND(), LowerF128_FPROUND(), LowerFNEG(), LowerFP_TO_SINT(), LowerFP_TO_UINT(), LowerOperation(), LowerSINT_TO_FP(), LowerUINT_TO_FP(), and ReplaceNodeResults().
|
virtual |
This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array, into the specified DAG. The implementation should fill in the InVals array with legal-type argument values, and return the resulting token chain value.
Reimplemented from llvm::TargetLowering.
Definition at line 314 of file SparcISelLowering.cpp.
References llvm::SparcSubtarget::is64Bit(), LowerFormalArguments_32(), and LowerFormalArguments_64().
SDValue SparcTargetLowering::LowerFormalArguments_32 | ( | SDValue | Chain, |
CallingConv::ID | CallConv, | ||
bool | isVarArg, | ||
const SmallVectorImpl< ISD::InputArg > & | Ins, | ||
SDLoc | dl, | ||
SelectionDAG & | DAG, | ||
SmallVectorImpl< SDValue > & | InVals | ||
) | const |
LowerFormalArguments32 - 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.
Definition at line 332 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::MachineFunction::addLiveIn(), llvm::MachineRegisterInfo::addLiveIn(), llvm::CCState::AnalyzeFormalArguments(), llvm::ISD::AssertSext, llvm::ISD::BITCAST, llvm::ISD::BUILD_PAIR, llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MVT::f32, llvm::MVT::f64, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getExtLoad(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::MachineFunction::getRegInfo(), llvm::SelectionDAG::getRoot(), llvm::MVT::getSizeInBits(), llvm::SparcMachineFunctionInfo::getSRetReturnReg(), llvm::SelectionDAG::getStore(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::Function::hasStructRetAttr(), llvm::MVT::i32, llvm::MVT::i64, llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::SPII::Load, llvm::CCValAssign::needsCustom(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SparcMachineFunctionInfo::setSRetReturnReg(), llvm::SparcMachineFunctionInfo::setVarArgsFrameOffset(), llvm::ISD::SEXTLOAD, llvm::ISD::TokenFactor, and llvm::ISD::TRUNCATE.
Referenced by LowerFormalArguments().
SDValue SparcTargetLowering::LowerFormalArguments_64 | ( | SDValue | Chain, |
CallingConv::ID | CallConv, | ||
bool | isVarArg, | ||
const SmallVectorImpl< ISD::InputArg > & | Ins, | ||
SDLoc | dl, | ||
SelectionDAG & | DAG, | ||
SmallVectorImpl< SDValue > & | InVals | ||
) | const |
Definition at line 532 of file SparcISelLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::CCState::AnalyzeFormalArguments(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::MachineFrameInfo::CreateFixedObject(), llvm::SmallVectorBase::empty(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getLoad(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MVT::getSizeInBits(), llvm::SparcSubtarget::getStackPointerBias(), llvm::SelectionDAG::getStore(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SelectionDAG::getValueType(), llvm::CCValAssign::getValVT(), llvm::MVT::i32, llvm::MVT::i64, llvm::CCValAssign::isExtInLoc(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::CCValAssign::needsCustom(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SparcMachineFunctionInfo::setVarArgsFrameOffset(), llvm::CCValAssign::SExt, llvm::SmallVectorTemplateCommon< T >::size(), llvm::ISD::SRL, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, and llvm::CCValAssign::ZExt.
Referenced by LowerFormalArguments().
SDValue SparcTargetLowering::LowerGlobalAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1740 of file SparcISelLowering.cpp.
References makeAddress().
Referenced by LowerOperation().
SDValue SparcTargetLowering::LowerGlobalTLSAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1755 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::CallingConv::C, llvm::TLSModel::GeneralDynamic, llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::GlobalAddressSDNode::getGlobal(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::TargetMachine::getRegisterInfo(), llvm::SelectionDAG::getRegisterMask(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::TargetLoweringBase::getTargetMachine(), llvm::TargetMachine::getTLSModel(), llvm::SDValue::getValue(), llvm::SelectionDAG::getVTList(), llvm::SPISD::GLOBAL_BASE_REG, llvm::MVT::Glue, llvm::SPISD::Hi, llvm::HexagonISD::Hi, llvm::MVT::i64, llvm::TLSModel::InitialExec, llvm::SPISD::Lo, llvm::HexagonISD::Lo, llvm::TLSModel::LocalDynamic, llvm::TLSModel::LocalExec, makeHiLoPair(), llvm::SPII::MO_TLS_GD_ADD, llvm::SPII::MO_TLS_GD_CALL, llvm::SPII::MO_TLS_GD_HI22, llvm::SPII::MO_TLS_GD_LO10, llvm::SPII::MO_TLS_IE_ADD, llvm::SPII::MO_TLS_IE_HI22, llvm::SPII::MO_TLS_IE_LD, llvm::SPII::MO_TLS_IE_LDX, llvm::SPII::MO_TLS_IE_LO10, llvm::SPII::MO_TLS_LDM_ADD, llvm::SPII::MO_TLS_LDM_CALL, llvm::SPII::MO_TLS_LDM_HI22, llvm::SPII::MO_TLS_LDM_LO10, llvm::SPII::MO_TLS_LDO_ADD, llvm::SPII::MO_TLS_LDO_HIX22, llvm::SPII::MO_TLS_LDO_LOX10, llvm::SPII::MO_TLS_LE_HIX22, llvm::SPII::MO_TLS_LE_LOX10, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::AArch64ISD::Ret, llvm::MachineFrameInfo::setHasCalls(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::ARMBuildAttrs::Symbol, llvm::SPISD::TLS_ADD, llvm::SPISD::TLS_CALL, llvm::SPISD::TLS_LD, withTargetFlags(), and llvm::ISD::XOR.
Referenced by LowerOperation().
|
virtual |
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 2600 of file SparcISelLowering.cpp.
References llvm::RTLIB::ADD_F128, llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::ConstantPool, llvm::RTLIB::DIV_F128, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::FABS, llvm::ISD::FADD, llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FNEG, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FRAMEADDR, llvm::ISD::FSQRT, llvm::ISD::FSUB, llvm::TargetLoweringBase::getLibcallName(), llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::SparcSubtarget::hasHardQuad(), llvm::SparcSubtarget::is64Bit(), llvm::SparcSubtarget::isV9(), llvm_unreachable, llvm::ISD::LOAD, LowerADDC_ADDE_SUBC_SUBE(), LowerBlockAddress(), LowerBR_CC(), LowerConstantPool(), LowerDYNAMIC_STACKALLOC(), LowerF128_FPEXTEND(), LowerF128_FPROUND(), LowerF128Load(), LowerF128Op(), LowerF128Store(), LowerFABS(), LowerFNEG(), LowerFP_TO_SINT(), LowerFP_TO_UINT(), LowerFRAMEADDR(), LowerGlobalAddress(), LowerGlobalTLSAddress(), LowerRETURNADDR(), LowerSELECT_CC(), LowerSINT_TO_FP(), LowerUINT_TO_FP(), LowerVAARG(), LowerVASTART(), llvm::RTLIB::MUL_F128, llvm::ISD::RETURNADDR, llvm::ISD::SELECT_CC, llvm::ISD::SINT_TO_FP, llvm::RTLIB::SQRT_F128, llvm::ISD::STORE, llvm::RTLIB::SUB_F128, llvm::ISD::SUBC, llvm::ISD::SUBE, llvm::ISD::UINT_TO_FP, llvm::ISD::VAARG, and llvm::ISD::VASTART.
|
virtual |
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 164 of file SparcISelLowering.cpp.
References llvm::SparcSubtarget::is64Bit(), LowerReturn_32(), and LowerReturn_64().
SDValue SparcTargetLowering::LowerReturn_32 | ( | SDValue | Chain, |
CallingConv::ID | CallConv, | ||
bool | IsVarArg, | ||
const SmallVectorImpl< ISD::OutputArg > & | Outs, | ||
const SmallVectorImpl< SDValue > & | OutVals, | ||
SDLoc | DL, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 175 of file SparcISelLowering.cpp.
References llvm::CCState::AnalyzeReturn(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::SparcMachineFunctionInfo::getSRetReturnReg(), llvm::SelectionDAG::getTarget(), llvm::SDValue::getValue(), llvm::Function::hasStructRetAttr(), llvm::MVT::i32, llvm::CCValAssign::isRegLoc(), llvm_unreachable, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SPISD::RET_FLAG, and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by LowerReturn().
SDValue SparcTargetLowering::LowerReturn_64 | ( | SDValue | Chain, |
CallingConv::ID | CallConv, | ||
bool | IsVarArg, | ||
const SmallVectorImpl< ISD::OutputArg > & | Outs, | ||
const SmallVectorImpl< SDValue > & | OutVals, | ||
SDLoc | DL, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 238 of file SparcISelLowering.cpp.
References llvm::CCValAssign::AExt, llvm::CCState::AnalyzeReturn(), llvm::ISD::ANY_EXTEND, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyToReg(), llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getTarget(), llvm::SDValue::getValue(), llvm::CCValAssign::getValVT(), llvm::MVT::i32, llvm::MVT::i64, llvm::CCValAssign::isRegLoc(), llvm::CCValAssign::needsCustom(), llvm::A64CC::NV, llvm::ISD::OR, llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SPISD::RET_FLAG, llvm::CCValAssign::SExt, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::SmallVectorTemplateCommon< T >::size(), llvm::ISD::ZERO_EXTEND, and llvm::CCValAssign::ZExt.
Referenced by LowerReturn().
SDValue SparcTargetLowering::makeAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 1696 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::TargetMachine::getCodeModel(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::MachinePointerInfo::getGOT(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SPISD::GLOBAL_BASE_REG, llvm::HexagonISD::Hi, llvm::MVT::i32, llvm::CodeModel::JITDefault, llvm::CodeModel::Large, llvm_unreachable, llvm::SPISD::Lo, llvm::HexagonISD::Lo, makeHiLoPair(), llvm::CodeModel::Medium, llvm::SPII::MO_H44, llvm::SPII::MO_HH, llvm::SPII::MO_HI, llvm::SPII::MO_HM, llvm::SPII::MO_L44, llvm::SPII::MO_LO, llvm::SPII::MO_M44, llvm::Reloc::PIC_, llvm::MachineFrameInfo::setHasCalls(), llvm::ISD::SHL, llvm::CodeModel::Small, and withTargetFlags().
Referenced by LowerBlockAddress(), LowerConstantPool(), and LowerGlobalAddress().
SDValue SparcTargetLowering::makeHiLoPair | ( | SDValue | Op, |
unsigned | HiTF, | ||
unsigned | LoTF, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 1684 of file SparcISelLowering.cpp.
References llvm::ISD::ADD, llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), llvm::SPISD::Hi, llvm::HexagonISD::Hi, llvm::SPISD::Lo, llvm::HexagonISD::Lo, and withTargetFlags().
Referenced by LowerGlobalTLSAddress(), and makeAddress().
|
virtual |
This callback is invoked when a node result type is illegal for the target, and the operation was registered to use 'custom' lowering for that result type. 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.
If the target has no operations that require custom lowering, it need not implement this. The default implementation aborts.
Reimplemented from llvm::TargetLowering.
Definition at line 2769 of file SparcISelLowering.cpp.
References llvm::MVT::f128, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::RTLIB::FPTOSINT_F128_I64, llvm::RTLIB::FPTOUINT_F128_I64, llvm::TargetLoweringBase::getLibcallName(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::MVT::i64, llvm_unreachable, LowerF128Op(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::ISD::SINT_TO_FP, llvm::RTLIB::SINTTOFP_I64_F128, llvm::ISD::UINT_TO_FP, llvm::RTLIB::UINTTOFP_I64_F128, and llvm::RTLIB::UNKNOWN_LIBCALL.
If true, then instruction selection should seek to shrink the FP constant of the specified type to a smaller type in order to save space and / or reduce runtime.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 149 of file SparcISelLowering.h.
References llvm::MVT::f128.
SDValue SparcTargetLowering::withTargetFlags | ( | SDValue | Op, |
unsigned | TF, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 1655 of file SparcISelLowering.cpp.
References llvm::SelectionDAG::getTargetBlockAddress(), llvm::SelectionDAG::getTargetConstantPool(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SDValue::getValueType(), and llvm_unreachable.
Referenced by LowerGlobalTLSAddress(), makeAddress(), and makeHiLoPair().