LLVM API Documentation
#include <SIISelLowering.h>
Public Member Functions | |
SITargetLowering (TargetMachine &tm) | |
bool | allowsUnalignedMemoryAccesses (EVT VT, bool *IsFast) const |
Determine if the target supports unaligned memory accesses. More... | |
virtual bool | shouldSplitVectorElementType (EVT VT) const |
SDValue | LowerFormalArguments (SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc DL, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const |
virtual MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr *MI, MachineBasicBlock *BB) const |
virtual EVT | getSetCCResultType (LLVMContext &Context, EVT VT) const |
virtual MVT | getScalarShiftAmountTy (EVT VT) const |
virtual bool | isFMAFasterThanFMulAndFAdd (EVT VT) const |
virtual SDValue | LowerOperation (SDValue Op, SelectionDAG &DAG) const |
virtual SDValue | PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const |
virtual SDNode * | PostISelFolding (MachineSDNode *N, SelectionDAG &DAG) const |
Fold the instructions after slecting them. More... | |
virtual void | AdjustInstrPostInstrSelection (MachineInstr *MI, SDNode *Node) const |
Assign the register class depending on the number of bits set in the writemask. More... | |
int32_t | analyzeImmediate (const SDNode *N) const |
Analyze the possible immediate value Op. More... | |
SDValue | CreateLiveInRegister (SelectionDAG &DAG, const TargetRegisterClass *RC, unsigned Reg, EVT VT) const |
Helper function that adds Reg to the LiveIn list of the DAG's MachineFunction. More... | |
![]() | |
AMDGPUTargetLowering (TargetMachine &TM) | |
virtual bool | isFAbsFree (EVT VT) const |
virtual bool | isFNegFree (EVT VT) const |
virtual MVT | getVectorIdxTy () const |
virtual bool | isLoadBitCastBeneficial (EVT, EVT) const LLVM_OVERRIDE |
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 SDValue | LowerCall (CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const |
SDValue | LowerIntrinsicIABS (SDValue Op, SelectionDAG &DAG) const |
IABS(a) = SMAX(sub(0, a), a) More... | |
SDValue | LowerIntrinsicLRP (SDValue Op, SelectionDAG &DAG) const |
SDValue | LowerMinMax (SDValue Op, SelectionDAG &DAG) const |
Generate Min/Max node. More... | |
virtual const char * | getTargetNodeName (unsigned Opcode) const |
This method returns the name of a target specific DAG node. More... | |
virtual void | computeMaskedBitsForTargetNode (const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth=0) const |
Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero and KnownOne bitsets. More... | |
virtual bool | getTgtMemIntrinsic (IntrinsicInfo &Info, const CallInst &I, unsigned Intrinsic) const |
bool | isFPImmLegal (const APFloat &Imm, EVT VT) const |
We want to mark f32/f64 floating point values as legal. More... | |
bool | ShouldShrinkFPConstant (EVT VT) const |
We don't want to shrink f64/f32 constants. More... | |
![]() | |
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 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 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 void | ReplaceNodeResults (SDNode *, SmallVectorImpl< SDValue > &, SelectionDAG &) 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 ConstraintType | getConstraintType (const std::string &Constraint) const |
Given a constraint, return the type of constraint it is for this target. More... | |
virtual std::pair< unsigned, const TargetRegisterClass * > | getRegForInlineAsmConstraint (const std::string &Constraint, MVT VT) 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... | |
![]() | |
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 |
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 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 | 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 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 | 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 23 of file SIISelLowering.h.
SITargetLowering::SITargetLowering | ( | TargetMachine & | tm | ) |
Definition at line 31 of file SIISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ADDC, llvm::ISD::ADDE, llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::ANY_EXTEND, llvm::ISD::BITCAST, llvm::TargetLoweringBase::computeRegisterProperties(), llvm::TargetLoweringBase::Custom, llvm::TargetLoweringBase::Expand, llvm::ISD::EXTLOAD, llvm::MVT::f32, llvm::MVT::f64, llvm::ISD::FrameIndex, llvm::ISD::GlobalAddress, llvm::MVT::i1, llvm::MVT::i128, llvm::MVT::i32, llvm::MVT::i64, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::TargetLoweringBase::Legal, llvm::ISD::LOAD, llvm::MVT::Other, llvm::Sched::RegPressure, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::TargetLoweringBase::setCondCodeAction(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::ISD::SETONE, llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setSchedulingPreference(), llvm::TargetLoweringBase::setTargetDAGCombine(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SETUEQ, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SEXTLOAD, llvm::ISD::SIGN_EXTEND, llvm::ISD::STORE, llvm::MVT::v16f32, llvm::MVT::v16i16, llvm::MVT::v16i32, llvm::MVT::v16i8, llvm::MVT::v2f32, llvm::MVT::v2i1, llvm::MVT::v2i32, llvm::MVT::v32i8, llvm::MVT::v4f32, llvm::MVT::v4i1, llvm::MVT::v4i32, llvm::MVT::v64i8, llvm::MVT::v8f32, llvm::MVT::v8i16, llvm::MVT::v8i32, llvm::ISD::VECTOR_SHUFFLE, and llvm::ISD::ZERO_EXTEND.
|
virtual |
Assign the register class depending on the number of bits set in the writemask.
Reimplemented from llvm::TargetLowering.
Definition at line 1329 of file SIISelLowering.cpp.
References llvm::MachineOperand::getImm(), llvm::TargetMachine::getInstrInfo(), llvm::AMDGPUInstrInfo::getMaskedMIMGOp(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SIInstrInfo::isMIMG(), llvm::MachineInstr::setDesc(), and llvm::MachineRegisterInfo::setRegClass().
Determine if the target supports unaligned memory accesses.
This function returns true if the target allows unaligned memory accesses. of the specified type. If true, it also returns whether the unaligned memory access is "fast" in the second argument by reference. This is used, for example, in situations where an array copy/move/set is converted to a sequence of store operations. It's use helps to ensure that such replacements don't generate code that causes an alignment error (trap) on the target machine.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 153 of file SIISelLowering.cpp.
References llvm::EVT::bitsGT(), llvm::MVT::i32, llvm::EVT::isSimple(), and llvm::MVT::Other.
int32_t SITargetLowering::analyzeImmediate | ( | const SDNode * | N | ) | const |
Analyze the possible immediate value Op.
Returns -1 if it isn't an immediate, 0 if it's and inline immediate and the immediate value if it's a literal immediate
Definition at line 909 of file SIISelLowering.cpp.
|
virtual |
Helper function that adds Reg to the LiveIn list of the DAG's MachineFunction.
Reimplemented from llvm::AMDGPUTargetLowering.
Definition at line 1392 of file SIISelLowering.cpp.
References llvm::AMDGPUTargetLowering::CreateLiveInRegister(), llvm::SelectionDAG::getCopyFromReg(), and llvm::SelectionDAG::getEntryNode().
Referenced by LowerOperation().
|
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 335 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addOperand(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::TargetLowering::EmitInstrWithCustomInserter(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::TargetMachine::getInstrInfo(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetLoweringBase::getTargetMachine(), I, llvm::A64CC::MI, llvm::TargetOpcode::REG_SEQUENCE, RSRC_DATA_FORMAT, and TII.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 411 of file SIISelLowering.cpp.
References llvm::MVT::i32.
|
virtual |
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 404 of file SIISelLowering.cpp.
References llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::MVT::i1, and llvm::EVT::isVector().
Return true if an FMA operation is faster than a pair of fmul and fadd instructions. fmuladd intrinsics will be expanded to FMAs when this method returns true, otherwise fmuladd is expanded to fmul + fadd.
NOTE: This may be called before legalization on types for which FMAs are not legal, but should return true if those types will eventually legalize to types that support FMAs. After legalization, it will only be called on types that support FMAs (via Legal or Custom actions)
Reimplemented from llvm::TargetLoweringBase.
Definition at line 415 of file SIISelLowering.cpp.
References llvm::MVT::f32, llvm::MVT::f64, llvm::EVT::getScalarType(), llvm::EVT::getSimpleVT(), llvm::EVT::isSimple(), and llvm::MVT::SimpleTy.
|
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 182 of file SIISelLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::AMDGPUTargetLowering::AnalyzeFormalArguments(), llvm::ISD::BUILD_VECTOR, llvm::CallingConv::C, ShaderType::COMPUTE, llvm::SmallVectorTemplateCommon< T >::data(), llvm::ISD::InputArg::Flags, llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::MachineFunction::getFunction(), llvm::Function::getFunctionType(), llvm::MachineFunction::getInfo(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetRegisterInfo::getMatchingSuperReg(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::SelectionDAG::getNode(), llvm::AMDGPUTargetLowering::getOriginalFunctionArgs(), llvm::FunctionType::getParamType(), llvm::TargetMachine::getRegisterInfo(), llvm::SelectionDAG::getRoot(), llvm::MVT::getStoreSize(), llvm::TargetLoweringBase::getTargetMachine(), llvm::SelectionDAG::getUNDEF(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), llvm::Type::getVectorNumElements(), llvm::MVT::i64, llvm::MipsISD::Ins, llvm::ISD::ArgFlagsTy::isByVal(), llvm::ISD::ArgFlagsTy::isInReg(), llvm::CCValAssign::isMemLoc(), llvm::CCValAssign::isRegLoc(), llvm::MVT::isVector(), llvm::ISD::InputArg::OrigArgIndex, llvm::ISD::InputArg::PartOffset, ShaderType::PIXEL, llvm::SIMachineFunctionInfo::PSInputAddr, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::ISD::ArgFlagsTy::setSplit(), llvm::AMDGPUMachineFunction::ShaderType, llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::ISD::InputArg::Used, and llvm::ISD::InputArg::VT.
|
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::AMDGPUTargetLowering.
Definition at line 437 of file SIISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::ANY_EXTEND, llvm::ISD::BRCOND, CreateLiveInRegister(), llvm::dyn_cast(), llvm::MemSDNode::getAddressSpace(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::SDNode::getVTList(), llvm::ISD::GlobalAddress, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isVector(), llvm::SPII::Load, llvm::ISD::LOAD, llvm::AMDGPUISD::LOAD_CONSTANT, llvm::AMDGPUISD::LOAD_INPUT, AMDGPUAS::LOCAL_ADDRESS, llvm::AMDGPUTargetLowering::LowerGlobalAddress(), llvm::AMDGPUTargetLowering::LowerOperation(), llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, AMDGPUAS::PRIVATE_ADDRESS, llvm::Intrinsic::r600_read_global_size_x, llvm::Intrinsic::r600_read_global_size_y, llvm::Intrinsic::r600_read_global_size_z, llvm::Intrinsic::r600_read_local_size_x, llvm::Intrinsic::r600_read_local_size_y, llvm::Intrinsic::r600_read_local_size_z, llvm::Intrinsic::r600_read_ngroups_x, llvm::Intrinsic::r600_read_ngroups_y, llvm::Intrinsic::r600_read_ngroups_z, llvm::Intrinsic::r600_read_tgid_x, llvm::Intrinsic::r600_read_tgid_y, llvm::Intrinsic::r600_read_tgid_z, llvm::Intrinsic::r600_read_tidig_x, llvm::Intrinsic::r600_read_tidig_y, llvm::Intrinsic::r600_read_tidig_z, llvm::AMDGPUISD::SAMPLE, llvm::AMDGPUISD::SAMPLEB, llvm::AMDGPUISD::SAMPLED, llvm::AMDGPUISD::SAMPLEL, llvm::ISD::SELECT_CC, llvm::ISD::SIGN_EXTEND, llvm::AMDGPUTargetLowering::SplitVectorLoad(), llvm::ISD::STORE, llvm::AMDGPUISD::TBUFFER_STORE_FORMAT, and llvm::ISD::ZERO_EXTEND.
|
virtual |
This method will be invoked for all target nodes and for any target-independent nodes that the target has registered with invoke it for.
The semantics are as follows: Return Value: SDValue.Val == 0 - No change was made SDValue.Val == N - N was replaced, is dead, and is already handled. otherwise - N should be replaced by the returned Operand.
In addition, methods provided by DAGCombinerInfo may be used to perform more complex transformations.
Reimplemented from llvm::TargetLowering.
Definition at line 848 of file SIISelLowering.cpp.
References llvm::CallingConv::C, llvm::TargetLowering::DAGCombinerInfo::DAG, llvm::dyn_cast(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDNode::getOpcode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::MVT::i1, llvm::ConstantSDNode::isAllOnesValue(), llvm::ConstantSDNode::isNullValue(), llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SETNE, llvm::ISD::SIGN_EXTEND, and llvm::TargetLowering::SimplifySetCC().
|
virtual |
Fold the instructions after slecting them.
Reimplemented from llvm::AMDGPUTargetLowering.
Definition at line 1315 of file SIISelLowering.cpp.
References llvm::TargetMachine::getInstrInfo(), llvm::SDNode::getMachineOpcode(), llvm::TargetLoweringBase::getTargetMachine(), and llvm::SIInstrInfo::isMIMG().
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 162 of file SIISelLowering.cpp.
References llvm::EVT::bitsLE(), and llvm::MVT::i16.