LLVM API Documentation
#include <NVPTXISelLowering.h>
Public Member Functions | |
NVPTXTargetLowering (NVPTXTargetMachine &TM) | |
virtual SDValue | LowerOperation (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerGlobalAddress (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerGlobalAddress (const GlobalValue *GV, int64_t Offset, SelectionDAG &DAG) const |
virtual const char * | getTargetNodeName (unsigned Opcode) const |
This method returns the name of a target specific DAG node. More... | |
bool | isTypeSupportedInIntrinsic (MVT VT) const |
bool | getTgtMemIntrinsic (IntrinsicInfo &Info, const CallInst &I, unsigned Intrinsic) const |
virtual bool | isLegalAddressingMode (const AddrMode &AM, Type *Ty) const |
virtual unsigned | getFunctionAlignment (const Function *F) const |
getFunctionAlignment - Return the Log2 alignment of this function. More... | |
virtual EVT | getSetCCResultType (LLVMContext &, EVT VT) const |
ConstraintType | getConstraintType (const std::string &Constraint) const |
std::pair< unsigned, const TargetRegisterClass * > | getRegForInlineAsmConstraint (const std::string &Constraint, MVT VT) const |
virtual SDValue | LowerFormalArguments (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const |
virtual SDValue | LowerCall (CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const |
std::string | getPrototype (Type *, const ArgListTy &, const SmallVectorImpl< ISD::OutputArg > &, unsigned retAlignment, const ImmutableCallSite *CS) 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 |
virtual void | LowerAsmOperandForConstraint (SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const |
virtual MVT | getScalarShiftAmountTy (EVT LHSTy) const |
virtual bool | shouldSplitVectorElementType (EVT VT) 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 |
virtual bool | isOffsetFoldingLegal (const GlobalAddressSDNode *GA) 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 void | computeMaskedBitsForTargetNode (const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, 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 |
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 MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *MBB) const |
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 |
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 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 | 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 |
virtual bool | ShouldShrinkFPConstant (EVT) 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 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... | |
Public Attributes | |
NVPTXTargetMachine * | nvTM |
Definition at line 80 of file NVPTXISelLowering.h.
|
explicit |
Definition at line 102 of file NVPTXISelLowering.cpp.
References llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRIND, llvm::ISD::BSWAP, llvm::TargetLoweringBase::computeRegisterProperties(), llvm::ISD::ConstantFP, llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::TargetLoweringBase::Custom, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f32, llvm::MVT::f64, llvm::MVT::FIRST_VECTOR_VALUETYPE, llvm::ISD::GlobalAddress, llvm::NVPTXSubtarget::hasROT32(), llvm::NVPTXSubtarget::hasROT64(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm::ISD::INTRINSIC_W_CHAIN, IsPTXVectorType(), llvm::MVT::LAST_VECTOR_VALUETYPE, llvm::TargetLoweringBase::Legal, llvm::ISD::LOAD, llvm::TargetLoweringBase::MaxStoresPerMemcpy, llvm::TargetLoweringBase::MaxStoresPerMemmove, llvm::TargetLoweringBase::MaxStoresPerMemset, llvm::MVT::Other, llvm::TargetLoweringBase::Promote, llvm::Sched::RegPressure, llvm::ISD::ROTL, llvm::ISD::ROTR, sched4reg, llvm::ISD::SELECT_CC, llvm::TargetLoweringBase::setBooleanContents(), llvm::TargetLoweringBase::setJumpIsExpensive(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setSchedulingPreference(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SEXTLOAD, llvm::ISD::SIGN_EXTEND_INREG, llvm::Sched::Source, llvm::ISD::STORE, llvm::ISD::TRAP, llvm::TargetLoweringBase::ZeroOrNegativeOneBooleanContent, and llvm::ISD::ZEXTLOAD.
|
virtual |
getConstraintType - Given a constraint letter, return the type of constraint it is for this target.
Reimplemented from llvm::TargetLowering.
Definition at line 1997 of file NVPTXISelLowering.cpp.
References llvm::TargetLowering::C_RegisterClass, and llvm::TargetLowering::getConstraintType().
getFunctionAlignment - Return the Log2 alignment of this function.
Definition at line 2040 of file NVPTXISelLowering.cpp.
std::string NVPTXTargetLowering::getPrototype | ( | Type * | retTy, |
const ArgListTy & | Args, | ||
const SmallVectorImpl< ISD::OutputArg > & | Outs, | ||
unsigned | retAlignment, | ||
const ImmutableCallSite * | CS | ||
) | const |
Definition at line 347 of file NVPTXISelLowering.cpp.
References llvm::ComputeValueVTs(), llvm::dyn_cast(), llvm::getAlign(), getBitWidth(), llvm::TargetLoweringBase::getDataLayout(), llvm::SequentialType::getElementType(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::TargetLoweringBase::getPointerTy(), llvm::Type::getPrimitiveSizeInBits(), llvm::MVT::getSizeInBits(), llvm::EVT::getSizeInBits(), llvm::NVPTXSubtarget::getSmVersion(), llvm::DataLayout::getTypeAllocSize(), llvm::Type::getTypeID(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::i16, llvm::MVT::i8, llvm::Type::isAggregateType(), llvm::Type::isFloatingPointTy(), llvm::EVT::isInteger(), llvm::Type::isIntegerTy(), llvm::Type::isPrimitiveType(), llvm::Type::isVectorTy(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::Type::StructTyID, TD, uniqueCallSite, and llvm::Type::VoidTyID.
Referenced by LowerCall().
|
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 2017 of file NVPTXISelLowering.cpp.
References llvm::TargetLowering::getRegForInlineAsmConstraint().
Reimplemented from llvm::TargetLoweringBase.
Definition at line 142 of file NVPTXISelLowering.h.
References llvm::MVT::i32.
|
inlinevirtual |
Return the ValueType of the result of SETCC operations. Also used to obtain the target's preferred type for the condition operand of SELECT and BRCOND nodes. In the case of BRCOND the argument passed is MVT::Other since there are no other operands to get a type hint from.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 106 of file NVPTXISelLowering.h.
References llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::MVT::i1, and llvm::EVT::isVector().
|
virtual |
This method returns the name of a target specific DAG node.
Reimplemented from llvm::TargetLowering.
Definition at line 245 of file NVPTXISelLowering.cpp.
References llvm::NVPTXISD::CALL, llvm::NVPTXISD::CallArg, llvm::NVPTXISD::CallArgBegin, llvm::NVPTXISD::CallArgEnd, llvm::NVPTXISD::CallPrototype, llvm::NVPTXISD::CallSeqBegin, llvm::NVPTXISD::CallSeqEnd, llvm::NVPTXISD::CallSymbol, llvm::NVPTXISD::CallVal, llvm::NVPTXISD::CallVoid, llvm::NVPTXISD::DeclareParam, llvm::NVPTXISD::DeclareRet, llvm::NVPTXISD::DeclareRetParam, llvm::NVPTXISD::DeclareScalarParam, llvm::NVPTXISD::LastCallArg, llvm::NVPTXISD::LDGV2, llvm::NVPTXISD::LDGV4, llvm::NVPTXISD::LDUV2, llvm::NVPTXISD::LDUV4, llvm::NVPTXISD::LoadParam, llvm::NVPTXISD::LoadParamV2, llvm::NVPTXISD::LoadParamV4, llvm::NVPTXISD::LoadV2, llvm::NVPTXISD::LoadV4, llvm::NVPTXISD::MoveParam, llvm::NVPTXISD::PrintCall, llvm::NVPTXISD::Prototype, llvm::NVPTXISD::PseudoUseParam, llvm::NVPTXISD::RET_FLAG, llvm::NVPTXISD::RETURN, llvm::NVPTXISD::StoreParam, llvm::NVPTXISD::StoreParamS32, llvm::NVPTXISD::StoreParamU32, llvm::NVPTXISD::StoreParamV2, llvm::NVPTXISD::StoreParamV4, llvm::NVPTXISD::StoreRetval, llvm::NVPTXISD::StoreRetvalV2, llvm::NVPTXISD::StoreRetvalV4, llvm::NVPTXISD::StoreV2, llvm::NVPTXISD::StoreV4, and llvm::NVPTXISD::Wrapper.
|
virtual |
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (touches memory). If this is the case, it returns true and store the intrinsic information into the IntrinsicInfo that was passed to the function.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1900 of file NVPTXISelLowering.cpp.
References llvm::TargetLoweringBase::IntrinsicInfo::align, llvm::MVT::f32, llvm::CallInst::getArgOperand(), llvm::Value::getType(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::i32, llvm::ISD::INTRINSIC_W_CHAIN, llvm::TargetLoweringBase::IntrinsicInfo::memVT, llvm::Intrinsic::nvvm_atomic_load_add_f32, llvm::Intrinsic::nvvm_atomic_load_dec_32, llvm::Intrinsic::nvvm_atomic_load_inc_32, llvm::Intrinsic::nvvm_ldu_global_f, llvm::Intrinsic::nvvm_ldu_global_i, llvm::Intrinsic::nvvm_ldu_global_p, llvm::TargetLoweringBase::IntrinsicInfo::offset, llvm::TargetLoweringBase::IntrinsicInfo::opc, llvm::TargetLoweringBase::IntrinsicInfo::ptrVal, llvm::TargetLoweringBase::IntrinsicInfo::readMem, llvm::TargetLoweringBase::IntrinsicInfo::vol, and llvm::TargetLoweringBase::IntrinsicInfo::writeMem.
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type Used to guide target specific optimizations, like loop strength reduction (LoopStrengthReduce.cpp) and memory optimization for address mode (CodeGenPrepare.cpp)
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type. Used to guide target specific optimizations, like loop strength reduction (LoopStrengthReduce.cpp) and memory optimization for address mode (CodeGenPrepare.cpp)
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1957 of file NVPTXISelLowering.cpp.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::TargetLoweringBase::AddrMode::HasBaseReg, and llvm::TargetLoweringBase::AddrMode::Scale.
Definition at line 1884 of file NVPTXISelLowering.cpp.
References llvm::MVT::getVectorElementType(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::MVT::isVector().
|
virtual |
Lower the specified operand into the Ops vector. If it is invalid, don't add anything to Ops.
LowerAsmOperandForConstraint - Lower the specified operand into the Ops vector. If it is invalid, don't add anything to Ops.
Reimplemented from llvm::TargetLowering.
Definition at line 1872 of file NVPTXISelLowering.cpp.
References llvm::TargetLowering::LowerAsmOperandForConstraint().
|
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 519 of file NVPTXISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ANY_EXTEND, llvm::TargetLowering::CallLoweringInfo::Args, llvm::c_str(), llvm::NVPTXISD::CallArg, llvm::NVPTXISD::CallArgBegin, llvm::NVPTXISD::CallArgEnd, llvm::TargetLowering::CallLoweringInfo::Callee, llvm::NVPTXISD::CallPrototype, llvm::NVPTXISD::CallVoid, llvm::TargetLowering::CallLoweringInfo::Chain, ComputePTXValueVTs(), llvm::ComputeValueVTs(), llvm::TargetLowering::CallLoweringInfo::CS, llvm::TargetLowering::CallLoweringInfo::DAG, llvm::NVPTXISD::DeclareParam, llvm::NVPTXISD::DeclareRet, llvm::NVPTXISD::DeclareRetParam, llvm::NVPTXISD::DeclareScalarParam, llvm::TargetLowering::CallLoweringInfo::DL, llvm::dyn_cast(), F(), llvm::SelectionDAG::getCALLSEQ_END(), llvm::SelectionDAG::getCALLSEQ_START(), llvm::SelectionDAG::getConstant(), llvm::Function::getContext(), llvm::TargetLoweringBase::getDataLayout(), llvm::SequentialType::getElementType(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::ManagedStringPool::getManagedString(), llvm::NVPTXTargetMachine::getManagedStrPool(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getNumRegisters(), llvm::TargetLoweringBase::getPointerTy(), getPrototype(), llvm::EVT::getSizeInBits(), llvm::NVPTXSubtarget::getSmVersion(), llvm::EVT::getStoreSizeInBits(), llvm::SelectionDAG::getTargetExternalSymbol(), llvm::NVPTXTargetMachine::getTargetLowering(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeAllocSizeInBits(), llvm::EVT::getTypeForEVT(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MipsISD::Ins, llvm::TargetLowering::CallLoweringInfo::Ins, llvm::Type::isAggregateType(), llvm::EVT::isInteger(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::Type::isPrimitiveType(), llvm::TargetLowering::CallLoweringInfo::IsTailCall, llvm::Type::isVectorTy(), llvm::NVPTXISD::LastCallArg, llvm::NVPTXISD::LoadParam, llvm::NVPTXISD::LoadParamV2, llvm::NVPTXISD::LoadParamV4, nvTM, llvm::MVT::Other, llvm::TargetLowering::CallLoweringInfo::Outs, llvm::TargetLowering::CallLoweringInfo::OutVals, llvm::NVPTXISD::PrintCall, llvm::NVPTXISD::PrintCallUni, llvm::NVPTXISD::Prototype, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::TargetLowering::CallLoweringInfo::RetTy, llvm::ISD::SIGN_EXTEND, llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::NVPTXISD::StoreParam, llvm::NVPTXISD::StoreParamS32, llvm::NVPTXISD::StoreParamU32, llvm::NVPTXISD::StoreParamV2, llvm::NVPTXISD::StoreParamV4, llvm::ISD::TRUNCATE, uniqueCallSite, and llvm::ISD::ZERO_EXTEND.
|
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 1385 of file NVPTXISelLowering.cpp.
References llvm::ISD::ADD, llvm::ADDRESS_SPACE_PARAM, llvm::ISD::ANY_EXTEND, llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Attribute::ByVal, ComputePTXValueVTs(), llvm::ISD::EXTRACT_VECTOR_ELT, F(), llvm::PointerType::get(), llvm::DataLayout::getABITypeAlignment(), llvm::Function::getAttributes(), llvm::SelectionDAG::getConstant(), llvm::Function::getContext(), llvm::TargetLoweringBase::getDataLayout(), llvm::SelectionDAG::getExtLoad(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::Constant::getNullValue(), llvm::TargetLoweringBase::getNumRegisters(), getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getRoot(), llvm::EVT::getSizeInBits(), llvm::NVPTXSubtarget::getSmVersion(), llvm::NVPTXTargetMachine::getTargetLowering(), llvm::DataLayout::getTypeAllocSize(), llvm::EVT::getTypeForEVT(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::AttributeSet::hasAttribute(), I, llvm::MVT::i32, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::Type::isAggregateType(), llvm::isImageOrSamplerVal(), llvm::isKernelFunction(), llvm::Type::isVectorTy(), llvm::NVPTXISD::MoveParam, nvTM, llvm::Intrinsic::nvvm_ptr_local_to_gen, llvm::MVT::Other, P, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SDNode::setIROrder(), llvm::SelectionDAG::setRoot(), llvm::ISD::SEXTLOAD, llvm::SmallVectorTemplateCommon< T >::size(), llvm::ISD::TokenFactor, llvm::ISD::UNDEF, and llvm::ISD::ZEXTLOAD.
SDValue NVPTXTargetLowering::LowerGlobalAddress | ( | SDValue | Op, |
SelectionDAG & | DAG | ||
) | const |
Definition at line 339 of file NVPTXISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::SelectionDAG::getTargetGlobalAddress(), and llvm::NVPTXISD::Wrapper.
Referenced by LowerOperation().
SDValue llvm::NVPTXTargetLowering::LowerGlobalAddress | ( | const GlobalValue * | GV, |
int64_t | Offset, | ||
SelectionDAG & | DAG | ||
) | const |
|
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 1162 of file NVPTXISelLowering.cpp.
References llvm::ISD::BUILD_VECTOR, llvm::ISD::CONCAT_VECTORS, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::FRAMEADDR, llvm::SDValue::getOpcode(), llvm::ISD::GlobalAddress, llvm::ISD::INTRINSIC_W_CHAIN, llvm_unreachable, llvm::ISD::LOAD, LowerGlobalAddress(), llvm::ISD::RETURNADDR, and llvm::ISD::STORE.
|
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 1695 of file NVPTXISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, ComputePTXValueVTs(), llvm::ISD::EXTRACT_VECTOR_ELT, F(), llvm::SelectionDAG::getConstant(), llvm::Function::getContext(), llvm::TargetLoweringBase::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getNode(), llvm::Function::getReturnType(), llvm::EVT::getSizeInBits(), llvm::NVPTXSubtarget::getSmVersion(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeAllocSizeInBits(), llvm::EVT::getTypeForEVT(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::MVT::i16, llvm::MVT::i32, llvm::Type::isIntegerTy(), llvm::EVT::isVector(), llvm::MVT::Other, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::NVPTXISD::RET_FLAG, llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::NVPTXISD::StoreRetval, llvm::NVPTXISD::StoreRetvalV2, llvm::NVPTXISD::StoreRetvalV4, and llvm::ISD::ZERO_EXTEND.
Return true if a vector of the given type should be split (TypeSplitVector) instead of promoted (TypePromoteInteger) during type legalization.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 334 of file NVPTXISelLowering.cpp.
References llvm::MVT::i1.
NVPTXTargetMachine* llvm::NVPTXTargetLowering::nvTM |
Definition at line 139 of file NVPTXISelLowering.h.
Referenced by LowerCall(), and LowerFormalArguments().