LLVM 20.0.0git
|
#include "Target/X86/X86ISelLowering.h"
Public Member Functions | |
X86TargetLowering (const X86TargetMachine &TM, const X86Subtarget &STI) | |
unsigned | getJumpTableEncoding () const override |
Return the entry encoding for a jump table in the current function. | |
bool | useSoftFloat () const override |
void | markLibCallAttributes (MachineFunction *MF, unsigned CC, ArgListTy &Args) const override |
MVT | getScalarShiftAmountTy (const DataLayout &, EVT VT) const override |
Return the type to use for a scalar shift opcode, given the shifted amount type. | |
const MCExpr * | LowerCustomJumpTableEntry (const MachineJumpTableInfo *MJTI, const MachineBasicBlock *MBB, unsigned uid, MCContext &Ctx) const override |
SDValue | getPICJumpTableRelocBase (SDValue Table, SelectionDAG &DAG) const override |
Returns relocation base for the given PIC jumptable. | |
const MCExpr * | getPICJumpTableRelocBaseExpr (const MachineFunction *MF, unsigned JTI, MCContext &Ctx) const override |
This returns the relocation base for the given PIC jumptable, the same as getPICJumpTableRelocBase, but as an MCExpr. | |
uint64_t | getByValTypeAlignment (Type *Ty, const DataLayout &DL) const override |
Return the desired alignment for ByVal aggregate function arguments in the caller parameter area. | |
EVT | getOptimalMemOpType (const MemOp &Op, const AttributeList &FuncAttributes) const override |
It returns EVT::Other if the type should be determined using generic target-independent logic. | |
bool | isSafeMemOpType (MVT VT) const override |
Returns true if it's safe to use load / store of the specified type to expand memcpy / memset inline. | |
bool | isMemoryAccessFast (EVT VT, Align Alignment) const |
bool | allowsMisalignedMemoryAccesses (EVT VT, unsigned AS, Align Alignment, MachineMemOperand::Flags Flags, unsigned *Fast) const override |
Returns true if the target allows unaligned memory accesses of the specified type. | |
bool | allowsMemoryAccess (LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace, Align Alignment, MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *Fast=nullptr) const override |
This function returns true if the memory access is aligned or if the target allows this specific unaligned memory access. | |
bool | allowsMemoryAccess (LLVMContext &Context, const DataLayout &DL, EVT VT, const MachineMemOperand &MMO, unsigned *Fast) const |
SDValue | LowerOperation (SDValue Op, SelectionDAG &DAG) const override |
Provide custom lowering hooks for some operations. | |
void | ReplaceNodeResults (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override |
Replace the results of node with an illegal result type with new values built out of custom code. | |
SDValue | PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const override |
This method will be invoked for all target nodes and for any target-independent nodes that the target has registered with invoke it for. | |
bool | preferABDSToABSWithNSW (EVT VT) const override |
bool | preferSextInRegOfTruncate (EVT TruncVT, EVT VT, EVT ExtVT) const override |
bool | isXAndYEqZeroPreferableToXAndYEqY (ISD::CondCode Cond, EVT VT) const override |
bool | isTypeDesirableForOp (unsigned Opc, EVT VT) const override |
Return true if the target has native support for the specified value type and it is 'desirable' to use the type for the given node type. | |
bool | IsDesirableToPromoteOp (SDValue Op, EVT &PVT) const override |
Return true if the target has native support for the specified value type and it is 'desirable' to use the type. | |
TargetLowering::AndOrSETCCFoldKind | isDesirableToCombineLogicOpOfSETCC (const SDNode *LogicOp, const SDNode *SETCC0, const SDNode *SETCC1) const override |
Return prefered fold type, Abs if this is a vector, AddAnd if its an integer, None otherwise. | |
SDValue | getNegatedExpression (SDValue Op, SelectionDAG &DAG, bool LegalOperations, bool ForCodeSize, NegatibleCost &Cost, unsigned Depth) const override |
Return the newly negated expression if the cost is not expensive and set the cost in Cost to indicate that if it is cheaper or neutral to do the negation. | |
MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr &MI, MachineBasicBlock *MBB) const override |
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' flag. | |
const char * | getTargetNodeName (unsigned Opcode) const override |
This method returns the name of a target specific DAG node. | |
bool | mergeStoresAfterLegalization (EVT MemVT) const override |
Do not merge vector stores after legalization because that may conflict with x86-specific store splitting optimizations. | |
bool | canMergeStoresTo (unsigned AddressSpace, EVT MemVT, const MachineFunction &MF) const override |
Returns if it's reasonable to merge stores to MemVT size. | |
bool | isCheapToSpeculateCttz (Type *Ty) const override |
Return true if it is cheap to speculate a call to intrinsic cttz. | |
bool | isCheapToSpeculateCtlz (Type *Ty) const override |
Return true if it is cheap to speculate a call to intrinsic ctlz. | |
bool | isCtlzFast () const override |
Return true if ctlz instruction is fast. | |
bool | isMultiStoresCheaperThanBitsMerge (EVT LTy, EVT HTy) const override |
Return true if it is cheaper to split the store of a merged int val from a pair of smaller values into multiple stores. | |
bool | isMaskAndCmp0FoldingBeneficial (const Instruction &AndI) const override |
Return if the target supports combining a chain like: | |
bool | hasAndNotCompare (SDValue Y) const override |
Return true if the target should transform: (X & Y) == Y —> (~X & Y) == 0 (X & Y) != Y —> (~X & Y) != 0. | |
bool | hasAndNot (SDValue Y) const override |
Return true if the target has a bitwise and-not operation: X = ~A & B This can be used to simplify select or other instructions. | |
bool | hasBitTest (SDValue X, SDValue Y) const override |
Return true if the target has a bit-test instruction: (X & (1 << Y)) ==/!= 0 This knowledge can be used to prevent breaking the pattern, or creating it if it could be recognized. | |
bool | shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd (SDValue X, ConstantSDNode *XC, ConstantSDNode *CC, SDValue Y, unsigned OldShiftOpcode, unsigned NewShiftOpcode, SelectionDAG &DAG) const override |
Given the pattern (X & (C l>>/<< Y)) ==/!= 0 return true if it should be transformed into: ((X <</l>> Y) & C) ==/!= 0 WARNING: if 'X' is a constant, the fold may deadlock! FIXME: we could avoid passing XC, but we can't use isConstOrConstSplat() here because it can end up being not linked in. | |
unsigned | preferedOpcodeForCmpEqPiecesOfOperand (EVT VT, unsigned ShiftOpc, bool MayTransformRotate, const APInt &ShiftOrRotateAmt, const std::optional< APInt > &AndMask) const override |
bool | preferScalarizeSplat (SDNode *N) const override |
CondMergingParams | getJumpConditionMergingParams (Instruction::BinaryOps Opc, const Value *Lhs, const Value *Rhs) const override |
bool | shouldFoldConstantShiftPairToMask (const SDNode *N, CombineLevel Level) const override |
Return true if it is profitable to fold a pair of shifts into a mask. | |
bool | shouldFoldMaskToVariableShiftPair (SDValue Y) const override |
There are two ways to clear extreme bits (either low or high): Mask: x & (-1 << y) (the instcombine canonical form) Shifts: x >> y << y Return true if the variant with 2 variable shifts is preferred. | |
bool | shouldTransformSignedTruncationCheck (EVT XVT, unsigned KeptBits) const override |
Should we tranform the IR-optimal check for whether given truncation down into KeptBits would be truncating or not: (add x, (1 << (KeptBits-1))) srccond (1 << KeptBits) Into it's more traditional form: ((x << C) a>> C) dstcond x Return true if we should transform. | |
ShiftLegalizationStrategy | preferredShiftLegalizationStrategy (SelectionDAG &DAG, SDNode *N, unsigned ExpansionFactor) const override |
bool | shouldSplatInsEltVarIndex (EVT VT) const override |
Return true if inserting a scalar into a variable element of an undef vector is more efficiently handled by splatting the scalar instead. | |
bool | shouldConvertFpToSat (unsigned Op, EVT FPVT, EVT VT) const override |
Should we generate fp_to_si_sat and fp_to_ui_sat from type FPVT to type VT from min(max(fptoi)) saturation patterns. | |
bool | convertSetCCLogicToBitwiseLogic (EVT VT) const override |
Use bitwise logic to make pairs of compares more efficient. | |
MVT | hasFastEqualityCompare (unsigned NumBits) const override |
Vector-sized comparisons are fast using PCMPEQ + PMOVMSK or PTEST. | |
EVT | getSetCCResultType (const DataLayout &DL, LLVMContext &Context, EVT VT) const override |
Return the value type to use for ISD::SETCC. | |
bool | targetShrinkDemandedConstant (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, TargetLoweringOpt &TLO) const override |
void | computeKnownBitsForTargetNode (const SDValue Op, KnownBits &Known, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth=0) const override |
Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets. | |
unsigned | ComputeNumSignBitsForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth) const override |
Determine the number of bits in the operation that are sign bits. | |
bool | SimplifyDemandedVectorEltsForTargetNode (SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero, TargetLoweringOpt &TLO, unsigned Depth) const override |
Attempt to simplify any target nodes based on the demanded vector elements, returning true on success. | |
bool | SimplifyDemandedVectorEltsForTargetShuffle (SDValue Op, const APInt &DemandedElts, unsigned MaskIndex, TargetLoweringOpt &TLO, unsigned Depth) const |
bool | SimplifyDemandedBitsForTargetNode (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, KnownBits &Known, TargetLoweringOpt &TLO, unsigned Depth) const override |
Attempt to simplify any target nodes based on the demanded bits/elts, returning true on success. | |
SDValue | SimplifyMultipleUseDemandedBitsForTargetNode (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, SelectionDAG &DAG, unsigned Depth) const override |
More limited version of SimplifyDemandedBits that can be used to "look
through" ops that don't contribute to the DemandedBits/DemandedElts - bitwise ops etc. | |
bool | isGuaranteedNotToBeUndefOrPoisonForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, bool PoisonOnly, unsigned Depth) const override |
Return true if this function can prove that Op is never poison and, if PoisonOnly is false, does not have undef bits. | |
bool | canCreateUndefOrPoisonForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, bool PoisonOnly, bool ConsiderFlags, unsigned Depth) const override |
Return true if Op can create undef or poison from non-undef & non-poison operands. | |
bool | isSplatValueForTargetNode (SDValue Op, const APInt &DemandedElts, APInt &UndefElts, const SelectionDAG &DAG, unsigned Depth) const override |
Return true if vector Op has the same value across all DemandedElts , indicating any elements which may be undef in the output UndefElts . | |
bool | isTargetCanonicalConstantNode (SDValue Op) const override |
Returns true if the given Opc is considered a canonical constant for the target, which should not be transformed back into a BUILD_VECTOR. | |
const Constant * | getTargetConstantFromLoad (LoadSDNode *LD) const override |
This method returns the constant pool value that will be loaded by LD. | |
SDValue | unwrapAddress (SDValue N) const override |
SDValue | getReturnAddressFrameIndex (SelectionDAG &DAG) const |
bool | ExpandInlineAsm (CallInst *CI) const override |
This hook allows the target to expand an inline asm call to be explicit llvm code if it wants to. | |
ConstraintType | getConstraintType (StringRef Constraint) const override |
Given a constraint letter, return the type of constraint for this target. | |
ConstraintWeight | getSingleConstraintMatchWeight (AsmOperandInfo &Info, const char *Constraint) const override |
Examine constraint string and operand type and determine a weight value. | |
const char * | LowerXConstraint (EVT ConstraintVT) const override |
Try to replace an X constraint, which matches anything, with another that has more specific requirements based on the type of the corresponding operand. | |
void | LowerAsmOperandForConstraint (SDValue Op, StringRef Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const override |
Lower the specified operand into the Ops vector. | |
InlineAsm::ConstraintCode | getInlineAsmMemConstraint (StringRef ConstraintCode) const override |
SDValue | LowerAsmOutputForConstraint (SDValue &Chain, SDValue &Flag, const SDLoc &DL, const AsmOperandInfo &Constraint, SelectionDAG &DAG) const override |
Handle Lowering flag assembly outputs. | |
std::pair< unsigned, const TargetRegisterClass * > | getRegForInlineAsmConstraint (const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override |
Given a physical register constraint (e.g. | |
bool | isLegalAddressingMode (const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I=nullptr) const override |
Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type. | |
bool | addressingModeSupportsTLS (const GlobalValue &GV) const override |
Returns true if the targets addressing mode can target thread local storage (TLS). | |
bool | isLegalICmpImmediate (int64_t Imm) const override |
Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructions which can compare a register against the immediate without having to materialize the immediate into a register. | |
bool | isLegalAddImmediate (int64_t Imm) const override |
Return true if the specified immediate is legal add immediate, that is the target has add instructions which can add a register and the immediate without having to materialize the immediate into a register. | |
bool | isLegalStoreImmediate (int64_t Imm) const override |
Return true if the specified immediate is legal for the value input of a store instruction. | |
bool | isVectorShiftByScalarCheap (Type *Ty) const override |
This is used to enable splatted operand transforms for vector shifts and vector funnel shifts. | |
bool | isBinOp (unsigned Opcode) const override |
Add x86-specific opcodes to the default list. | |
bool | isCommutativeBinOp (unsigned Opcode) const override |
Returns true if the opcode is a commutative binary operation. | |
bool | isTruncateFree (Type *Ty1, Type *Ty2) const override |
Return true if it's free to truncate a value of type Ty1 to type Ty2. | |
bool | isTruncateFree (EVT VT1, EVT VT2) const override |
bool | allowTruncateForTailCall (Type *Ty1, Type *Ty2) const override |
Return true if a truncation from FromTy to ToTy is permitted when deciding whether a call is in tail position. | |
bool | isZExtFree (Type *Ty1, Type *Ty2) const override |
Return true if any actual instruction that defines a value of type Ty1 implicit zero-extends the value to Ty2 in the result register. | |
bool | isZExtFree (EVT VT1, EVT VT2) const override |
bool | isZExtFree (SDValue Val, EVT VT2) const override |
Return true if zero-extending the specific node Val to type VT2 is free (either because it's implicitly zero-extended such as ARM ldrb / ldrh or because it's folded such as X86 zero-extending loads). | |
bool | shouldSinkOperands (Instruction *I, SmallVectorImpl< Use * > &Ops) const override |
Return true if sinking I's operands to the same basic block as I is profitable, e.g. | |
bool | shouldConvertPhiType (Type *From, Type *To) const override |
Given a set in interconnected phis of type 'From' that are loaded/stored or bitcast to type 'To', return true if the set should be converted to 'To'. | |
bool | isVectorLoadExtDesirable (SDValue) const override |
Return true if folding a vector load into ExtVal (a sign, zero, or any extend node) is profitable. | |
bool | isFMAFasterThanFMulAndFAdd (const MachineFunction &MF, EVT VT) const override |
Return true if an FMA operation is faster than a pair of fmul and fadd instructions. | |
bool | isNarrowingProfitable (EVT SrcVT, EVT DestVT) const override |
Return true if it's profitable to narrow operations of type SrcVT to DestVT. | |
bool | shouldFoldSelectWithIdentityConstant (unsigned BinOpcode, EVT VT) const override |
Return true if pulling a binary operation into a select with an identity constant is profitable. | |
bool | getTgtMemIntrinsic (IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const override |
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (touches memory). | |
bool | isFPImmLegal (const APFloat &Imm, EVT VT, bool ForCodeSize) const override |
Returns true if the target can instruction select the specified FP immediate natively. | |
bool | isShuffleMaskLegal (ArrayRef< int > Mask, EVT VT) const override |
Targets can use this to indicate that they only support some VECTOR_SHUFFLE operations, those with specific masks. | |
bool | isVectorClearMaskLegal (ArrayRef< int > Mask, EVT VT) const override |
Similar to isShuffleMaskLegal. | |
bool | areJTsAllowed (const Function *Fn) const override |
Returns true if lowering to a jump table is allowed. | |
MVT | getPreferredSwitchConditionType (LLVMContext &Context, EVT ConditionVT) const override |
Returns preferred type for switch condition. | |
bool | ShouldShrinkFPConstant (EVT VT) const override |
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. | |
bool | shouldReduceLoadWidth (SDNode *Load, ISD::LoadExtType ExtTy, EVT NewVT) const override |
Return true if we believe it is correct and profitable to reduce the load node to a smaller type. | |
bool | isScalarFPTypeInSSEReg (EVT VT) const |
Return true if the specified scalar FP type is computed in an SSE register, not on the X87 floating point stack. | |
bool | shouldConvertConstantLoadToIntImm (const APInt &Imm, Type *Ty) const override |
Returns true if it is beneficial to convert a load of a constant to just the constant itself. | |
bool | reduceSelectOfFPConstantLoads (EVT CmpOpVT) const override |
Return true if it is profitable to convert a select of FP constants into a constant pool load whose address depends on the select condition. | |
bool | convertSelectOfConstantsToMath (EVT VT) const override |
Return true if a select of constants (select Cond, C1, C2) should be transformed into simple math ops with the condition value. | |
bool | decomposeMulByConstant (LLVMContext &Context, EVT VT, SDValue C) const override |
Return true if it is profitable to transform an integer multiplication-by-constant into simpler operations like shifts and adds. | |
bool | isExtractSubvectorCheap (EVT ResVT, EVT SrcVT, unsigned Index) const override |
Return true if EXTRACT_SUBVECTOR is cheap for this result type with this index. | |
bool | shouldScalarizeBinop (SDValue) const override |
Scalar ops always have equal or better analysis/performance/power than the vector equivalent, so this always makes sense if the scalar op is supported. | |
bool | isExtractVecEltCheap (EVT VT, unsigned Index) const override |
Extract of a scalar FP value from index 0 of a vector is free. | |
bool | shouldFormOverflowOp (unsigned Opcode, EVT VT, bool MathUsed) const override |
Overflow nodes should get combined/lowered to optimal instructions (they should allow eliminating explicit compares by getting flags from math ops). | |
bool | storeOfVectorConstantIsCheap (bool IsZero, EVT MemVT, unsigned NumElem, unsigned AddrSpace) const override |
Return true if it is expected to be cheaper to do a store of vector constant with the given size and type for the address space than to store the individual scalar element constants. | |
bool | isLoadBitCastBeneficial (EVT LoadVT, EVT BitcastVT, const SelectionDAG &DAG, const MachineMemOperand &MMO) const override |
Return true if the following transform is beneficial: fold (conv (load x)) -> (load (conv*)x) On architectures that don't natively support some vector loads efficiently, casting the load to a smaller vector of larger types and loading is more efficient, however, this can be undone by optimizations in dag combiner. | |
Register | getRegisterByName (const char *RegName, LLT VT, const MachineFunction &MF) const override |
Return the register ID of the name passed in. | |
Register | getExceptionPointerRegister (const Constant *PersonalityFn) const override |
If a physical register, this returns the register that receives the exception address on entry to an EH pad. | |
Register | getExceptionSelectorRegister (const Constant *PersonalityFn) const override |
If a physical register, this returns the register that receives the exception typeid on entry to a landing pad. | |
bool | needsFixedCatchObjects () const override |
FastISel * | createFastISel (FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo) const override |
This method returns a target specific FastISel object, or null if the target does not support "fast" ISel. | |
Value * | getIRStackGuard (IRBuilderBase &IRB) const override |
If the target has a standard location for the stack protector cookie, returns the address of that location. | |
bool | useLoadStackGuardNode () const override |
If this function returns true, SelectionDAGBuilder emits a LOAD_STACK_GUARD node when it is lowering Intrinsic::stackprotector. | |
bool | useStackGuardXorFP () const override |
If this function returns true, stack protection checks should XOR the frame pointer (or whichever pointer is used to address locals) into the stack guard value before checking it. | |
void | insertSSPDeclarations (Module &M) const override |
Inserts necessary declarations for SSP (stack protection) purpose. | |
Value * | getSDagStackGuard (const Module &M) const override |
Return the variable that's previously inserted by insertSSPDeclarations, if any, otherwise return nullptr. | |
Function * | getSSPStackGuardCheck (const Module &M) const override |
If the target has a standard stack protection check function that performs validation and error handling, returns the function. | |
SDValue | emitStackGuardXorFP (SelectionDAG &DAG, SDValue Val, const SDLoc &DL) const override |
Value * | getSafeStackPointerLocation (IRBuilderBase &IRB) const override |
Return true if the target stores SafeStack pointer at a fixed offset in some non-standard address space, and populates the address space and offset as appropriate. | |
std::pair< SDValue, SDValue > | BuildFILD (EVT DstVT, EVT SrcVT, const SDLoc &DL, SDValue Chain, SDValue Pointer, MachinePointerInfo PtrInfo, Align Alignment, SelectionDAG &DAG) const |
LegalizeTypeAction | getPreferredVectorAction (MVT VT) const override |
Customize the preferred legalization strategy for certain types. | |
bool | softPromoteHalfType () const override |
MVT | getRegisterTypeForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT) const override |
Certain combinations of ABIs, Targets and features require that types are legal for some operations and not for other operations. | |
unsigned | getNumRegistersForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT) const override |
Certain targets require unusual breakdowns of certain types. | |
unsigned | getVectorTypeBreakdownForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT, EVT &IntermediateVT, unsigned &NumIntermediates, MVT &RegisterVT) const override |
Certain targets such as MIPS require that some types such as vectors are always broken down into scalars in some contexts. | |
bool | isIntDivCheap (EVT VT, AttributeList Attr) const override |
Return true if integer divide is usually cheaper than a sequence of several shifts, adds, and multiplies for this target. | |
bool | supportSwiftError () const override |
Return true if the target supports swifterror attribute. | |
bool | supportKCFIBundles () const override |
Return true if the target supports kcfi operand bundles. | |
MachineInstr * | EmitKCFICheck (MachineBasicBlock &MBB, MachineBasicBlock::instr_iterator &MBBI, const TargetInstrInfo *TII) const override |
bool | hasStackProbeSymbol (const MachineFunction &MF) const override |
Returns true if stack probing through a function call is requested. | |
bool | hasInlineStackProbe (const MachineFunction &MF) const override |
Returns true if stack probing through inline assembly is requested. | |
StringRef | getStackProbeSymbolName (const MachineFunction &MF) const override |
Returns the name of the symbol used to emit stack probes or the empty string if not applicable. | |
unsigned | getStackProbeSize (const MachineFunction &MF) const |
bool | hasVectorBlend () const override |
Return true if the target has a vector blend instruction. | |
unsigned | getMaxSupportedInterleaveFactor () const override |
Get the maximum supported factor for interleaved memory accesses. | |
bool | isInlineAsmTargetBranch (const SmallVectorImpl< StringRef > &AsmStrs, unsigned OpNo) const override |
On x86, return true if the operand with index OpNo is a CALL or JUMP instruction, which can use either a memory constraint or an address constraint. | |
SDValue | visitMaskedLoad (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, MachineMemOperand *MMO, SDValue &NewLoad, SDValue Ptr, SDValue PassThru, SDValue Mask) const override |
SDValue | visitMaskedStore (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, MachineMemOperand *MMO, SDValue Ptr, SDValue Val, SDValue Mask) const override |
bool | lowerInterleavedLoad (LoadInst *LI, ArrayRef< ShuffleVectorInst * > Shuffles, ArrayRef< unsigned > Indices, unsigned Factor) const override |
Lower interleaved load(s) into target specific instructions/intrinsics. | |
bool | lowerInterleavedStore (StoreInst *SI, ShuffleVectorInst *SVI, unsigned Factor) const override |
Lower interleaved store(s) into target specific instructions/intrinsics. | |
SDValue | expandIndirectJTBranch (const SDLoc &dl, SDValue Value, SDValue Addr, int JTI, SelectionDAG &DAG) const override |
Expands target specific indirect branch for the case of JumpTable expansion. | |
Align | getPrefLoopAlignment (MachineLoop *ML) const override |
Return the preferred loop alignment. | |
EVT | getTypeToTransformTo (LLVMContext &Context, EVT VT) const override |
For types supported by the target, this is an identity function. | |
Public Member Functions inherited from llvm::TargetLowering | |
TargetLowering (const TargetLowering &)=delete | |
TargetLowering & | operator= (const TargetLowering &)=delete |
TargetLowering (const TargetMachine &TM) | |
NOTE: The TargetMachine owns TLOF. | |
bool | isPositionIndependent () const |
virtual bool | isSDNodeSourceOfDivergence (const SDNode *N, FunctionLoweringInfo *FLI, UniformityInfo *UA) const |
virtual bool | isReassocProfitable (SelectionDAG &DAG, SDValue N0, SDValue N1) const |
virtual bool | isReassocProfitable (MachineRegisterInfo &MRI, Register N0, Register N1) const |
virtual bool | isSDNodeAlwaysUniform (const SDNode *N) const |
virtual bool | getPreIndexedAddressParts (SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const |
Returns true by value, base pointer and offset pointer and addressing mode by reference if the node's address can be legally represented as pre-indexed load / store address. | |
virtual bool | getPostIndexedAddressParts (SDNode *, SDNode *, SDValue &, SDValue &, ISD::MemIndexedMode &, SelectionDAG &) const |
Returns true by value, base pointer and offset pointer and addressing mode by reference if this node can be combined with a load / store to form a post-indexed load / store. | |
virtual bool | isIndexingLegal (MachineInstr &MI, Register Base, Register Offset, bool IsPre, MachineRegisterInfo &MRI) const |
Returns true if the specified base+offset is a legal indexed addressing mode for this target. | |
virtual unsigned | getJumpTableEncoding () const |
Return the entry encoding for a jump table in the current function. | |
virtual MVT | getJumpTableRegTy (const DataLayout &DL) 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. | |
virtual const MCExpr * | getPICJumpTableRelocBaseExpr (const MachineFunction *MF, unsigned JTI, MCContext &Ctx) const |
This returns the relocation base for the given PIC jumptable, the same as getPICJumpTableRelocBase, but as an MCExpr. | |
virtual bool | isOffsetFoldingLegal (const GlobalAddressSDNode *GA) const |
Return true if folding a constant offset with the given GlobalAddress is legal. | |
virtual bool | isInlineAsmTargetBranch (const SmallVectorImpl< StringRef > &AsmStrs, unsigned OpNo) const |
On x86, return true if the operand with index OpNo is a CALL or JUMP instruction, which can use either a memory constraint or an address constraint. | |
bool | isInTailCallPosition (SelectionDAG &DAG, SDNode *Node, SDValue &Chain) const |
Check whether a given call node is in tail position within its function. | |
void | softenSetCCOperands (SelectionDAG &DAG, EVT VT, SDValue &NewLHS, SDValue &NewRHS, ISD::CondCode &CCCode, const SDLoc &DL, const SDValue OldLHS, const SDValue OldRHS) const |
Soften the operands of a comparison. | |
void | softenSetCCOperands (SelectionDAG &DAG, EVT VT, SDValue &NewLHS, SDValue &NewRHS, ISD::CondCode &CCCode, const SDLoc &DL, const SDValue OldLHS, const SDValue OldRHS, SDValue &Chain, bool IsSignaling=false) const |
virtual SDValue | visitMaskedLoad (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, MachineMemOperand *MMO, SDValue &NewLoad, SDValue Ptr, SDValue PassThru, SDValue Mask) const |
virtual SDValue | visitMaskedStore (SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, MachineMemOperand *MMO, SDValue Ptr, SDValue Val, SDValue Mask) const |
std::pair< SDValue, SDValue > | makeLibCall (SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT, ArrayRef< SDValue > Ops, MakeLibCallOptions CallOptions, const SDLoc &dl, SDValue Chain=SDValue()) const |
Returns a pair of (return value, chain). | |
bool | parametersInCSRMatch (const MachineRegisterInfo &MRI, const uint32_t *CallerPreservedMask, const SmallVectorImpl< CCValAssign > &ArgLocs, const SmallVectorImpl< SDValue > &OutVals) const |
Check whether parameters to a call that are passed in callee saved registers are the same as from the calling function. | |
virtual bool | findOptimalMemOpLowering (std::vector< EVT > &MemOps, unsigned Limit, const MemOp &Op, unsigned DstAS, unsigned SrcAS, const AttributeList &FuncAttributes) const |
Determines the optimal series of memory ops to replace the memset / memcpy. | |
bool | ShrinkDemandedConstant (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, TargetLoweringOpt &TLO) const |
Check to see if the specified operand of the specified instruction is a constant integer. | |
bool | ShrinkDemandedConstant (SDValue Op, const APInt &DemandedBits, TargetLoweringOpt &TLO) const |
Helper wrapper around ShrinkDemandedConstant, demanding all elements. | |
virtual bool | targetShrinkDemandedConstant (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, TargetLoweringOpt &TLO) const |
bool | ShrinkDemandedOp (SDValue Op, unsigned BitWidth, const APInt &DemandedBits, TargetLoweringOpt &TLO) const |
Convert x+y to (VT)((SmallVT)x+(SmallVT)y) if the casts are free. | |
bool | SimplifyDemandedBits (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, KnownBits &Known, TargetLoweringOpt &TLO, unsigned Depth=0, bool AssumeSingleUse=false) const |
Look at Op. | |
bool | SimplifyDemandedBits (SDValue Op, const APInt &DemandedBits, KnownBits &Known, TargetLoweringOpt &TLO, unsigned Depth=0, bool AssumeSingleUse=false) const |
Helper wrapper around SimplifyDemandedBits, demanding all elements. | |
bool | SimplifyDemandedBits (SDValue Op, const APInt &DemandedBits, DAGCombinerInfo &DCI) const |
Helper wrapper around SimplifyDemandedBits. | |
bool | SimplifyDemandedBits (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, DAGCombinerInfo &DCI) const |
Helper wrapper around SimplifyDemandedBits. | |
SDValue | SimplifyMultipleUseDemandedBits (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, SelectionDAG &DAG, unsigned Depth=0) const |
More limited version of SimplifyDemandedBits that can be used to "look
through" ops that don't contribute to the DemandedBits/DemandedElts - bitwise ops etc. | |
SDValue | SimplifyMultipleUseDemandedBits (SDValue Op, const APInt &DemandedBits, SelectionDAG &DAG, unsigned Depth=0) const |
Helper wrapper around SimplifyMultipleUseDemandedBits, demanding all elements. | |
SDValue | SimplifyMultipleUseDemandedVectorElts (SDValue Op, const APInt &DemandedElts, SelectionDAG &DAG, unsigned Depth=0) const |
Helper wrapper around SimplifyMultipleUseDemandedBits, demanding all bits from only some vector elements. | |
bool | SimplifyDemandedVectorElts (SDValue Op, const APInt &DemandedEltMask, APInt &KnownUndef, APInt &KnownZero, TargetLoweringOpt &TLO, unsigned Depth=0, bool AssumeSingleUse=false) const |
Look at Vector Op. | |
bool | SimplifyDemandedVectorElts (SDValue Op, const APInt &DemandedElts, DAGCombinerInfo &DCI) const |
Helper wrapper around SimplifyDemandedVectorElts. | |
virtual bool | shouldSimplifyDemandedVectorElts (SDValue Op, const TargetLoweringOpt &TLO) const |
Return true if the target supports simplifying demanded vector elements by converting them to undefs. | |
virtual void | computeKnownBitsForTargetNode (const SDValue Op, KnownBits &Known, const APInt &DemandedElts, 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/KnownOne bitsets. | |
virtual void | computeKnownBitsForTargetInstr (GISelKnownBits &Analysis, Register R, KnownBits &Known, const APInt &DemandedElts, const MachineRegisterInfo &MRI, 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/KnownOne bitsets. | |
virtual Align | computeKnownAlignForTargetInstr (GISelKnownBits &Analysis, Register R, const MachineRegisterInfo &MRI, unsigned Depth=0) const |
Determine the known alignment for the pointer value R . | |
virtual void | computeKnownBitsForFrameIndex (int FIOp, KnownBits &Known, const MachineFunction &MF) const |
Determine which of the bits of FrameIndex FIOp are known to be 0. | |
virtual unsigned | ComputeNumSignBitsForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, unsigned Depth=0) const |
This method can be implemented by targets that want to expose additional information about sign bits to the DAG Combiner. | |
virtual unsigned | computeNumSignBitsForTargetInstr (GISelKnownBits &Analysis, Register R, const APInt &DemandedElts, const MachineRegisterInfo &MRI, unsigned Depth=0) const |
This method can be implemented by targets that want to expose additional information about sign bits to GlobalISel combiners. | |
virtual bool | SimplifyDemandedVectorEltsForTargetNode (SDValue Op, const APInt &DemandedElts, APInt &KnownUndef, APInt &KnownZero, TargetLoweringOpt &TLO, unsigned Depth=0) const |
Attempt to simplify any target nodes based on the demanded vector elements, returning true on success. | |
virtual bool | SimplifyDemandedBitsForTargetNode (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, KnownBits &Known, TargetLoweringOpt &TLO, unsigned Depth=0) const |
Attempt to simplify any target nodes based on the demanded bits/elts, returning true on success. | |
virtual SDValue | SimplifyMultipleUseDemandedBitsForTargetNode (SDValue Op, const APInt &DemandedBits, const APInt &DemandedElts, SelectionDAG &DAG, unsigned Depth) const |
More limited version of SimplifyDemandedBits that can be used to "look
through" ops that don't contribute to the DemandedBits/DemandedElts - bitwise ops etc. | |
virtual bool | isGuaranteedNotToBeUndefOrPoisonForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, bool PoisonOnly, unsigned Depth) const |
Return true if this function can prove that Op is never poison and, if PoisonOnly is false, does not have undef bits. | |
virtual bool | canCreateUndefOrPoisonForTargetNode (SDValue Op, const APInt &DemandedElts, const SelectionDAG &DAG, bool PoisonOnly, bool ConsiderFlags, unsigned Depth) const |
Return true if Op can create undef or poison from non-undef & non-poison operands. | |
SDValue | buildLegalVectorShuffle (EVT VT, const SDLoc &DL, SDValue N0, SDValue N1, MutableArrayRef< int > Mask, SelectionDAG &DAG) const |
Tries to build a legal vector shuffle using the provided parameters or equivalent variations. | |
virtual const Constant * | getTargetConstantFromLoad (LoadSDNode *LD) const |
This method returns the constant pool value that will be loaded by LD. | |
virtual bool | isKnownNeverNaNForTargetNode (SDValue Op, const SelectionDAG &DAG, bool SNaN=false, unsigned Depth=0) const |
If SNaN is false,. | |
virtual bool | isSplatValueForTargetNode (SDValue Op, const APInt &DemandedElts, APInt &UndefElts, const SelectionDAG &DAG, unsigned Depth=0) const |
Return true if vector Op has the same value across all DemandedElts , indicating any elements which may be undef in the output UndefElts . | |
virtual bool | isTargetCanonicalConstantNode (SDValue Op) const |
Returns true if the given Opc is considered a canonical constant for the target, which should not be transformed back into a BUILD_VECTOR. | |
bool | isConstTrueVal (SDValue N) const |
Return if the N is a constant or constant vector equal to the true value from getBooleanContents(). | |
bool | isConstFalseVal (SDValue N) const |
Return if the N is a constant or constant vector equal to the false value from getBooleanContents(). | |
bool | isExtendedTrueVal (const ConstantSDNode *N, EVT VT, bool SExt) const |
Return if N is a True value when extended to VT . | |
SDValue | SimplifySetCC (EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond, bool foldBooleans, DAGCombinerInfo &DCI, const SDLoc &dl) const |
Try to simplify a setcc built with the specified operands and cc. | |
virtual SDValue | unwrapAddress (SDValue N) const |
virtual bool | isGAPlusOffset (SDNode *N, const GlobalValue *&GA, int64_t &Offset) const |
Returns true (and the GlobalValue and the offset) if the node is a GlobalAddress + offset. | |
virtual SDValue | PerformDAGCombine (SDNode *N, DAGCombinerInfo &DCI) const |
This method will be invoked for all target nodes and for any target-independent nodes that the target has registered with invoke it for. | |
virtual bool | isDesirableToCommuteWithShift (const SDNode *N, CombineLevel Level) const |
Return true if it is profitable to move this shift by a constant amount through its operand, adjusting any immediate operands as necessary to preserve semantics. | |
virtual bool | isDesirableToCommuteWithShift (const MachineInstr &MI, bool IsAfterLegal) const |
GlobalISel - return true if it is profitable to move this shift by a constant amount through its operand, adjusting any immediate operands as necessary to preserve semantics. | |
virtual bool | isDesirableToPullExtFromShl (const MachineInstr &MI) const |
GlobalISel - return true if it's profitable to perform the combine: shl ([sza]ext x), y => zext (shl x, y) | |
virtual AndOrSETCCFoldKind | isDesirableToCombineLogicOpOfSETCC (const SDNode *LogicOp, const SDNode *SETCC0, const SDNode *SETCC1) const |
virtual bool | isDesirableToCommuteXorWithShift (const SDNode *N) const |
Return true if it is profitable to combine an XOR of a logical shift to create a logical shift of NOT. | |
virtual bool | isTypeDesirableForOp (unsigned, EVT VT) const |
Return true if the target has native support for the specified value type and it is 'desirable' to use the type for the given node type. | |
virtual bool | isDesirableToTransformToIntegerOp (unsigned, EVT) const |
Return true if it is profitable for dag combiner to transform a floating point op of specified opcode to a equivalent op of an integer type. | |
virtual bool | IsDesirableToPromoteOp (SDValue, EVT &) const |
This method query the target whether it is beneficial for dag combiner to promote the specified node. | |
virtual bool | supportSwiftError () const |
Return true if the target supports swifterror attribute. | |
virtual bool | supportSplitCSR (MachineFunction *MF) const |
Return true if the target supports that a subset of CSRs for the given machine function is handled explicitly via copies. | |
virtual bool | supportKCFIBundles () const |
Return true if the target supports kcfi operand bundles. | |
virtual bool | supportPtrAuthBundles () const |
Return true if the target supports ptrauth operand bundles. | |
virtual void | initializeSplitCSR (MachineBasicBlock *Entry) const |
Perform necessary initialization to handle a subset of CSRs explicitly via copies. | |
virtual void | insertCopiesSplitCSR (MachineBasicBlock *Entry, const SmallVectorImpl< MachineBasicBlock * > &Exits) const |
Insert explicit copies in entry and exit blocks. | |
virtual SDValue | getNegatedExpression (SDValue Op, SelectionDAG &DAG, bool LegalOps, bool OptForSize, NegatibleCost &Cost, unsigned Depth=0) const |
Return the newly negated expression if the cost is not expensive and set the cost in Cost to indicate that if it is cheaper or neutral to do the negation. | |
SDValue | getCheaperOrNeutralNegatedExpression (SDValue Op, SelectionDAG &DAG, bool LegalOps, bool OptForSize, const NegatibleCost CostThreshold=NegatibleCost::Neutral, unsigned Depth=0) const |
SDValue | getCheaperNegatedExpression (SDValue Op, SelectionDAG &DAG, bool LegalOps, bool OptForSize, unsigned Depth=0) const |
This is the helper function to return the newly negated expression only when the cost is cheaper. | |
SDValue | getNegatedExpression (SDValue Op, SelectionDAG &DAG, bool LegalOps, bool OptForSize, unsigned Depth=0) const |
This is the helper function to return the newly negated expression if the cost is not expensive. | |
virtual bool | splitValueIntoRegisterParts (SelectionDAG &DAG, const SDLoc &DL, SDValue Val, SDValue *Parts, unsigned NumParts, MVT PartVT, std::optional< CallingConv::ID > CC) const |
Target-specific splitting of values into parts that fit a register storing a legal type. | |
virtual bool | checkForPhysRegDependency (SDNode *Def, SDNode *User, unsigned Op, const TargetRegisterInfo *TRI, const TargetInstrInfo *TII, unsigned &PhysReg, int &Cost) const |
Allows the target to handle physreg-carried dependency in target-specific way. | |
virtual SDValue | joinRegisterPartsIntoValue (SelectionDAG &DAG, const SDLoc &DL, const SDValue *Parts, unsigned NumParts, MVT PartVT, EVT ValueVT, std::optional< CallingConv::ID > CC) const |
Target-specific combining of register parts into its original value. | |
virtual SDValue | LowerFormalArguments (SDValue, CallingConv::ID, bool, const SmallVectorImpl< ISD::InputArg > &, const SDLoc &, SelectionDAG &, SmallVectorImpl< SDValue > &) const |
This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array, into the specified DAG. | |
std::pair< SDValue, SDValue > | LowerCallTo (CallLoweringInfo &CLI) const |
This function lowers an abstract call to a function into an actual call. | |
virtual SDValue | LowerCall (CallLoweringInfo &, SmallVectorImpl< SDValue > &) const |
This hook must be implemented to lower calls into the specified DAG. | |
virtual void | HandleByVal (CCState *, unsigned &, Align) const |
Target-specific cleanup for formal ByVal parameters. | |
virtual bool | CanLowerReturn (CallingConv::ID, MachineFunction &, bool, const SmallVectorImpl< ISD::OutputArg > &, LLVMContext &) const |
This hook should be implemented to check whether the return values described by the Outs array can fit into the return registers. | |
virtual SDValue | LowerReturn (SDValue, CallingConv::ID, bool, const SmallVectorImpl< ISD::OutputArg > &, const SmallVectorImpl< SDValue > &, const SDLoc &, SelectionDAG &) const |
This hook must be implemented to lower outgoing return values, described by the Outs array, into the specified DAG. | |
virtual bool | isUsedByReturnOnly (SDNode *, SDValue &) const |
Return true if result of the specified node is used by a return node only. | |
virtual bool | mayBeEmittedAsTailCall (const CallInst *) const |
Return true if the target may be able emit the call instruction as a tail call. | |
virtual Register | getRegisterByName (const char *RegName, LLT Ty, const MachineFunction &MF) const |
Return the register ID of the name passed in. | |
virtual EVT | getTypeForExtReturn (LLVMContext &Context, EVT VT, ISD::NodeType) const |
Return the type that should be used to zero or sign extend a zeroext/signext integer return value. | |
virtual bool | functionArgumentNeedsConsecutiveRegisters (Type *Ty, CallingConv::ID CallConv, bool isVarArg, const DataLayout &DL) const |
For some targets, an LLVM struct type must be broken down into multiple simple types, but the calling convention specifies that the entire struct must be passed in a block of consecutive registers. | |
virtual bool | shouldSplitFunctionArgumentsAsLittleEndian (const DataLayout &DL) const |
For most targets, an LLVM type must be broken down into multiple smaller types. | |
virtual const MCPhysReg * | getScratchRegisters (CallingConv::ID CC) const |
Returns a 0 terminated array of registers that can be safely used as scratch registers. | |
virtual ArrayRef< MCPhysReg > | getRoundingControlRegisters () const |
Returns a 0 terminated array of rounding control registers that can be attached into strict FP call. | |
virtual SDValue | prepareVolatileOrAtomicLoad (SDValue Chain, const SDLoc &DL, SelectionDAG &DAG) const |
This callback is used to prepare for a volatile or atomic load. | |
virtual void | LowerOperationWrapper (SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const |
This callback is invoked by the type legalizer to legalize nodes with an illegal operand type but legal result types. | |
virtual SDValue | LowerOperation (SDValue Op, SelectionDAG &DAG) const |
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. | |
virtual void | ReplaceNodeResults (SDNode *, SmallVectorImpl< SDValue > &, SelectionDAG &) const |
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. | |
virtual const char * | getTargetNodeName (unsigned Opcode) const |
This method returns the name of a target specific DAG node. | |
virtual FastISel * | createFastISel (FunctionLoweringInfo &, const TargetLibraryInfo *) const |
This method returns a target specific FastISel object, or null if the target does not support "fast" ISel. | |
bool | verifyReturnAddressArgumentIsConstant (SDValue Op, SelectionDAG &DAG) const |
virtual void | verifyTargetSDNode (const SDNode *N) const |
Check the given SDNode. Aborts if it is invalid. | |
virtual bool | ExpandInlineAsm (CallInst *) const |
This hook allows the target to expand an inline asm call to be explicit llvm code if it wants to. | |
virtual AsmOperandInfoVector | ParseConstraints (const DataLayout &DL, const TargetRegisterInfo *TRI, const CallBase &Call) const |
Split up the constraint string from the inline assembly value into the specific constraints and their prefixes, and also tie in the associated operand values. | |
virtual ConstraintWeight | getMultipleConstraintMatchWeight (AsmOperandInfo &info, int maIndex) const |
Examine constraint type and operand type and determine a weight value. | |
virtual ConstraintWeight | getSingleConstraintMatchWeight (AsmOperandInfo &info, const char *constraint) const |
Examine constraint string and operand type and determine a weight value. | |
virtual void | ComputeConstraintToUse (AsmOperandInfo &OpInfo, SDValue Op, SelectionDAG *DAG=nullptr) const |
Determines the constraint code and constraint type to use for the specific AsmOperandInfo, setting OpInfo.ConstraintCode and OpInfo.ConstraintType. | |
virtual ConstraintType | getConstraintType (StringRef Constraint) const |
Given a constraint, return the type of constraint it is for this target. | |
ConstraintGroup | getConstraintPreferences (AsmOperandInfo &OpInfo) const |
Given an OpInfo with list of constraints codes as strings, return a sorted Vector of pairs of constraint codes and their types in priority of what we'd prefer to lower them as. | |
virtual std::pair< unsigned, const TargetRegisterClass * > | getRegForInlineAsmConstraint (const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const |
Given a physical register constraint (e.g. | |
virtual InlineAsm::ConstraintCode | getInlineAsmMemConstraint (StringRef ConstraintCode) const |
virtual const char * | LowerXConstraint (EVT ConstraintVT) const |
Try to replace an X constraint, which matches anything, with another that has more specific requirements based on the type of the corresponding operand. | |
virtual void | LowerAsmOperandForConstraint (SDValue Op, StringRef Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const |
Lower the specified operand into the Ops vector. | |
virtual SDValue | LowerAsmOutputForConstraint (SDValue &Chain, SDValue &Glue, const SDLoc &DL, const AsmOperandInfo &OpInfo, SelectionDAG &DAG) const |
virtual void | CollectTargetIntrinsicOperands (const CallInst &I, SmallVectorImpl< SDValue > &Ops, SelectionDAG &DAG) const |
SDValue | BuildSDIV (SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, bool IsAfterLegalTypes, SmallVectorImpl< 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. | |
SDValue | BuildUDIV (SDNode *N, SelectionDAG &DAG, bool IsAfterLegalization, bool IsAfterLegalTypes, SmallVectorImpl< 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. | |
SDValue | buildSDIVPow2WithCMov (SDNode *N, const APInt &Divisor, SelectionDAG &DAG, SmallVectorImpl< SDNode * > &Created) const |
Build sdiv by power-of-2 with conditional move instructions Ref: "Hacker's Delight" by Henry Warren 10-1 If conditional move/branch is preferred, we lower sdiv x, +/-2**k into: bgez x, label add x, x, 2**k-1 label: sra res, x, k neg res, res (when the divisor is negative) | |
virtual SDValue | BuildSDIVPow2 (SDNode *N, const APInt &Divisor, SelectionDAG &DAG, SmallVectorImpl< SDNode * > &Created) const |
Targets may override this function to provide custom SDIV lowering for power-of-2 denominators. | |
virtual SDValue | BuildSREMPow2 (SDNode *N, const APInt &Divisor, SelectionDAG &DAG, SmallVectorImpl< SDNode * > &Created) const |
Targets may override this function to provide custom SREM lowering for power-of-2 denominators. | |
virtual unsigned | combineRepeatedFPDivisors () const |
Indicate whether this target prefers to combine FDIVs with the same divisor. | |
virtual SDValue | getSqrtEstimate (SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps, bool &UseOneConstNR, bool Reciprocal) const |
Hooks for building estimates in place of slower divisions and square roots. | |
SDValue | createSelectForFMINNUM_FMAXNUM (SDNode *Node, SelectionDAG &DAG) const |
Try to convert the fminnum/fmaxnum to a compare/select sequence. | |
virtual SDValue | getRecipEstimate (SDValue Operand, SelectionDAG &DAG, int Enabled, int &RefinementSteps) const |
Return a reciprocal estimate value for the input operand. | |
virtual SDValue | getSqrtInputTest (SDValue Operand, SelectionDAG &DAG, const DenormalMode &Mode) const |
Return a target-dependent comparison result if the input operand is suitable for use with a square root estimate calculation. | |
virtual SDValue | getSqrtResultForDenormInput (SDValue Operand, SelectionDAG &DAG) const |
Return a target-dependent result if the input operand is not suitable for use with a square root estimate calculation. | |
bool | expandMUL_LOHI (unsigned Opcode, EVT VT, const SDLoc &dl, SDValue LHS, SDValue RHS, SmallVectorImpl< SDValue > &Result, EVT HiLoVT, SelectionDAG &DAG, MulExpansionKind Kind, SDValue LL=SDValue(), SDValue LH=SDValue(), SDValue RL=SDValue(), SDValue RH=SDValue()) const |
Expand a MUL or [US]MUL_LOHI of n-bit values into two or four nodes, respectively, each computing an n/2-bit part of the result. | |
bool | expandMUL (SDNode *N, SDValue &Lo, SDValue &Hi, EVT HiLoVT, SelectionDAG &DAG, MulExpansionKind Kind, SDValue LL=SDValue(), SDValue LH=SDValue(), SDValue RL=SDValue(), SDValue RH=SDValue()) const |
Expand a MUL into two nodes. | |
bool | expandDIVREMByConstant (SDNode *N, SmallVectorImpl< SDValue > &Result, EVT HiLoVT, SelectionDAG &DAG, SDValue LL=SDValue(), SDValue LH=SDValue()) const |
Attempt to expand an n-bit div/rem/divrem by constant using a n/2-bit urem by constant and other arithmetic ops. | |
SDValue | expandFunnelShift (SDNode *N, SelectionDAG &DAG) const |
Expand funnel shift. | |
SDValue | expandROT (SDNode *N, bool AllowVectorOps, SelectionDAG &DAG) const |
Expand rotations. | |
void | expandShiftParts (SDNode *N, SDValue &Lo, SDValue &Hi, SelectionDAG &DAG) const |
Expand shift-by-parts. | |
bool | expandFP_TO_SINT (SDNode *N, SDValue &Result, SelectionDAG &DAG) const |
Expand float(f32) to SINT(i64) conversion. | |
bool | expandFP_TO_UINT (SDNode *N, SDValue &Result, SDValue &Chain, SelectionDAG &DAG) const |
Expand float to UINT conversion. | |
bool | expandUINT_TO_FP (SDNode *N, SDValue &Result, SDValue &Chain, SelectionDAG &DAG) const |
Expand UINT(i64) to double(f64) conversion. | |
SDValue | expandFMINNUM_FMAXNUM (SDNode *N, SelectionDAG &DAG) const |
Expand fminnum/fmaxnum into fminnum_ieee/fmaxnum_ieee with quieted inputs. | |
SDValue | expandFMINIMUM_FMAXIMUM (SDNode *N, SelectionDAG &DAG) const |
Expand fminimum/fmaximum into multiple comparison with selects. | |
SDValue | expandFMINIMUMNUM_FMAXIMUMNUM (SDNode *N, SelectionDAG &DAG) const |
Expand fminimumnum/fmaximumnum into multiple comparison with selects. | |
SDValue | expandFP_TO_INT_SAT (SDNode *N, SelectionDAG &DAG) const |
Expand FP_TO_[US]INT_SAT into FP_TO_[US]INT and selects or min/max. | |
SDValue | expandRoundInexactToOdd (EVT ResultVT, SDValue Op, const SDLoc &DL, SelectionDAG &DAG) const |
Truncate Op to ResultVT. | |
SDValue | expandFP_ROUND (SDNode *Node, SelectionDAG &DAG) const |
Expand round(fp) to fp conversion. | |
SDValue | expandIS_FPCLASS (EVT ResultVT, SDValue Op, FPClassTest Test, SDNodeFlags Flags, const SDLoc &DL, SelectionDAG &DAG) const |
Expand check for floating point class. | |
SDValue | expandCTPOP (SDNode *N, SelectionDAG &DAG) const |
Expand CTPOP nodes. | |
SDValue | expandVPCTPOP (SDNode *N, SelectionDAG &DAG) const |
Expand VP_CTPOP nodes. | |
SDValue | expandCTLZ (SDNode *N, SelectionDAG &DAG) const |
Expand CTLZ/CTLZ_ZERO_UNDEF nodes. | |
SDValue | expandVPCTLZ (SDNode *N, SelectionDAG &DAG) const |
Expand VP_CTLZ/VP_CTLZ_ZERO_UNDEF nodes. | |
SDValue | CTTZTableLookup (SDNode *N, SelectionDAG &DAG, const SDLoc &DL, EVT VT, SDValue Op, unsigned NumBitsPerElt) const |
Expand CTTZ via Table Lookup. | |
SDValue | expandCTTZ (SDNode *N, SelectionDAG &DAG) const |
Expand CTTZ/CTTZ_ZERO_UNDEF nodes. | |
SDValue | expandVPCTTZ (SDNode *N, SelectionDAG &DAG) const |
Expand VP_CTTZ/VP_CTTZ_ZERO_UNDEF nodes. | |
SDValue | expandVPCTTZElements (SDNode *N, SelectionDAG &DAG) const |
Expand VP_CTTZ_ELTS/VP_CTTZ_ELTS_ZERO_UNDEF nodes. | |
SDValue | expandABS (SDNode *N, SelectionDAG &DAG, bool IsNegative=false) const |
Expand ABS nodes. | |
SDValue | expandABD (SDNode *N, SelectionDAG &DAG) const |
Expand ABDS/ABDU nodes. | |
SDValue | expandAVG (SDNode *N, SelectionDAG &DAG) const |
Expand vector/scalar AVGCEILS/AVGCEILU/AVGFLOORS/AVGFLOORU nodes. | |
SDValue | expandBSWAP (SDNode *N, SelectionDAG &DAG) const |
Expand BSWAP nodes. | |
SDValue | expandVPBSWAP (SDNode *N, SelectionDAG &DAG) const |
Expand VP_BSWAP nodes. | |
SDValue | expandBITREVERSE (SDNode *N, SelectionDAG &DAG) const |
Expand BITREVERSE nodes. | |
SDValue | expandVPBITREVERSE (SDNode *N, SelectionDAG &DAG) const |
Expand VP_BITREVERSE nodes. | |
std::pair< SDValue, SDValue > | scalarizeVectorLoad (LoadSDNode *LD, SelectionDAG &DAG) const |
Turn load of vector type into a load of the individual elements. | |
SDValue | scalarizeVectorStore (StoreSDNode *ST, SelectionDAG &DAG) const |
std::pair< SDValue, SDValue > | expandUnalignedLoad (LoadSDNode *LD, SelectionDAG &DAG) const |
Expands an unaligned load to 2 half-size loads for an integer, and possibly more for vectors. | |
SDValue | expandUnalignedStore (StoreSDNode *ST, SelectionDAG &DAG) const |
Expands an unaligned store to 2 half-size stores for integer values, and possibly more for vectors. | |
SDValue | IncrementMemoryAddress (SDValue Addr, SDValue Mask, const SDLoc &DL, EVT DataVT, SelectionDAG &DAG, bool IsCompressedMemory) const |
Increments memory address Addr according to the type of the value DataVT that should be stored. | |
SDValue | getVectorElementPointer (SelectionDAG &DAG, SDValue VecPtr, EVT VecVT, SDValue Index) const |
Get a pointer to vector element Idx located in memory for a vector of type VecVT starting at a base address of VecPtr . | |
SDValue | getVectorSubVecPointer (SelectionDAG &DAG, SDValue VecPtr, EVT VecVT, EVT SubVecVT, SDValue Index) const |
Get a pointer to a sub-vector of type SubVecVT at index Idx located in memory for a vector of type VecVT starting at a base address of VecPtr . | |
SDValue | expandIntMINMAX (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US][MIN|MAX]. | |
SDValue | expandAddSubSat (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US][ADD|SUB]SAT. | |
SDValue | expandCMP (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US]CMP. | |
SDValue | expandShlSat (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US]SHLSAT. | |
SDValue | expandFixedPointMul (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[U|S]MULFIX[SAT]. | |
SDValue | expandFixedPointDiv (unsigned Opcode, const SDLoc &dl, SDValue LHS, SDValue RHS, unsigned Scale, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US]DIVFIX[SAT]. | |
void | expandUADDSUBO (SDNode *Node, SDValue &Result, SDValue &Overflow, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::U(ADD|SUB)O. | |
void | expandSADDSUBO (SDNode *Node, SDValue &Result, SDValue &Overflow, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::S(ADD|SUB)O. | |
bool | expandMULO (SDNode *Node, SDValue &Result, SDValue &Overflow, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::[US]MULO. | |
void | forceExpandWideMUL (SelectionDAG &DAG, const SDLoc &dl, bool Signed, EVT WideVT, const SDValue LL, const SDValue LH, const SDValue RL, const SDValue RH, SDValue &Lo, SDValue &Hi) const |
forceExpandWideMUL - Unconditionally expand a MUL into either a libcall or brute force via a wide multiplication. | |
void | forceExpandWideMUL (SelectionDAG &DAG, const SDLoc &dl, bool Signed, const SDValue LHS, const SDValue RHS, SDValue &Lo, SDValue &Hi) const |
Same as above, but creates the upper halves of each operand by sign/zero-extending the operands. | |
SDValue | expandVecReduce (SDNode *Node, SelectionDAG &DAG) const |
Expand a VECREDUCE_* into an explicit calculation. | |
SDValue | expandVecReduceSeq (SDNode *Node, SelectionDAG &DAG) const |
Expand a VECREDUCE_SEQ_* into an explicit ordered calculation. | |
bool | expandREM (SDNode *Node, SDValue &Result, SelectionDAG &DAG) const |
Expand an SREM or UREM using SDIV/UDIV or SDIVREM/UDIVREM, if legal. | |
SDValue | expandVectorSplice (SDNode *Node, SelectionDAG &DAG) const |
Method for building the DAG expansion of ISD::VECTOR_SPLICE. | |
SDValue | expandVECTOR_COMPRESS (SDNode *Node, SelectionDAG &DAG) const |
Expand a vector VECTOR_COMPRESS into a sequence of extract element, store temporarily, advance store position, before re-loading the final vector. | |
bool | LegalizeSetCCCondCode (SelectionDAG &DAG, EVT VT, SDValue &LHS, SDValue &RHS, SDValue &CC, SDValue Mask, SDValue EVL, bool &NeedInvert, const SDLoc &dl, SDValue &Chain, bool IsSignaling=false) const |
Legalize a SETCC or VP_SETCC with given LHS and RHS and condition code CC on the current target. | |
virtual MachineBasicBlock * | EmitInstrWithCustomInserter (MachineInstr &MI, MachineBasicBlock *MBB) const |
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' flag. | |
virtual void | AdjustInstrPostInstrSelection (MachineInstr &MI, SDNode *Node) const |
This method should be implemented by targets that mark instructions with the 'hasPostISelHook' flag. | |
virtual bool | useLoadStackGuardNode () const |
If this function returns true, SelectionDAGBuilder emits a LOAD_STACK_GUARD node when it is lowering Intrinsic::stackprotector. | |
virtual SDValue | emitStackGuardXorFP (SelectionDAG &DAG, SDValue Val, const SDLoc &DL) const |
virtual SDValue | LowerToTLSEmulatedModel (const GlobalAddressSDNode *GA, SelectionDAG &DAG) const |
Lower TLS global address SDNode for target independent emulated TLS model. | |
virtual SDValue | expandIndirectJTBranch (const SDLoc &dl, SDValue Value, SDValue Addr, int JTI, SelectionDAG &DAG) const |
Expands target specific indirect branch for the case of JumpTable expansion. | |
SDValue | lowerCmpEqZeroToCtlzSrl (SDValue Op, SelectionDAG &DAG) const |
virtual bool | isXAndYEqZeroPreferableToXAndYEqY (ISD::CondCode, EVT) const |
Public Member Functions inherited from llvm::TargetLoweringBase | |
virtual void | markLibCallAttributes (MachineFunction *MF, unsigned CC, ArgListTy &Args) const |
TargetLoweringBase (const TargetMachine &TM) | |
NOTE: The TargetMachine owns TLOF. | |
TargetLoweringBase (const TargetLoweringBase &)=delete | |
TargetLoweringBase & | operator= (const TargetLoweringBase &)=delete |
virtual | ~TargetLoweringBase ()=default |
bool | isStrictFPEnabled () const |
Return true if the target support strict float operation. | |
const TargetMachine & | getTargetMachine () const |
virtual bool | useSoftFloat () const |
virtual MVT | getPointerTy (const DataLayout &DL, uint32_t AS=0) const |
Return the pointer type for the given address space, defaults to the pointer type from the data layout. | |
virtual MVT | getPointerMemTy (const DataLayout &DL, uint32_t AS=0) const |
Return the in-memory pointer type for the given address space, defaults to the pointer type from the data layout. | |
MVT | getFrameIndexTy (const DataLayout &DL) const |
Return the type for frame index, which is determined by the alloca address space specified through the data layout. | |
MVT | getProgramPointerTy (const DataLayout &DL) const |
Return the type for code pointers, which is determined by the program address space specified through the data layout. | |
virtual MVT | getFenceOperandTy (const DataLayout &DL) const |
Return the type for operands of fence. | |
virtual MVT | getScalarShiftAmountTy (const DataLayout &, EVT) const |
Return the type to use for a scalar shift opcode, given the shifted amount type. | |
EVT | getShiftAmountTy (EVT LHSTy, const DataLayout &DL) const |
Returns the type for the shift amount of a shift opcode. | |
virtual LLVM_READONLY LLT | getPreferredShiftAmountTy (LLT ShiftValueTy) const |
Return the preferred type to use for a shift opcode, given the shifted amount type is ShiftValueTy . | |
virtual MVT | getVectorIdxTy (const DataLayout &DL) const |
Returns the type to be used for the index operand of: ISD::INSERT_VECTOR_ELT, ISD::EXTRACT_VECTOR_ELT, ISD::INSERT_SUBVECTOR, and ISD::EXTRACT_SUBVECTOR. | |
virtual MVT | getVPExplicitVectorLengthTy () const |
Returns the type to be used for the EVL/AVL operand of VP nodes: ISD::VP_ADD, ISD::VP_SUB, etc. | |
virtual MachineMemOperand::Flags | getTargetMMOFlags (const Instruction &I) const |
This callback is used to inspect load/store instructions and add target-specific MachineMemOperand flags to them. | |
virtual MachineMemOperand::Flags | getTargetMMOFlags (const MemSDNode &Node) const |
This callback is used to inspect load/store SDNode. | |
MachineMemOperand::Flags | getLoadMemOperandFlags (const LoadInst &LI, const DataLayout &DL, AssumptionCache *AC=nullptr, const TargetLibraryInfo *LibInfo=nullptr) const |
MachineMemOperand::Flags | getStoreMemOperandFlags (const StoreInst &SI, const DataLayout &DL) const |
MachineMemOperand::Flags | getAtomicMemOperandFlags (const Instruction &AI, const DataLayout &DL) const |
virtual bool | isSelectSupported (SelectSupportKind) const |
virtual bool | shouldExpandGetActiveLaneMask (EVT VT, EVT OpVT) const |
Return true if the @llvm.get.active.lane.mask intrinsic should be expanded using generic code in SelectionDAGBuilder. | |
virtual bool | shouldExpandGetVectorLength (EVT CountVT, unsigned VF, bool IsScalable) const |
virtual bool | shouldExpandCttzElements (EVT VT) const |
Return true if the @llvm.experimental.cttz.elts intrinsic should be expanded using generic code in SelectionDAGBuilder. | |
unsigned | getBitWidthForCttzElements (Type *RetTy, ElementCount EC, bool ZeroIsPoison, const ConstantRange *VScaleRange) const |
Return the minimum number of bits required to hold the maximum possible number of trailing zero vector elements. | |
virtual bool | shouldReassociateReduction (unsigned RedOpc, EVT VT) const |
virtual bool | reduceSelectOfFPConstantLoads (EVT CmpOpVT) const |
Return true if it is profitable to convert a select of FP constants into a constant pool load whose address depends on the select condition. | |
bool | hasMultipleConditionRegisters () const |
Return true if multiple condition registers are available. | |
bool | hasExtractBitsInsn () const |
Return true if the target has BitExtract instructions. | |
virtual TargetLoweringBase::LegalizeTypeAction | getPreferredVectorAction (MVT VT) const |
Return the preferred vector type legalization action. | |
virtual bool | softPromoteHalfType () const |
virtual bool | useFPRegsForHalfType () const |
virtual bool | shouldExpandBuildVectorWithShuffles (EVT, unsigned DefinedValues) const |
virtual bool | isIntDivCheap (EVT VT, AttributeList Attr) const |
Return true if integer divide is usually cheaper than a sequence of several shifts, adds, and multiplies for this target. | |
virtual bool | hasStandaloneRem (EVT VT) const |
Return true if the target can handle a standalone remainder operation. | |
virtual bool | isFsqrtCheap (SDValue X, SelectionDAG &DAG) const |
Return true if SQRT(X) shouldn't be replaced with X*RSQRT(X). | |
int | getRecipEstimateSqrtEnabled (EVT VT, MachineFunction &MF) const |
Return a ReciprocalEstimate enum value for a square root of the given type based on the function's attributes. | |
int | getRecipEstimateDivEnabled (EVT VT, MachineFunction &MF) const |
Return a ReciprocalEstimate enum value for a division of the given type based on the function's attributes. | |
int | getSqrtRefinementSteps (EVT VT, MachineFunction &MF) const |
Return the refinement step count for a square root of the given type based on the function's attributes. | |
int | getDivRefinementSteps (EVT VT, MachineFunction &MF) const |
Return the refinement step count for a division of the given type based on the function's attributes. | |
bool | isSlowDivBypassed () const |
Returns true if target has indicated at least one type should be bypassed. | |
const DenseMap< unsigned int, unsigned int > & | getBypassSlowDivWidths () const |
Returns map of slow types for division or remainder with corresponding fast types. | |
virtual bool | isVScaleKnownToBeAPowerOfTwo () const |
Return true only if vscale must be a power of two. | |
bool | isJumpExpensive () const |
Return true if Flow Control is an expensive operation that should be avoided. | |
virtual CondMergingParams | getJumpConditionMergingParams (Instruction::BinaryOps, const Value *, const Value *) const |
bool | isPredictableSelectExpensive () const |
Return true if selects are only cheaper than branches if the branch is unlikely to be predicted right. | |
virtual bool | fallBackToDAGISel (const Instruction &Inst) const |
virtual bool | isLoadBitCastBeneficial (EVT LoadVT, EVT BitcastVT, const SelectionDAG &DAG, const MachineMemOperand &MMO) const |
Return true if the following transform is beneficial: fold (conv (load x)) -> (load (conv*)x) On architectures that don't natively support some vector loads efficiently, casting the load to a smaller vector of larger types and loading is more efficient, however, this can be undone by optimizations in dag combiner. | |
virtual bool | isStoreBitCastBeneficial (EVT StoreVT, EVT BitcastVT, const SelectionDAG &DAG, const MachineMemOperand &MMO) const |
Return true if the following transform is beneficial: (store (y (conv x)), y*)) -> (store x, (x*)) | |
virtual bool | storeOfVectorConstantIsCheap (bool IsZero, EVT MemVT, unsigned NumElem, unsigned AddrSpace) const |
Return true if it is expected to be cheaper to do a store of vector constant with the given size and type for the address space than to store the individual scalar element constants. | |
virtual bool | mergeStoresAfterLegalization (EVT MemVT) const |
Allow store merging for the specified type after legalization in addition to before legalization. | |
virtual bool | canMergeStoresTo (unsigned AS, EVT MemVT, const MachineFunction &MF) const |
Returns if it's reasonable to merge stores to MemVT size. | |
virtual bool | isCheapToSpeculateCttz (Type *Ty) const |
Return true if it is cheap to speculate a call to intrinsic cttz. | |
virtual bool | isCheapToSpeculateCtlz (Type *Ty) const |
Return true if it is cheap to speculate a call to intrinsic ctlz. | |
virtual bool | isCtlzFast () const |
Return true if ctlz instruction is fast. | |
virtual bool | isCtpopFast (EVT VT) const |
Return true if ctpop instruction is fast. | |
virtual unsigned | getCustomCtpopCost (EVT VT, ISD::CondCode Cond) const |
Return the maximum number of "x & (x - 1)" operations that can be done instead of deferring to a custom CTPOP. | |
virtual bool | isEqualityCmpFoldedWithSignedCmp () const |
Return true if instruction generated for equality comparison is folded with instruction generated for signed comparison. | |
virtual bool | preferZeroCompareBranch () const |
Return true if the heuristic to prefer icmp eq zero should be used in code gen prepare. | |
virtual bool | isMultiStoresCheaperThanBitsMerge (EVT LTy, EVT HTy) const |
Return true if it is cheaper to split the store of a merged int val from a pair of smaller values into multiple stores. | |
virtual bool | isMaskAndCmp0FoldingBeneficial (const Instruction &AndI) const |
Return if the target supports combining a chain like: | |
virtual bool | areTwoSDNodeTargetMMOFlagsMergeable (const MemSDNode &NodeX, const MemSDNode &NodeY) const |
Return true if it is valid to merge the TargetMMOFlags in two SDNodes. | |
virtual bool | convertSetCCLogicToBitwiseLogic (EVT VT) const |
Use bitwise logic to make pairs of compares more efficient. | |
virtual MVT | hasFastEqualityCompare (unsigned NumBits) const |
Return the preferred operand type if the target has a quick way to compare integer values of the given size. | |
virtual bool | hasAndNotCompare (SDValue Y) const |
Return true if the target should transform: (X & Y) == Y —> (~X & Y) == 0 (X & Y) != Y —> (~X & Y) != 0. | |
virtual bool | hasAndNot (SDValue X) const |
Return true if the target has a bitwise and-not operation: X = ~A & B This can be used to simplify select or other instructions. | |
virtual bool | hasBitTest (SDValue X, SDValue Y) const |
Return true if the target has a bit-test instruction: (X & (1 << Y)) ==/!= 0 This knowledge can be used to prevent breaking the pattern, or creating it if it could be recognized. | |
virtual bool | shouldFoldMaskToVariableShiftPair (SDValue X) const |
There are two ways to clear extreme bits (either low or high): Mask: x & (-1 << y) (the instcombine canonical form) Shifts: x >> y << y Return true if the variant with 2 variable shifts is preferred. | |
virtual bool | shouldFoldConstantShiftPairToMask (const SDNode *N, CombineLevel Level) const |
Return true if it is profitable to fold a pair of shifts into a mask. | |
virtual bool | shouldTransformSignedTruncationCheck (EVT XVT, unsigned KeptBits) const |
Should we tranform the IR-optimal check for whether given truncation down into KeptBits would be truncating or not: (add x, (1 << (KeptBits-1))) srccond (1 << KeptBits) Into it's more traditional form: ((x << C) a>> C) dstcond x Return true if we should transform. | |
virtual bool | shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd (SDValue X, ConstantSDNode *XC, ConstantSDNode *CC, SDValue Y, unsigned OldShiftOpcode, unsigned NewShiftOpcode, SelectionDAG &DAG) const |
Given the pattern (X & (C l>>/<< Y)) ==/!= 0 return true if it should be transformed into: ((X <</l>> Y) & C) ==/!= 0 WARNING: if 'X' is a constant, the fold may deadlock! FIXME: we could avoid passing XC, but we can't use isConstOrConstSplat() here because it can end up being not linked in. | |
virtual bool | optimizeFMulOrFDivAsShiftAddBitcast (SDNode *N, SDValue FPConst, SDValue IntPow2) const |
virtual unsigned | preferedOpcodeForCmpEqPiecesOfOperand (EVT VT, unsigned ShiftOpc, bool MayTransformRotate, const APInt &ShiftOrRotateAmt, const std::optional< APInt > &AndMask) const |
virtual bool | preferIncOfAddToSubOfNot (EVT VT) const |
These two forms are equivalent: sub y, (xor x, -1) add (add x, 1), y The variant with two add's is IR-canonical. | |
virtual bool | preferABDSToABSWithNSW (EVT VT) const |
virtual bool | preferScalarizeSplat (SDNode *N) const |
virtual bool | preferSextInRegOfTruncate (EVT TruncVT, EVT VT, EVT ExtVT) const |
bool | enableExtLdPromotion () const |
Return true if the target wants to use the optimization that turns ext(promotableInst1(...(promotableInstN(load)))) into promotedInst1(...(promotedInstN(ext(load)))). | |
virtual bool | canCombineStoreAndExtract (Type *VectorTy, Value *Idx, unsigned &Cost) const |
Return true if the target can combine store(extractelement VectorTy,
Idx). | |
virtual bool | shallExtractConstSplatVectorElementToStore (Type *VectorTy, unsigned ElemSizeInBits, unsigned &Index) const |
Return true if the target shall perform extract vector element and store given that the vector is known to be splat of constant. | |
virtual bool | shouldSplatInsEltVarIndex (EVT) const |
Return true if inserting a scalar into a variable element of an undef vector is more efficiently handled by splatting the scalar instead. | |
virtual bool | enableAggressiveFMAFusion (EVT VT) const |
Return true if target always benefits from combining into FMA for a given value type. | |
virtual bool | enableAggressiveFMAFusion (LLT Ty) const |
Return true if target always benefits from combining into FMA for a given value type. | |
virtual EVT | getSetCCResultType (const DataLayout &DL, LLVMContext &Context, EVT VT) const |
Return the ValueType of the result of SETCC operations. | |
virtual MVT::SimpleValueType | getCmpLibcallReturnType () const |
Return the ValueType for comparison libcalls. | |
BooleanContent | getBooleanContents (bool isVec, bool isFloat) const |
For targets without i1 registers, this gives the nature of the high-bits of boolean values held in types wider than i1. | |
BooleanContent | getBooleanContents (EVT Type) const |
SDValue | promoteTargetBoolean (SelectionDAG &DAG, SDValue Bool, EVT ValVT) const |
Promote the given target boolean to a target boolean of the given type. | |
Sched::Preference | getSchedulingPreference () const |
Return target scheduling preference. | |
virtual Sched::Preference | getSchedulingPreference (SDNode *) const |
Some scheduler, e.g. | |
virtual const TargetRegisterClass * | getRegClassFor (MVT VT, bool isDivergent=false) const |
Return the register class that should be used for the specified value type. | |
virtual bool | requiresUniformRegister (MachineFunction &MF, const Value *) const |
Allows target to decide about the register class of the specific value that is live outside the defining block. | |
virtual const TargetRegisterClass * | getRepRegClassFor (MVT VT) const |
Return the 'representative' register class for the specified value type. | |
virtual uint8_t | getRepRegClassCostFor (MVT VT) const |
Return the cost of the 'representative' register class for the specified value type. | |
virtual ShiftLegalizationStrategy | preferredShiftLegalizationStrategy (SelectionDAG &DAG, SDNode *N, unsigned ExpansionFactor) const |
bool | isTypeLegal (EVT VT) const |
Return true if the target has native support for the specified value type. | |
const ValueTypeActionImpl & | getValueTypeActions () const |
LegalizeKind | getTypeConversion (LLVMContext &Context, EVT VT) const |
Return pair that represents the legalization kind (first) that needs to happen to EVT (second) in order to type-legalize it. | |
LegalizeTypeAction | getTypeAction (LLVMContext &Context, EVT VT) const |
Return how we should legalize values of this type, either it is already legal (return 'Legal') or we need to promote it to a larger type (return 'Promote'), or we need to expand it into multiple registers of smaller integer type (return 'Expand'). | |
LegalizeTypeAction | getTypeAction (MVT VT) const |
virtual EVT | getTypeToTransformTo (LLVMContext &Context, EVT VT) const |
For types supported by the target, this is an identity function. | |
EVT | getTypeToExpandTo (LLVMContext &Context, EVT VT) const |
For types supported by the target, this is an identity function. | |
unsigned | getVectorTypeBreakdown (LLVMContext &Context, EVT VT, EVT &IntermediateVT, unsigned &NumIntermediates, MVT &RegisterVT) const |
Vector types are broken down into some number of legal first class types. | |
virtual unsigned | getVectorTypeBreakdownForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT, EVT &IntermediateVT, unsigned &NumIntermediates, MVT &RegisterVT) const |
Certain targets such as MIPS require that some types such as vectors are always broken down into scalars in some contexts. | |
virtual bool | getTgtMemIntrinsic (IntrinsicInfo &, const CallInst &, MachineFunction &, unsigned) const |
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (touches memory). | |
virtual bool | isFPImmLegal (const APFloat &, EVT, bool ForCodeSize=false) const |
Returns true if the target can instruction select the specified FP immediate natively. | |
virtual bool | isShuffleMaskLegal (ArrayRef< int >, EVT) const |
Targets can use this to indicate that they only support some VECTOR_SHUFFLE operations, those with specific masks. | |
virtual bool | canOpTrap (unsigned Op, EVT VT) const |
Returns true if the operation can trap for the value type. | |
virtual bool | isVectorClearMaskLegal (ArrayRef< int >, EVT) const |
Similar to isShuffleMaskLegal. | |
virtual LegalizeAction | getCustomOperationAction (SDNode &Op) const |
How to legalize this custom operation? | |
LegalizeAction | getOperationAction (unsigned Op, EVT VT) const |
Return how this operation should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
virtual bool | isSupportedFixedPointOperation (unsigned Op, EVT VT, unsigned Scale) const |
Custom method defined by each target to indicate if an operation which may require a scale is supported natively by the target. | |
LegalizeAction | getFixedPointOperationAction (unsigned Op, EVT VT, unsigned Scale) const |
Some fixed point operations may be natively supported by the target but only for specific scales. | |
LegalizeAction | getStrictFPOperationAction (unsigned Op, EVT VT) const |
bool | isOperationLegalOrCustom (unsigned Op, EVT VT, bool LegalOnly=false) const |
Return true if the specified operation is legal on this target or can be made legal with custom lowering. | |
bool | isOperationLegalOrPromote (unsigned Op, EVT VT, bool LegalOnly=false) const |
Return true if the specified operation is legal on this target or can be made legal using promotion. | |
bool | isOperationLegalOrCustomOrPromote (unsigned Op, EVT VT, bool LegalOnly=false) const |
Return true if the specified operation is legal on this target or can be made legal with custom lowering or using promotion. | |
bool | isOperationCustom (unsigned Op, EVT VT) const |
Return true if the operation uses custom lowering, regardless of whether the type is legal or not. | |
virtual bool | areJTsAllowed (const Function *Fn) const |
Return true if lowering to a jump table is allowed. | |
bool | rangeFitsInWord (const APInt &Low, const APInt &High, const DataLayout &DL) const |
Check whether the range [Low,High] fits in a machine word. | |
virtual bool | isSuitableForJumpTable (const SwitchInst *SI, uint64_t NumCases, uint64_t Range, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) const |
Return true if lowering to a jump table is suitable for a set of case clusters which may contain NumCases cases, Range range of values. | |
virtual MVT | getPreferredSwitchConditionType (LLVMContext &Context, EVT ConditionVT) const |
Returns preferred type for switch condition. | |
bool | isSuitableForBitTests (unsigned NumDests, unsigned NumCmps, const APInt &Low, const APInt &High, const DataLayout &DL) const |
Return true if lowering to a bit test is suitable for a set of case clusters which contains NumDests unique destinations, Low and High as its lowest and highest case values, and expects NumCmps case value comparisons. | |
bool | isOperationExpand (unsigned Op, EVT VT) const |
Return true if the specified operation is illegal on this target or unlikely to be made legal with custom lowering. | |
bool | isOperationLegal (unsigned Op, EVT VT) const |
Return true if the specified operation is legal on this target. | |
LegalizeAction | getLoadExtAction (unsigned ExtType, EVT ValVT, EVT MemVT) const |
Return how this load with extension should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isLoadExtLegal (unsigned ExtType, EVT ValVT, EVT MemVT) const |
Return true if the specified load with extension is legal on this target. | |
bool | isLoadExtLegalOrCustom (unsigned ExtType, EVT ValVT, EVT MemVT) const |
Return true if the specified load with extension is legal or custom on this target. | |
LegalizeAction | getAtomicLoadExtAction (unsigned ExtType, EVT ValVT, EVT MemVT) const |
Same as getLoadExtAction, but for atomic loads. | |
bool | isAtomicLoadExtLegal (unsigned ExtType, EVT ValVT, EVT MemVT) const |
Return true if the specified atomic load with extension is legal on this target. | |
LegalizeAction | getTruncStoreAction (EVT ValVT, EVT MemVT) const |
Return how this store with truncation should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isTruncStoreLegal (EVT ValVT, EVT MemVT) const |
Return true if the specified store with truncation is legal on this target. | |
bool | isTruncStoreLegalOrCustom (EVT ValVT, EVT MemVT) const |
Return true if the specified store with truncation has solution on this target. | |
virtual bool | canCombineTruncStore (EVT ValVT, EVT MemVT, bool LegalOnly) const |
LegalizeAction | getIndexedLoadAction (unsigned IdxMode, MVT VT) const |
Return how the indexed load should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isIndexedLoadLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. | |
LegalizeAction | getIndexedStoreAction (unsigned IdxMode, MVT VT) const |
Return how the indexed store should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isIndexedStoreLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. | |
LegalizeAction | getIndexedMaskedLoadAction (unsigned IdxMode, MVT VT) const |
Return how the indexed load should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isIndexedMaskedLoadLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. | |
LegalizeAction | getIndexedMaskedStoreAction (unsigned IdxMode, MVT VT) const |
Return how the indexed store should be treated: either it is legal, needs to be promoted to a larger size, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isIndexedMaskedStoreLegal (unsigned IdxMode, EVT VT) const |
Return true if the specified indexed load is legal on this target. | |
virtual bool | shouldExtendGSIndex (EVT VT, EVT &EltTy) const |
Returns true if the index type for a masked gather/scatter requires extending. | |
virtual bool | shouldRemoveExtendFromGSIndex (SDValue Extend, EVT DataVT) const |
virtual bool | isLegalScaleForGatherScatter (uint64_t Scale, uint64_t ElemSize) const |
LegalizeAction | getCondCodeAction (ISD::CondCode CC, MVT VT) const |
Return how the condition code should be treated: either it is legal, needs to be expanded to some other code sequence, or the target has a custom expander for it. | |
bool | isCondCodeLegal (ISD::CondCode CC, MVT VT) const |
Return true if the specified condition code is legal on this target. | |
bool | isCondCodeLegalOrCustom (ISD::CondCode CC, MVT VT) const |
Return true if the specified condition code is legal or custom on this target. | |
MVT | getTypeToPromoteTo (unsigned Op, MVT VT) const |
If the action for this operation is to promote, this method returns the ValueType to promote to. | |
virtual EVT | getAsmOperandValueType (const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const |
EVT | getValueType (const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const |
Return the EVT corresponding to this LLVM type. | |
EVT | getMemValueType (const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const |
MVT | getSimpleValueType (const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const |
Return the MVT corresponding to this LLVM type. See getValueType. | |
virtual uint64_t | getByValTypeAlignment (Type *Ty, const DataLayout &DL) const |
Return the desired alignment for ByVal or InAlloca aggregate function arguments in the caller parameter area. | |
MVT | getRegisterType (MVT VT) const |
Return the type of registers that this ValueType will eventually require. | |
MVT | getRegisterType (LLVMContext &Context, EVT VT) const |
Return the type of registers that this ValueType will eventually require. | |
virtual unsigned | getNumRegisters (LLVMContext &Context, EVT VT, std::optional< MVT > RegisterVT=std::nullopt) const |
Return the number of registers that this ValueType will eventually require. | |
virtual MVT | getRegisterTypeForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT) const |
Certain combinations of ABIs, Targets and features require that types are legal for some operations and not for other operations. | |
virtual unsigned | getNumRegistersForCallingConv (LLVMContext &Context, CallingConv::ID CC, EVT VT) const |
Certain targets require unusual breakdowns of certain types. | |
virtual Align | getABIAlignmentForCallingConv (Type *ArgTy, const DataLayout &DL) const |
Certain targets have context sensitive alignment requirements, where one type has the alignment requirement of another type. | |
virtual bool | ShouldShrinkFPConstant (EVT) const |
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. | |
virtual bool | shouldReduceLoadWidth (SDNode *Load, ISD::LoadExtType ExtTy, EVT NewVT) const |
Return true if it is profitable to reduce a load to a smaller type. | |
virtual bool | shouldRemoveRedundantExtend (SDValue Op) const |
Return true (the default) if it is profitable to remove a sext_inreg(x) where the sext is redundant, and use x directly. | |
bool | isPaddedAtMostSignificantBitsWhenStored (EVT VT) const |
Indicates if any padding is guaranteed to go at the most significant bits when storing the type to memory and the type size isn't equal to the store size. | |
bool | hasBigEndianPartOrdering (EVT VT, const DataLayout &DL) const |
When splitting a value of the specified type into parts, does the Lo or Hi part come first? This usually follows the endianness, except for ppcf128, where the Hi part always comes first. | |
bool | hasTargetDAGCombine (ISD::NodeType NT) const |
If true, the target has custom DAG combine transformations that it can perform for the specified node. | |
unsigned | getGatherAllAliasesMaxDepth () const |
virtual unsigned | getVaListSizeInBits (const DataLayout &DL) const |
Returns the size of the platform's va_list object. | |
unsigned | getMaxStoresPerMemset (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memset. | |
unsigned | getMaxStoresPerMemcpy (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memcpy. | |
virtual unsigned | getMaxGluedStoresPerMemcpy () const |
Get maximum # of store operations to be glued together. | |
unsigned | getMaxExpandSizeMemcmp (bool OptSize) const |
Get maximum # of load operations permitted for memcmp. | |
unsigned | getMaxStoresPerMemmove (bool OptSize) const |
Get maximum # of store operations permitted for llvm.memmove. | |
virtual bool | allowsMisalignedMemoryAccesses (EVT, unsigned AddrSpace=0, Align Alignment=Align(1), MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *=nullptr) const |
Determine if the target supports unaligned memory accesses. | |
virtual bool | allowsMisalignedMemoryAccesses (LLT, unsigned AddrSpace=0, Align Alignment=Align(1), MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *=nullptr) const |
LLT handling variant. | |
bool | allowsMemoryAccessForAlignment (LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace=0, Align Alignment=Align(1), MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *Fast=nullptr) const |
This function returns true if the memory access is aligned or if the target allows this specific unaligned memory access. | |
bool | allowsMemoryAccessForAlignment (LLVMContext &Context, const DataLayout &DL, EVT VT, const MachineMemOperand &MMO, unsigned *Fast=nullptr) const |
Return true if the memory access of this type is aligned or if the target allows this specific unaligned access for the given MachineMemOperand. | |
virtual bool | allowsMemoryAccess (LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace=0, Align Alignment=Align(1), MachineMemOperand::Flags Flags=MachineMemOperand::MONone, unsigned *Fast=nullptr) const |
Return true if the target supports a memory access of this type for the given address space and alignment. | |
bool | allowsMemoryAccess (LLVMContext &Context, const DataLayout &DL, EVT VT, const MachineMemOperand &MMO, unsigned *Fast=nullptr) const |
Return true if the target supports a memory access of this type for the given MachineMemOperand. | |
bool | allowsMemoryAccess (LLVMContext &Context, const DataLayout &DL, LLT Ty, const MachineMemOperand &MMO, unsigned *Fast=nullptr) const |
LLT handling variant. | |
virtual EVT | getOptimalMemOpType (const MemOp &Op, const AttributeList &) const |
Returns the target specific optimal type for load and store operations as a result of memset, memcpy, and memmove lowering. | |
virtual LLT | getOptimalMemOpLLT (const MemOp &Op, const AttributeList &) const |
LLT returning variant. | |
virtual bool | isSafeMemOpType (MVT) const |
Returns true if it's safe to use load / store of the specified type to expand memcpy / memset inline. | |
virtual unsigned | getMinimumJumpTableEntries () const |
Return lower limit for number of blocks in a jump table. | |
unsigned | getMinimumJumpTableDensity (bool OptForSize) const |
Return lower limit of the density in a jump table. | |
unsigned | getMaximumJumpTableSize () const |
Return upper limit for number of entries in a jump table. | |
virtual bool | isJumpTableRelative () const |
Register | getStackPointerRegisterToSaveRestore () const |
If a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save and restore. | |
virtual Register | getExceptionPointerRegister (const Constant *PersonalityFn) const |
If a physical register, this returns the register that receives the exception address on entry to an EH pad. | |
virtual Register | getExceptionSelectorRegister (const Constant *PersonalityFn) const |
If a physical register, this returns the register that receives the exception typeid on entry to a landing pad. | |
virtual bool | needsFixedCatchObjects () const |
Align | getMinStackArgumentAlignment () const |
Return the minimum stack alignment of an argument. | |
Align | getMinFunctionAlignment () const |
Return the minimum function alignment. | |
Align | getPrefFunctionAlignment () const |
Return the preferred function alignment. | |
virtual Align | getPrefLoopAlignment (MachineLoop *ML=nullptr) const |
Return the preferred loop alignment. | |
virtual unsigned | getMaxPermittedBytesForAlignment (MachineBasicBlock *MBB) const |
Return the maximum amount of bytes allowed to be emitted when padding for alignment. | |
virtual bool | alignLoopsWithOptSize () const |
Should loops be aligned even when the function is marked OptSize (but not MinSize). | |
virtual Value * | getIRStackGuard (IRBuilderBase &IRB) const |
If the target has a standard location for the stack protector guard, returns the address of that location. | |
virtual void | insertSSPDeclarations (Module &M) const |
Inserts necessary declarations for SSP (stack protection) purpose. | |
virtual Value * | getSDagStackGuard (const Module &M) const |
Return the variable that's previously inserted by insertSSPDeclarations, if any, otherwise return nullptr. | |
virtual bool | useStackGuardXorFP () const |
If this function returns true, stack protection checks should XOR the frame pointer (or whichever pointer is used to address locals) into the stack guard value before checking it. | |
virtual Function * | getSSPStackGuardCheck (const Module &M) const |
If the target has a standard stack protection check function that performs validation and error handling, returns the function. | |
virtual Value * | getSafeStackPointerLocation (IRBuilderBase &IRB) const |
Returns the target-specific address of the unsafe stack pointer. | |
virtual bool | hasStackProbeSymbol (const MachineFunction &MF) const |
Returns the name of the symbol used to emit stack probes or the empty string if not applicable. | |
virtual bool | hasInlineStackProbe (const MachineFunction &MF) const |
virtual StringRef | getStackProbeSymbolName (const MachineFunction &MF) const |
virtual bool | isFreeAddrSpaceCast (unsigned SrcAS, unsigned DestAS) const |
Returns true if a cast from SrcAS to DestAS is "cheap", such that e.g. | |
virtual bool | shouldAlignPointerArgs (CallInst *, unsigned &, Align &) const |
Return true if the pointer arguments to CI should be aligned by aligning the object whose address is being passed. | |
virtual void | emitAtomicCmpXchgNoStoreLLBalance (IRBuilderBase &Builder) const |
virtual bool | shouldSignExtendTypeInLibCall (EVT Type, bool IsSigned) const |
Returns true if arguments should be sign-extended in lib calls. | |
virtual bool | shouldExtendTypeInLibCall (EVT Type) const |
Returns true if arguments should be extended in lib calls. | |
virtual AtomicExpansionKind | shouldExpandAtomicLoadInIR (LoadInst *LI) const |
Returns how the given (atomic) load should be expanded by the IR-level AtomicExpand pass. | |
virtual AtomicExpansionKind | shouldCastAtomicLoadInIR (LoadInst *LI) const |
Returns how the given (atomic) load should be cast by the IR-level AtomicExpand pass. | |
virtual AtomicExpansionKind | shouldExpandAtomicStoreInIR (StoreInst *SI) const |
Returns how the given (atomic) store should be expanded by the IR-level AtomicExpand pass into. | |
virtual AtomicExpansionKind | shouldCastAtomicStoreInIR (StoreInst *SI) const |
Returns how the given (atomic) store should be cast by the IR-level AtomicExpand pass into. | |
virtual AtomicExpansionKind | shouldExpandAtomicCmpXchgInIR (AtomicCmpXchgInst *AI) const |
Returns how the given atomic cmpxchg should be expanded by the IR-level AtomicExpand pass. | |
virtual AtomicExpansionKind | shouldExpandAtomicRMWInIR (AtomicRMWInst *RMW) const |
Returns how the IR-level AtomicExpand pass should expand the given AtomicRMW, if at all. | |
virtual AtomicExpansionKind | shouldCastAtomicRMWIInIR (AtomicRMWInst *RMWI) const |
Returns how the given atomic atomicrmw should be cast by the IR-level AtomicExpand pass. | |
virtual LoadInst * | lowerIdempotentRMWIntoFencedLoad (AtomicRMWInst *RMWI) const |
On some platforms, an AtomicRMW that never actually modifies the value (such as fetch_add of 0) can be turned into a fence followed by an atomic load. | |
virtual ISD::NodeType | getExtendForAtomicOps () const |
Returns how the platform's atomic operations are extended (ZERO_EXTEND, SIGN_EXTEND, or ANY_EXTEND). | |
virtual ISD::NodeType | getExtendForAtomicCmpSwapArg () const |
Returns how the platform's atomic compare and swap expects its comparison value to be extended (ZERO_EXTEND, SIGN_EXTEND, or ANY_EXTEND). | |
virtual bool | shouldNormalizeToSelectSequence (LLVMContext &Context, EVT VT) const |
Returns true if we should normalize select(N0&N1, X, Y) => select(N0, select(N1, X, Y), Y) and select(N0|N1, X, Y) => select(N0, select(N1, X, Y, Y)) if it is likely that it saves us from materializing N0 and N1 in an integer register. | |
virtual bool | isProfitableToCombineMinNumMaxNum (EVT VT) const |
virtual bool | convertSelectOfConstantsToMath (EVT VT) const |
Return true if a select of constants (select Cond, C1, C2) should be transformed into simple math ops with the condition value. | |
virtual bool | decomposeMulByConstant (LLVMContext &Context, EVT VT, SDValue C) const |
Return true if it is profitable to transform an integer multiplication-by-constant into simpler operations like shifts and adds. | |
virtual bool | isMulAddWithConstProfitable (SDValue AddNode, SDValue ConstNode) const |
Return true if it may be profitable to transform (mul (add x, c1), c2) -> (add (mul x, c2), c1*c2). | |
virtual bool | shouldUseStrictFP_TO_INT (EVT FpVT, EVT IntVT, bool IsSigned) const |
Return true if it is more correct/profitable to use strict FP_TO_INT conversion operations - canonicalizing the FP source value instead of converting all cases and then selecting based on value. | |
bool | isBeneficialToExpandPowI (int64_t Exponent, bool OptForSize) const |
Return true if it is beneficial to expand an @llvm.powi. | |
virtual bool | getAddrModeArguments (IntrinsicInst *, SmallVectorImpl< Value * > &, Type *&) const |
CodeGenPrepare sinks address calculations into the same BB as Load/Store instructions reading the address. | |
virtual bool | isLegalAddressingMode (const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AddrSpace, Instruction *I=nullptr) const |
Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type. | |
virtual bool | addressingModeSupportsTLS (const GlobalValue &) const |
Returns true if the targets addressing mode can target thread local storage (TLS). | |
virtual int64_t | getPreferredLargeGEPBaseOffset (int64_t MinOffset, int64_t MaxOffset) const |
Return the prefered common base offset. | |
virtual bool | isLegalICmpImmediate (int64_t) const |
Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructions which can compare a register against the immediate without having to materialize the immediate into a register. | |
virtual bool | isLegalAddImmediate (int64_t) const |
Return true if the specified immediate is legal add immediate, that is the target has add instructions which can add a register with the immediate without having to materialize the immediate into a register. | |
virtual bool | isLegalAddScalableImmediate (int64_t) const |
Return true if adding the specified scalable immediate is legal, that is the target has add instructions which can add a register with the immediate (multiplied by vscale) without having to materialize the immediate into a register. | |
virtual bool | isLegalStoreImmediate (int64_t Value) const |
Return true if the specified immediate is legal for the value input of a store instruction. | |
virtual bool | isVectorShiftByScalarCheap (Type *Ty) const |
Return true if it's significantly cheaper to shift a vector by a uniform scalar than by an amount which will vary across each lane. | |
virtual Type * | shouldConvertSplatType (ShuffleVectorInst *SVI) const |
Given a shuffle vector SVI representing a vector splat, return a new scalar type of size equal to SVI's scalar type if the new type is more profitable. | |
virtual bool | shouldConvertPhiType (Type *From, Type *To) const |
Given a set in interconnected phis of type 'From' that are loaded/stored or bitcast to type 'To', return true if the set should be converted to 'To'. | |
virtual bool | isCommutativeBinOp (unsigned Opcode) const |
Returns true if the opcode is a commutative binary operation. | |
virtual bool | isBinOp (unsigned Opcode) const |
Return true if the node is a math/logic binary operator. | |
virtual bool | isTruncateFree (Type *FromTy, Type *ToTy) const |
Return true if it's free to truncate a value of type FromTy to type ToTy. | |
virtual bool | allowTruncateForTailCall (Type *FromTy, Type *ToTy) const |
Return true if a truncation from FromTy to ToTy is permitted when deciding whether a call is in tail position. | |
virtual bool | isTruncateFree (EVT FromVT, EVT ToVT) const |
virtual bool | isTruncateFree (LLT FromTy, LLT ToTy, const DataLayout &DL, LLVMContext &Ctx) const |
virtual bool | isTruncateFree (SDValue Val, EVT VT2) const |
Return true if truncating the specific node Val to type VT2 is free. | |
virtual bool | isProfitableToHoist (Instruction *I) const |
bool | isExtFree (const Instruction *I) const |
Return true if the extension represented by I is free. | |
bool | isExtLoad (const LoadInst *Load, const Instruction *Ext, const DataLayout &DL) const |
Return true if Load and Ext can form an ExtLoad. | |
virtual bool | isZExtFree (Type *FromTy, Type *ToTy) const |
Return true if any actual instruction that defines a value of type FromTy implicitly zero-extends the value to ToTy in the result register. | |
virtual bool | isZExtFree (EVT FromTy, EVT ToTy) const |
virtual bool | isZExtFree (LLT FromTy, LLT ToTy, const DataLayout &DL, LLVMContext &Ctx) const |
virtual bool | isZExtFree (SDValue Val, EVT VT2) const |
Return true if zero-extending the specific node Val to type VT2 is free (either because it's implicitly zero-extended such as ARM ldrb / ldrh or because it's folded such as X86 zero-extending loads). | |
virtual bool | isSExtCheaperThanZExt (EVT FromTy, EVT ToTy) const |
Return true if sign-extension from FromTy to ToTy is cheaper than zero-extension. | |
virtual bool | signExtendConstant (const ConstantInt *C) const |
Return true if this constant should be sign extended when promoting to a larger type. | |
virtual bool | shouldSinkOperands (Instruction *I, SmallVectorImpl< Use * > &Ops) const |
Return true if sinking I's operands to the same basic block as I is profitable, e.g. | |
virtual bool | optimizeExtendOrTruncateConversion (Instruction *I, Loop *L, const TargetTransformInfo &TTI) const |
Try to optimize extending or truncating conversion instructions (like zext, trunc, fptoui, uitofp) for the target. | |
virtual bool | hasPairedLoad (EVT, Align &) const |
Return true if the target supplies and combines to a paired load two loaded values of type LoadedType next to each other in memory. | |
virtual bool | hasVectorBlend () const |
Return true if the target has a vector blend instruction. | |
virtual unsigned | getMaxSupportedInterleaveFactor () const |
Get the maximum supported factor for interleaved memory accesses. | |
virtual bool | lowerInterleavedLoad (LoadInst *LI, ArrayRef< ShuffleVectorInst * > Shuffles, ArrayRef< unsigned > Indices, unsigned Factor) const |
Lower an interleaved load to target specific intrinsics. | |
virtual bool | lowerInterleavedStore (StoreInst *SI, ShuffleVectorInst *SVI, unsigned Factor) const |
Lower an interleaved store to target specific intrinsics. | |
virtual bool | lowerDeinterleaveIntrinsicToLoad (IntrinsicInst *DI, LoadInst *LI, SmallVectorImpl< Instruction * > &DeadInsts) const |
Lower a deinterleave intrinsic to a target specific load intrinsic. | |
virtual bool | lowerInterleaveIntrinsicToStore (IntrinsicInst *II, StoreInst *SI, SmallVectorImpl< Instruction * > &DeadInsts) const |
Lower an interleave intrinsic to a target specific store intrinsic. | |
virtual bool | isFPExtFree (EVT DestVT, EVT SrcVT) const |
Return true if an fpext operation is free (for instance, because single-precision floating-point numbers are implicitly extended to double-precision). | |
virtual bool | isFPExtFoldable (const MachineInstr &MI, unsigned Opcode, LLT DestTy, LLT SrcTy) const |
Return true if an fpext operation input to an Opcode operation is free (for instance, because half-precision floating-point numbers are implicitly extended to float-precision) for an FMA instruction. | |
virtual bool | isFPExtFoldable (const SelectionDAG &DAG, unsigned Opcode, EVT DestVT, EVT SrcVT) const |
Return true if an fpext operation input to an Opcode operation is free (for instance, because half-precision floating-point numbers are implicitly extended to float-precision) for an FMA instruction. | |
virtual bool | isVectorLoadExtDesirable (SDValue ExtVal) const |
Return true if folding a vector load into ExtVal (a sign, zero, or any extend node) is profitable. | |
virtual bool | isFNegFree (EVT VT) const |
Return true if an fneg operation is free to the point where it is never worthwhile to replace it with a bitwise operation. | |
virtual bool | isFAbsFree (EVT VT) const |
Return true if an fabs operation is free to the point where it is never worthwhile to replace it with a bitwise operation. | |
virtual bool | isFMAFasterThanFMulAndFAdd (const MachineFunction &MF, EVT) const |
Return true if an FMA operation is faster than a pair of fmul and fadd instructions. | |
virtual bool | isFMAFasterThanFMulAndFAdd (const MachineFunction &MF, LLT) const |
Return true if an FMA operation is faster than a pair of fmul and fadd instructions. | |
virtual bool | isFMAFasterThanFMulAndFAdd (const Function &F, Type *) const |
IR version. | |
virtual bool | isFMADLegal (const MachineInstr &MI, LLT Ty) const |
Returns true if MI can be combined with another instruction to form TargetOpcode::G_FMAD. | |
virtual bool | isFMADLegal (const SelectionDAG &DAG, const SDNode *N) const |
Returns true if be combined with to form an ISD::FMAD. | |
virtual bool | generateFMAsInMachineCombiner (EVT VT, CodeGenOptLevel OptLevel) const |
virtual bool | isNarrowingProfitable (EVT SrcVT, EVT DestVT) const |
Return true if it's profitable to narrow operations of type SrcVT to DestVT. | |
virtual bool | shouldFoldSelectWithIdentityConstant (unsigned BinOpcode, EVT VT) const |
Return true if pulling a binary operation into a select with an identity constant is profitable. | |
virtual bool | shouldConvertConstantLoadToIntImm (const APInt &Imm, Type *Ty) const |
Return true if it is beneficial to convert a load of a constant to just the constant itself. | |
virtual bool | isExtractSubvectorCheap (EVT ResVT, EVT SrcVT, unsigned Index) const |
Return true if EXTRACT_SUBVECTOR is cheap for extracting this result type from this source type with this index. | |
virtual bool | shouldScalarizeBinop (SDValue VecOp) const |
Try to convert an extract element of a vector binary operation into an extract element followed by a scalar operation. | |
virtual bool | isExtractVecEltCheap (EVT VT, unsigned Index) const |
Return true if extraction of a scalar element from the given vector type at the given index is cheap. | |
virtual bool | shouldFormOverflowOp (unsigned Opcode, EVT VT, bool MathUsed) const |
Try to convert math with an overflow comparison into the corresponding DAG node operation. | |
virtual bool | aggressivelyPreferBuildVectorSources (EVT VecVT) const |
virtual bool | shouldConsiderGEPOffsetSplit () const |
virtual bool | shouldAvoidTransformToShift (EVT VT, unsigned Amount) const |
Return true if creating a shift of the type by the given amount is not profitable. | |
virtual bool | shouldFoldSelectWithSingleBitTest (EVT VT, const APInt &AndMask) const |
virtual bool | shouldKeepZExtForFP16Conv () const |
Does this target require the clearing of high-order bits in a register passed to the fp16 to fp conversion library function. | |
virtual bool | shouldConvertFpToSat (unsigned Op, EVT FPVT, EVT VT) const |
Should we generate fp_to_si_sat and fp_to_ui_sat from type FPVT to type VT from min(max(fptoi)) saturation patterns. | |
virtual bool | shouldExpandCmpUsingSelects () const |
Should we expand [US]CMP nodes using two selects and two compares, or by doing arithmetic on boolean types. | |
virtual bool | isComplexDeinterleavingSupported () const |
Does this target support complex deinterleaving. | |
virtual bool | isComplexDeinterleavingOperationSupported (ComplexDeinterleavingOperation Operation, Type *Ty) const |
Does this target support complex deinterleaving with the given operation and type. | |
virtual Value * | createComplexDeinterleavingIR (IRBuilderBase &B, ComplexDeinterleavingOperation OperationType, ComplexDeinterleavingRotation Rotation, Value *InputA, Value *InputB, Value *Accumulator=nullptr) const |
Create the IR node for the given complex deinterleaving operation. | |
void | setLibcallName (RTLIB::Libcall Call, const char *Name) |
Rename the default libcall routine name for the specified libcall. | |
void | setLibcallName (ArrayRef< RTLIB::Libcall > Calls, const char *Name) |
const char * | getLibcallName (RTLIB::Libcall Call) const |
Get the libcall routine name for the specified libcall. | |
void | setCmpLibcallCC (RTLIB::Libcall Call, ISD::CondCode CC) |
Override the default CondCode to be used to test the result of the comparison libcall against zero. | |
ISD::CondCode | getCmpLibcallCC (RTLIB::Libcall Call) const |
Get the CondCode that's to be used to test the result of the comparison libcall against zero. | |
void | setLibcallCallingConv (RTLIB::Libcall Call, CallingConv::ID CC) |
Set the CallingConv that should be used for the specified libcall. | |
CallingConv::ID | getLibcallCallingConv (RTLIB::Libcall Call) const |
Get the CallingConv that should be used for the specified libcall. | |
virtual void | finalizeLowering (MachineFunction &MF) const |
Execute target specific actions to finalize target lowering. | |
virtual bool | shouldLocalize (const MachineInstr &MI, const TargetTransformInfo *TTI) const |
Check whether or not MI needs to be moved close to its uses. | |
int | InstructionOpcodeToISD (unsigned Opcode) const |
Get the ISD node that corresponds to the Instruction class opcode. | |
unsigned | getMaxAtomicSizeInBitsSupported () const |
Returns the maximum atomic operation size (in bits) supported by the backend. | |
unsigned | getMaxDivRemBitWidthSupported () const |
Returns the size in bits of the maximum div/rem the backend supports. | |
unsigned | getMaxLargeFPConvertBitWidthSupported () const |
Returns the size in bits of the maximum larget fp convert the backend supports. | |
unsigned | getMinCmpXchgSizeInBits () const |
Returns the size of the smallest cmpxchg or ll/sc instruction the backend supports. | |
bool | supportsUnalignedAtomics () const |
Whether the target supports unaligned atomic operations. | |
virtual bool | shouldInsertFencesForAtomic (const Instruction *I) const |
Whether AtomicExpandPass should automatically insert fences and reduce ordering for this atomic. | |
virtual bool | shouldInsertTrailingFenceForAtomicStore (const Instruction *I) const |
Whether AtomicExpandPass should automatically insert a trailing fence without reducing the ordering for this atomic. | |
virtual Value * | emitLoadLinked (IRBuilderBase &Builder, Type *ValueTy, Value *Addr, AtomicOrdering Ord) const |
Perform a load-linked operation on Addr, returning a "Value *" with the corresponding pointee type. | |
virtual Value * | emitStoreConditional (IRBuilderBase &Builder, Value *Val, Value *Addr, AtomicOrdering Ord) const |
Perform a store-conditional operation to Addr. | |
virtual Value * | emitMaskedAtomicRMWIntrinsic (IRBuilderBase &Builder, AtomicRMWInst *AI, Value *AlignedAddr, Value *Incr, Value *Mask, Value *ShiftAmt, AtomicOrdering Ord) const |
Perform a masked atomicrmw using a target-specific intrinsic. | |
virtual void | emitExpandAtomicRMW (AtomicRMWInst *AI) const |
Perform a atomicrmw expansion using a target-specific way. | |
virtual Value * | emitMaskedAtomicCmpXchgIntrinsic (IRBuilderBase &Builder, AtomicCmpXchgInst *CI, Value *AlignedAddr, Value *CmpVal, Value *NewVal, Value *Mask, AtomicOrdering Ord) const |
Perform a masked cmpxchg using a target-specific intrinsic. | |
virtual Instruction * | emitLeadingFence (IRBuilderBase &Builder, Instruction *Inst, AtomicOrdering Ord) const |
Inserts in the IR a target-specific intrinsic specifying a fence. | |
virtual Instruction * | emitTrailingFence (IRBuilderBase &Builder, Instruction *Inst, AtomicOrdering Ord) const |
Protected Member Functions | |
std::pair< const TargetRegisterClass *, uint8_t > | findRepresentativeClass (const TargetRegisterInfo *TRI, MVT VT) const override |
Return the largest legal super-reg register class of the register class for the specified type and its associated "cost". | |
Protected Member Functions inherited from llvm::TargetLoweringBase | |
void | initActions () |
Initialize all of the actions to default values. | |
Value * | getDefaultSafeStackPointerLocation (IRBuilderBase &IRB, bool UseTLS) const |
void | setBooleanContents (BooleanContent Ty) |
Specify how the target extends the result of integer and floating point boolean values from i1 to a wider type. | |
void | setBooleanContents (BooleanContent IntTy, BooleanContent FloatTy) |
Specify how the target extends the result of integer and floating point boolean values from i1 to a wider type. | |
void | setBooleanVectorContents (BooleanContent Ty) |
Specify how the target extends the result of a vector boolean value from a vector of i1 to a wider type. | |
void | setSchedulingPreference (Sched::Preference Pref) |
Specify the target scheduling preference. | |
void | setMinimumJumpTableEntries (unsigned Val) |
Indicate the minimum number of blocks to generate jump tables. | |
void | setMaximumJumpTableSize (unsigned) |
Indicate the maximum number of entries in jump tables. | |
void | setStackPointerRegisterToSaveRestore (Register R) |
If set to a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save and restore. | |
void | setHasMultipleConditionRegisters (bool hasManyRegs=true) |
Tells the code generator that the target has multiple (allocatable) condition registers that can be used to store the results of comparisons for use by selects and conditional branches. | |
void | setHasExtractBitsInsn (bool hasExtractInsn=true) |
Tells the code generator that the target has BitExtract instructions. | |
void | setJumpIsExpensive (bool isExpensive=true) |
Tells the code generator not to expand logic operations on comparison predicates into separate sequences that increase the amount of flow control. | |
void | addBypassSlowDiv (unsigned int SlowBitWidth, unsigned int FastBitWidth) |
Tells the code generator which bitwidths to bypass. | |
void | addRegisterClass (MVT VT, const TargetRegisterClass *RC) |
Add the specified register class as an available regclass for the specified value type. | |
virtual std::pair< const TargetRegisterClass *, uint8_t > | findRepresentativeClass (const TargetRegisterInfo *TRI, MVT VT) const |
Return the largest legal super-reg register class of the register class for the specified type and its associated "cost". | |
void | computeRegisterProperties (const TargetRegisterInfo *TRI) |
Once all of the register classes are added, this allows us to compute derived properties we expose. | |
void | setOperationAction (unsigned Op, MVT VT, LegalizeAction Action) |
Indicate that the specified operation does not work with the specified type and indicate what to do about it. | |
void | setOperationAction (ArrayRef< unsigned > Ops, MVT VT, LegalizeAction Action) |
void | setOperationAction (ArrayRef< unsigned > Ops, ArrayRef< MVT > VTs, LegalizeAction Action) |
void | setLoadExtAction (unsigned ExtType, MVT ValVT, MVT MemVT, LegalizeAction Action) |
Indicate that the specified load with extension does not work with the specified type and indicate what to do about it. | |
void | setLoadExtAction (ArrayRef< unsigned > ExtTypes, MVT ValVT, MVT MemVT, LegalizeAction Action) |
void | setLoadExtAction (ArrayRef< unsigned > ExtTypes, MVT ValVT, ArrayRef< MVT > MemVTs, LegalizeAction Action) |
void | setAtomicLoadExtAction (unsigned ExtType, MVT ValVT, MVT MemVT, LegalizeAction Action) |
Let target indicate that an extending atomic load of the specified type is legal. | |
void | setAtomicLoadExtAction (ArrayRef< unsigned > ExtTypes, MVT ValVT, MVT MemVT, LegalizeAction Action) |
void | setAtomicLoadExtAction (ArrayRef< unsigned > ExtTypes, MVT ValVT, ArrayRef< MVT > MemVTs, LegalizeAction Action) |
void | setTruncStoreAction (MVT ValVT, MVT MemVT, LegalizeAction Action) |
Indicate that the specified truncating store does not work with the specified type and indicate what to do about it. | |
void | setIndexedLoadAction (ArrayRef< unsigned > IdxModes, MVT VT, LegalizeAction Action) |
Indicate that the specified indexed load does or does not work with the specified type and indicate what to do abort it. | |
void | setIndexedLoadAction (ArrayRef< unsigned > IdxModes, ArrayRef< MVT > VTs, LegalizeAction Action) |
void | setIndexedStoreAction (ArrayRef< unsigned > IdxModes, MVT VT, LegalizeAction Action) |
Indicate that the specified indexed store does or does not work with the specified type and indicate what to do about it. | |
void | setIndexedStoreAction (ArrayRef< unsigned > IdxModes, ArrayRef< MVT > VTs, LegalizeAction Action) |
void | setIndexedMaskedLoadAction (unsigned IdxMode, MVT VT, LegalizeAction Action) |
Indicate that the specified indexed masked load does or does not work with the specified type and indicate what to do about it. | |
void | setIndexedMaskedStoreAction (unsigned IdxMode, MVT VT, LegalizeAction Action) |
Indicate that the specified indexed masked store does or does not work with the specified type and indicate what to do about it. | |
void | setCondCodeAction (ArrayRef< ISD::CondCode > CCs, MVT VT, LegalizeAction Action) |
Indicate that the specified condition code is or isn't supported on the target and indicate what to do about it. | |
void | setCondCodeAction (ArrayRef< ISD::CondCode > CCs, ArrayRef< MVT > VTs, LegalizeAction Action) |
void | AddPromotedToType (unsigned Opc, MVT OrigVT, MVT DestVT) |
If Opc/OrigVT is specified as being promoted, the promotion code defaults to trying a larger integer/fp until it can find one that works. | |
void | setOperationPromotedToType (unsigned Opc, MVT OrigVT, MVT DestVT) |
Convenience method to set an operation to Promote and specify the type in a single call. | |
void | setOperationPromotedToType (ArrayRef< unsigned > Ops, MVT OrigVT, MVT DestVT) |
void | setTargetDAGCombine (ArrayRef< ISD::NodeType > NTs) |
Targets should invoke this method for each target independent node that they want to provide a custom DAG combiner for by implementing the PerformDAGCombine virtual method. | |
void | setMinFunctionAlignment (Align Alignment) |
Set the target's minimum function alignment. | |
void | setPrefFunctionAlignment (Align Alignment) |
Set the target's preferred function alignment. | |
void | setPrefLoopAlignment (Align Alignment) |
Set the target's preferred loop alignment. | |
void | setMaxBytesForAlignment (unsigned MaxBytes) |
void | setMinStackArgumentAlignment (Align Alignment) |
Set the minimum stack alignment of an argument. | |
void | setMaxAtomicSizeInBitsSupported (unsigned SizeInBits) |
Set the maximum atomic operation size supported by the backend. | |
void | setMaxDivRemBitWidthSupported (unsigned SizeInBits) |
Set the size in bits of the maximum div/rem the backend supports. | |
void | setMaxLargeFPConvertBitWidthSupported (unsigned SizeInBits) |
Set the size in bits of the maximum fp convert the backend supports. | |
void | setMinCmpXchgSizeInBits (unsigned SizeInBits) |
Sets the minimum cmpxchg or ll/sc size supported by the backend. | |
void | setSupportsUnalignedAtomics (bool UnalignedSupported) |
Sets whether unaligned atomic operations are supported. | |
virtual bool | isExtFreeImpl (const Instruction *I) const |
Return true if the extension represented by I is free. | |
bool | isLegalRC (const TargetRegisterInfo &TRI, const TargetRegisterClass &RC) const |
Return true if the value types that can be represented by the specified register class are all legal. | |
MachineBasicBlock * | emitPatchPoint (MachineInstr &MI, MachineBasicBlock *MBB) const |
Replace/modify any TargetFrameIndex operands with a targte-dependent sequence of memory operands that is recognized by PrologEpilogInserter. | |
Additional Inherited Members | |
Public Types inherited from llvm::TargetLowering | |
enum | ConstraintType { C_Register , C_RegisterClass , C_Memory , C_Address , C_Immediate , C_Other , C_Unknown } |
enum | ConstraintWeight { CW_Invalid = -1 , CW_Okay = 0 , CW_Good = 1 , CW_Better = 2 , CW_Best = 3 , CW_SpecificReg = CW_Okay , CW_Register = CW_Good , CW_Memory = CW_Better , CW_Constant = CW_Best , CW_Default = CW_Okay } |
using | AsmOperandInfoVector = std::vector< AsmOperandInfo > |
using | ConstraintPair = std::pair< StringRef, TargetLowering::ConstraintType > |
using | ConstraintGroup = SmallVector< ConstraintPair > |
Public Types inherited from llvm::TargetLoweringBase | |
enum | LegalizeAction : uint8_t { Legal , Promote , Expand , LibCall , Custom } |
This enum indicates whether operations are valid for a target, and if not, what action should be used to make them valid. More... | |
enum | LegalizeTypeAction : uint8_t { TypeLegal , TypePromoteInteger , TypeExpandInteger , TypeSoftenFloat , TypeExpandFloat , TypeScalarizeVector , TypeSplitVector , TypeWidenVector , TypePromoteFloat , TypeSoftPromoteHalf , TypeScalarizeScalableVector } |
This enum indicates whether a types are legal for a target, and if not, what action should be used to make them valid. More... | |
enum | BooleanContent { UndefinedBooleanContent , ZeroOrOneBooleanContent , ZeroOrNegativeOneBooleanContent } |
Enum that describes how the target represents true/false values. More... | |
enum | SelectSupportKind { ScalarValSelect , ScalarCondVectorVal , VectorMaskSelect } |
Enum that describes what type of support for selects the target has. More... | |
enum class | AtomicExpansionKind { None , CastToInteger , LLSC , LLOnly , CmpXChg , MaskedIntrinsic , BitTestIntrinsic , CmpArithIntrinsic , Expand , NotAtomic } |
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all. More... | |
enum class | MulExpansionKind { Always , OnlyLegalOrCustom } |
Enum that specifies when a multiplication should be expanded. More... | |
enum class | NegatibleCost { Cheaper = 0 , Neutral = 1 , Expensive = 2 } |
Enum that specifies when a float negation is beneficial. More... | |
enum | AndOrSETCCFoldKind : uint8_t { None = 0 , AddAnd = 1 , NotAnd = 2 , ABS = 4 } |
Enum of different potentially desirable ways to fold (and/or (setcc ...), (setcc ...)). More... | |
enum | ReciprocalEstimate : int { Unspecified = -1 , Disabled = 0 , Enabled = 1 } |
Reciprocal estimate status values used by the functions below. More... | |
enum class | ShiftLegalizationStrategy { ExpandToParts , ExpandThroughStack , LowerToLibcall } |
Return the preferred strategy to legalize tihs SHIFT instruction, with ExpansionFactor being the recursion depth - how many expansion needed. More... | |
using | LegalizeKind = std::pair< LegalizeTypeAction, EVT > |
LegalizeKind holds the legalization kind that needs to happen to EVT in order to type-legalize it. | |
using | ArgListTy = std::vector< ArgListEntry > |
Static Public Member Functions inherited from llvm::TargetLoweringBase | |
static ISD::NodeType | getExtendForContent (BooleanContent Content) |
Protected Attributes inherited from llvm::TargetLoweringBase | |
unsigned | GatherAllAliasesMaxDepth |
Depth that GatherAllAliases should continue looking for chain dependencies when trying to find a more preferable chain. | |
unsigned | MaxStoresPerMemset |
Specify maximum number of store instructions per memset call. | |
unsigned | MaxStoresPerMemsetOptSize |
Likewise for functions with the OptSize attribute. | |
unsigned | MaxStoresPerMemcpy |
Specify maximum number of store instructions per memcpy call. | |
unsigned | MaxStoresPerMemcpyOptSize |
Likewise for functions with the OptSize attribute. | |
unsigned | MaxGluedStoresPerMemcpy = 0 |
Specify max number of store instructions to glue in inlined memcpy. | |
unsigned | MaxLoadsPerMemcmp |
Specify maximum number of load instructions per memcmp call. | |
unsigned | MaxLoadsPerMemcmpOptSize |
Likewise for functions with the OptSize attribute. | |
unsigned | MaxStoresPerMemmove |
Specify maximum number of store instructions per memmove call. | |
unsigned | MaxStoresPerMemmoveOptSize |
Likewise for functions with the OptSize attribute. | |
bool | PredictableSelectIsExpensive |
Tells the code generator that select is more expensive than a branch if the branch is usually predicted right. | |
bool | EnableExtLdPromotion |
bool | IsStrictFPEnabled |
Definition at line 1025 of file X86ISelLowering.h.
|
explicit |
Definition at line 127 of file X86ISelLowering.cpp.
References llvm::ISD::ABDS, llvm::ISD::ABDU, llvm::ISD::ABS, llvm::ISD::ADD, llvm::TargetLoweringBase::addBypassSlowDiv(), llvm::TargetLoweringBase::addRegisterClass(), llvm::ISD::ADDRSPACECAST, llvm::ISD::ADJUST_TRAMPOLINE, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, assert(), llvm::ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, llvm::ISD::ATOMIC_FENCE, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_STORE, llvm::ISD::AVGCEILS, llvm::ISD::AVGCEILU, llvm::ISD::AVGFLOORS, llvm::ISD::AVGFLOORU, llvm::ISD::BF16_TO_FP, llvm::APFloatBase::BFloat(), llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BlockAddress, llvm::ISD::BR_CC, llvm::ISD::BR_JT, llvm::ISD::BRCOND, llvm::ISD::BSWAP, llvm::ISD::BUILD_VECTOR, llvm::X86Subtarget::canUseCMOV(), llvm::X86Subtarget::canUseCMPXCHG16B(), llvm::X86Subtarget::canUseCMPXCHG8B(), CC, llvm::APFloat::changeSign(), llvm::ISD::CLEAR_CACHE, llvm::TargetLoweringBase::computeRegisterProperties(), llvm::ISD::CONCAT_VECTORS, llvm::ISD::ConstantPool, llvm::APFloat::convert(), llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::TargetLoweringBase::Custom, llvm::ISD::DEBUGTRAP, llvm::Default, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::EH_LABEL, llvm::ISD::EH_RETURN, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::ISD::EH_SJLJ_SETUP_DISPATCH, llvm::TargetLoweringBase::EnableExtLdPromotion, llvm::TargetLoweringBase::Expand, llvm::ISD::ExternalSymbol, llvm::ISD::EXTLOAD, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FABS, llvm::ISD::FACOS, llvm::ISD::FADD, llvm::ISD::FASIN, llvm::ISD::FATAN, llvm::ISD::FCEIL, llvm::ISD::FCOPYSIGN, llvm::ISD::FCOS, llvm::ISD::FCOSH, llvm::ISD::FDIV, llvm::ISD::FEXP, llvm::ISD::FEXP10, llvm::ISD::FEXP2, llvm::ISD::FFLOOR, llvm::ISD::FFREXP, llvm::ISD::FGETSIGN, llvm::MVT::fixedlen_vector_valuetypes(), llvm::ISD::FLDEXP, llvm::ISD::FLOG, llvm::ISD::FLOG10, llvm::ISD::FLOG2, llvm::ISD::FMA, llvm::ISD::FMAXIMUM, llvm::ISD::FMAXNUM, llvm::ISD::FMINIMUM, llvm::ISD::FMINNUM, llvm::ISD::FMUL, llvm::ISD::FNEARBYINT, llvm::ISD::FNEG, llvm::ISD::FP16_TO_FP, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_BF16, llvm::ISD::FP_TO_FP16, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_SINT_SAT, llvm::ISD::FP_TO_UINT, llvm::ISD::FP_TO_UINT_SAT, llvm::ISD::FPOW, llvm::ISD::FRAME_TO_ARGS_OFFSET, llvm::ISD::FREM, llvm::ISD::FRINT, llvm::ISD::FROUND, llvm::ISD::FROUNDEVEN, llvm::ISD::FSHL, llvm::ISD::FSHR, llvm::ISD::FSIN, llvm::ISD::FSINCOS, llvm::ISD::FSINH, llvm::ISD::FSQRT, llvm::ISD::FSUB, llvm::ISD::FTAN, llvm::ISD::FTANH, llvm::ISD::FTRUNC, llvm::ISD::GC_TRANSITION_END, llvm::ISD::GC_TRANSITION_START, llvm::ISD::GET_FPENV_MEM, llvm::ISD::GET_ROUNDING, llvm::MVT::getIntegerVT(), llvm::TargetLoweringBase::getLibcallName(), llvm::TargetLoweringBase::getRegClassFor(), llvm::X86Subtarget::getRegisterInfo(), llvm::X86RegisterInfo::getStackRegister(), llvm::MVT::getVectorElementType(), llvm::APFloat::getZero(), llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::X86Subtarget::hasAnyFMA(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasInt256(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), llvm::X86Subtarget::hasSSE42(), llvm::X86Subtarget::hasSSEPrefetch(), llvm::X86Subtarget::hasSSSE3(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::IEEEquad(), ignored(), llvm::Sched::ILP, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::MVT::integer_valuetypes(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::TargetLoweringBase::isOperationCustom(), llvm::TargetLoweringBase::isOperationExpand(), llvm::X86Subtarget::isOSWindows(), llvm::TargetLoweringBase::IsStrictFPEnabled, llvm::X86Subtarget::isTargetCygMing(), llvm::X86Subtarget::isTargetDarwin(), llvm::X86Subtarget::isTargetELF(), llvm::X86Subtarget::isTargetPS(), llvm::X86Subtarget::isTargetWin64(), llvm::X86Subtarget::isTargetWindowsItanium(), llvm::X86Subtarget::isTargetWindowsMSVC(), llvm::TargetLoweringBase::isTypeLegal(), llvm::ISD::JumpTable, llvm::IRSimilarity::Legal, llvm::TargetLoweringBase::LibCall, llvm::ISD::LLRINT, llvm::ISD::LLROUND, llvm::ISD::LOAD, llvm::ISD::LRINT, llvm::ISD::LROUND, llvm::TargetLoweringBase::MaxLoadsPerMemcmp, llvm::TargetLoweringBase::MaxLoadsPerMemcmpOptSize, llvm::TargetLoweringBase::MaxStoresPerMemcpy, llvm::TargetLoweringBase::MaxStoresPerMemcpyOptSize, llvm::TargetLoweringBase::MaxStoresPerMemmove, llvm::TargetLoweringBase::MaxStoresPerMemmoveOptSize, llvm::TargetLoweringBase::MaxStoresPerMemset, llvm::TargetLoweringBase::MaxStoresPerMemsetOptSize, llvm::ISD::MGATHER, llvm::ISD::MLOAD, llvm::ISD::MSCATTER, llvm::ISD::MSTORE, llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, Name, llvm::ISD::OR, llvm::ISD::PARITY, llvm::TargetLoweringBase::PredictableSelectIsExpensive, llvm::ISD::PREFETCH, llvm::TargetLoweringBase::Promote, llvm::ISD::READCYCLECOUNTER, llvm::Sched::RegPressure, llvm::ISD::RESET_FPENV, llvm::APFloatBase::rmNearestTiesToEven, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SADDO, llvm::ISD::SADDO_CARRY, llvm::ISD::SADDSAT, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SDIV, llvm::ISD::SDIVREM, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SET_FPENV_MEM, llvm::ISD::SET_ROUNDING, llvm::TargetLoweringBase::setBooleanContents(), llvm::TargetLoweringBase::setBooleanVectorContents(), llvm::ISD::SETCC, llvm::ISD::SETCCCARRY, llvm::TargetLoweringBase::setCondCodeAction(), llvm::ISD::SETLE, llvm::TargetLoweringBase::setLibcallCallingConv(), llvm::TargetLoweringBase::setLibcallName(), llvm::TargetLoweringBase::setLoadExtAction(), llvm::ISD::SETLT, llvm::TargetLoweringBase::setMaxAtomicSizeInBitsSupported(), llvm::TargetLoweringBase::setMaxDivRemBitWidthSupported(), llvm::TargetLoweringBase::setMaxLargeFPConvertBitWidthSupported(), llvm::ISD::SETOEQ, llvm::TargetLoweringBase::setOperationAction(), llvm::TargetLoweringBase::setOperationPromotedToType(), llvm::TargetLoweringBase::setPrefFunctionAlignment(), llvm::TargetLoweringBase::setPrefLoopAlignment(), llvm::TargetLoweringBase::setSchedulingPreference(), llvm::TargetLoweringBase::setStackPointerRegisterToSaveRestore(), llvm::TargetLoweringBase::setTargetDAGCombine(), llvm::TargetLoweringBase::setTruncStoreAction(), llvm::ISD::SETUNE, llvm::ISD::SEXTLOAD, llvm::ISD::SHL, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::ISD::SINT_TO_FP, llvm::SjLj, llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::SMUL_LOHI, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SRA_PARTS, llvm::ISD::SREM, llvm::ISD::SRL, llvm::ISD::SRL_PARTS, llvm::ISD::SSUBO, llvm::ISD::SSUBO_CARRY, llvm::ISD::SSUBSAT, llvm::ISD::STACKRESTORE, llvm::ISD::STACKSAVE, llvm::ISD::STORE, llvm::ISD::STRICT_BF16_TO_FP, llvm::ISD::STRICT_FACOS, llvm::ISD::STRICT_FADD, llvm::ISD::STRICT_FASIN, llvm::ISD::STRICT_FATAN, llvm::ISD::STRICT_FCEIL, llvm::ISD::STRICT_FCOS, llvm::ISD::STRICT_FCOSH, llvm::ISD::STRICT_FDIV, llvm::ISD::STRICT_FEXP, llvm::ISD::STRICT_FEXP2, llvm::ISD::STRICT_FFLOOR, llvm::ISD::STRICT_FLDEXP, llvm::ISD::STRICT_FLOG, llvm::ISD::STRICT_FLOG10, llvm::ISD::STRICT_FLOG2, llvm::ISD::STRICT_FMA, llvm::ISD::STRICT_FMAXIMUM, llvm::ISD::STRICT_FMAXNUM, llvm::ISD::STRICT_FMINIMUM, llvm::ISD::STRICT_FMINNUM, llvm::ISD::STRICT_FMUL, llvm::ISD::STRICT_FNEARBYINT, llvm::ISD::STRICT_FP16_TO_FP, llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FP_TO_BF16, llvm::ISD::STRICT_FP_TO_FP16, llvm::ISD::STRICT_FP_TO_SINT, llvm::ISD::STRICT_FP_TO_UINT, llvm::ISD::STRICT_FPOW, llvm::ISD::STRICT_FREM, llvm::ISD::STRICT_FRINT, llvm::ISD::STRICT_FROUND, llvm::ISD::STRICT_FROUNDEVEN, llvm::ISD::STRICT_FSETCC, llvm::ISD::STRICT_FSETCCS, llvm::ISD::STRICT_FSIN, llvm::ISD::STRICT_FSINH, llvm::ISD::STRICT_FSQRT, llvm::ISD::STRICT_FSUB, llvm::ISD::STRICT_FTAN, llvm::ISD::STRICT_FTANH, llvm::ISD::STRICT_FTRUNC, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::ISD::SUB, llvm::ISD::TRAP, llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UADDO_CARRY, llvm::ISD::UADDSAT, llvm::ISD::UBSANTRAP, llvm::ISD::UDIV, llvm::ISD::UDIVREM, llvm::ISD::UINT_TO_FP, llvm::ISD::UMAX, llvm::ISD::UMIN, llvm::ISD::UMUL_LOHI, llvm::ISD::UMULO, llvm::ISD::UNDEF, llvm::ISD::UREM, llvm::X86Subtarget::useAVX512Regs(), llvm::ISD::USUBO, llvm::ISD::USUBO_CARRY, llvm::ISD::USUBSAT, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VAEND, llvm::ISD::VASTART, llvm::ISD::VECTOR_SHUFFLE, llvm::verifyIntrinsicTables(), llvm::ISD::VSELECT, llvm::CallingConv::X86_StdCall, llvm::APFloatBase::x87DoubleExtended(), llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, llvm::ISD::ZERO_EXTEND_VECTOR_INREG, llvm::TargetLoweringBase::ZeroOrNegativeOneBooleanContent, llvm::TargetLoweringBase::ZeroOrOneBooleanContent, and llvm::ISD::ZEXTLOAD.
|
overridevirtual |
Returns true if the targets addressing mode can target thread local storage (TLS).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 18990 of file X86ISelLowering.cpp.
References llvm::TLSModel::GeneralDynamic, llvm::TargetLoweringBase::getTargetMachine(), llvm::TLSModel::InitialExec, llvm::X86Subtarget::isTargetELF(), llvm::TLSModel::LocalDynamic, and llvm::TLSModel::LocalExec.
|
inline |
Definition at line 1088 of file X86ISelLowering.h.
References allowsMemoryAccess(), DL, llvm::CallingConv::Fast, llvm::MachineMemOperand::getAddrSpace(), llvm::MachineMemOperand::getAlign(), and llvm::MachineMemOperand::getFlags().
|
overridevirtual |
This function returns true if the memory access is aligned or if the target allows this specific unaligned memory access.
If the access is allowed, the optional final parameter returns a relative speed of the access (as defined by the target).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 374 of file X86ISelLoweringCall.cpp.
References allowsMisalignedMemoryAccesses(), llvm::CallingConv::Fast, llvm::EVT::getSizeInBits(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX2(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), isBitAligned(), isMemoryAccessFast(), llvm::EVT::isVector(), llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MONonTemporal, and llvm::MachineMemOperand::MOStore.
Referenced by allowsMemoryAccess(), and combineConcatVectorOps().
|
overridevirtual |
Returns true if the target allows unaligned memory accesses of the specified type.
Returns whether it is "fast" in the last argument.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 355 of file X86ISelLoweringCall.cpp.
References llvm::CallingConv::Fast, llvm::X86Subtarget::hasSSE41(), isMemoryAccessFast(), llvm::EVT::isVector(), llvm::MachineMemOperand::MOLoad, and llvm::MachineMemOperand::MONonTemporal.
Referenced by allowsMemoryAccess().
|
overridevirtual |
Return true if a truncation from FromTy to ToTy is permitted when deciding whether a call is in tail position.
Typically this means that both results would be assigned to the same register or stack slot, but it could mean the target performs adequate checks of its own before proceeding with the tail call. Targets must return false when FromTy <= ToTy.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34279 of file X86ISelLowering.cpp.
References assert(), llvm::EVT::getEVT(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::isIntegerTy(), and llvm::TargetLoweringBase::isTypeLegal().
Returns true if lowering to a jump table is allowed.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34499 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::areJTsAllowed(), and llvm::X86Subtarget::useIndirectThunkBranches().
std::pair< SDValue, SDValue > X86TargetLowering::BuildFILD | ( | EVT | DstVT, |
EVT | SrcVT, | ||
const SDLoc & | DL, | ||
SDValue | Chain, | ||
SDValue | Pointer, | ||
MachinePointerInfo | PtrInfo, | ||
Align | Alignment, | ||
SelectionDAG & | DAG | ||
) | const |
Definition at line 19442 of file X86ISelLowering.cpp.
References llvm::MachineFrameInfo::CreateStackObject(), DL, llvm::X86ISD::FILD, llvm::X86ISD::FST, llvm::MachineFunction::getDataLayout(), llvm::MachinePointerInfo::getFixedStack(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::TargetLoweringBase::getPointerTy(), llvm::EVT::getStoreSize(), llvm::SelectionDAG::getVTList(), isScalarFPTypeInSSEReg(), llvm::MachineMemOperand::MOLoad, and llvm::MachineMemOperand::MOStore.
Referenced by combineSIntToFP().
|
overridevirtual |
Return true if Op can create undef or poison from non-undef & non-poison operands.
The DemandedElts argument limits the check to the requested vector elements.
Reimplemented from llvm::TargetLowering.
Definition at line 43425 of file X86ISelLowering.cpp.
References llvm::TargetLowering::canCreateUndefOrPoisonForTargetNode(), llvm::Depth, llvm::ISD::INTRINSIC_WO_CHAIN, PoisonOnly, llvm::X86ISD::PSHUFD, llvm::X86ISD::UNPCKH, llvm::X86ISD::UNPCKL, llvm::X86ISD::VPERMILPI, llvm::X86ISD::VPMADDUBSW, llvm::X86ISD::VPMADDWD, llvm::X86ISD::VSHLI, llvm::X86ISD::VSRAI, and llvm::X86ISD::VSRLI.
|
overridevirtual |
Returns if it's reasonable to merge stores to MemVT size.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3282 of file X86ISelLowering.cpp.
References llvm::MachineFunction::getFunction(), llvm::X86Subtarget::getPreferVectorWidth(), llvm::EVT::getSizeInBits(), and llvm::Function::hasFnAttribute().
|
overridevirtual |
Determine which of the bits specified in Mask are known to be either zero or one and return them in the KnownZero/KnownOne bitsets.
Reimplemented from llvm::TargetLowering.
Definition at line 37276 of file X86ISelLowering.cpp.
References llvm::X86ISD::AND, llvm::X86ISD::ANDNP, llvm::KnownBits::anyextOrTrunc(), llvm::APInt::ashrInPlace(), assert(), llvm::X86ISD::BEXTR, llvm::X86ISD::BEXTRI, llvm::BitWidth, llvm::X86ISD::BSR, llvm::ISD::BUILTIN_OP_END, llvm::APInt::clearAllBits(), llvm::X86ISD::CMOV, llvm::KnownBits::computeForAddSub(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsForHorizontalOperation(), computeKnownBitsForPMADDUBSW(), computeKnownBitsForPMADDWD(), computeKnownBitsForPSADBW(), llvm::KnownBits::countMinLeadingZeros(), llvm::KnownBits::countMinTrailingZeros(), llvm::APInt::countr_zero(), llvm::X86ISD::CVTP2SI, llvm::X86ISD::CVTP2UI, llvm::X86ISD::CVTPS2PH, llvm::X86ISD::CVTSI2P, llvm::X86ISD::CVTTP2SI, llvm::X86ISD::CVTTP2UI, llvm::X86ISD::CVTUI2P, llvm::Depth, llvm::KnownBits::eq(), llvm::KnownBits::extractBits(), llvm::X86ISD::FOR, llvm::APInt::getAllOnes(), llvm::APInt::getBitWidth(), llvm::KnownBits::getBitWidth(), llvm::APInt::getHighBitsSet(), llvm::APInt::getOneBitSet(), getPackDemandedElts(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), getTargetConstantBitsFromNode(), getTargetShuffleMask(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::X86ISD::HADD, llvm::X86ISD::HSUB, I, Idx, llvm::KnownBits::intersectWith(), llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::KnownBits::isNonNegative(), isTargetShuffle(), llvm::KnownBits::isUnknown(), llvm::EVT::isVector(), llvm::Length, LHS, llvm::Log2_32(), llvm::APInt::lshrInPlace(), llvm::KnownBits::makeConstant(), llvm::X86ISD::MCVTP2SI, llvm::X86ISD::MCVTP2UI, llvm::X86ISD::MCVTPS2PH, llvm::X86ISD::MCVTSI2P, llvm::X86ISD::MCVTTP2SI, llvm::X86ISD::MCVTTP2UI, llvm::X86ISD::MCVTUI2P, llvm::X86ISD::MOVMSK, llvm::X86ISD::MOVQ2DQ, llvm::KnownBits::mul(), llvm::X86ISD::MUL_IMM, llvm::KnownBits::One, llvm::X86ISD::PACKUS, llvm::X86ISD::PCMPEQ, llvm::X86ISD::PCMPGT, llvm::X86ISD::PDEP, llvm::X86ISD::PEXT, llvm::X86ISD::PEXTRB, llvm::X86ISD::PEXTRW, llvm::X86ISD::PMULUDQ, llvm::APInt::popcount(), llvm::X86ISD::PSADBW, llvm::X86ISD::PSHUFB, llvm::KnownBits::resetAll(), RHS, llvm::APInt::setAllBits(), llvm::KnownBits::setAllOnes(), llvm::KnownBits::setAllZero(), llvm::APInt::setBitsFrom(), llvm::X86ISD::SETCC, llvm::APInt::setHighBits(), llvm::APInt::setLowBits(), llvm::KnownBits::sgt(), llvm::SmallVectorBase< Size_T >::size(), llvm::SM_SentinelUndef, llvm::SM_SentinelZero, llvm::X86ISD::STRICT_CVTPS2PH, llvm::X86ISD::STRICT_CVTSI2P, llvm::X86ISD::STRICT_CVTTP2SI, llvm::X86ISD::STRICT_CVTTP2UI, llvm::X86ISD::STRICT_CVTUI2P, llvm::X86ISD::STRICT_VFPROUND, llvm::KnownBits::trunc(), llvm::X86ISD::VBROADCAST, llvm::X86ISD::VBROADCAST_LOAD, llvm::X86ISD::VFPROUND, llvm::X86ISD::VMFPROUND, llvm::X86ISD::VPMADDUBSW, llvm::X86ISD::VPMADDWD, llvm::X86ISD::VSHLI, llvm::X86ISD::VSRAI, llvm::X86ISD::VSRLI, llvm::X86ISD::VTRUNC, llvm::X86ISD::VTRUNCS, llvm::X86ISD::VTRUNCUS, llvm::KnownBits::Zero, llvm::KnownBits::zext(), and llvm::KnownBits::zextOrTrunc().
|
overridevirtual |
Determine the number of bits in the operation that are sign bits.
Reimplemented from llvm::TargetLowering.
Definition at line 37715 of file X86ISelLowering.cpp.
References llvm::X86ISD::ANDNP, assert(), llvm::X86ISD::CMOV, llvm::X86ISD::CMPP, llvm::SelectionDAG::ComputeNumSignBits(), llvm::Depth, llvm::X86ISD::FSETCC, llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), getPackDemandedElts(), llvm::EVT::getScalarSizeInBits(), llvm::MVT::getScalarSizeInBits(), llvm::SDValue::getScalarValueSizeInBits(), getTargetShuffleMask(), llvm::TargetLoweringBase::getValueType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::APInt::getZExtValue(), isTargetShuffle(), llvm::X86ISD::PACKSS, llvm::X86ISD::PCMPEQ, llvm::X86ISD::PCMPGT, llvm::peekThroughBitcasts(), llvm::X86ISD::SETCC_CARRY, llvm::SmallVectorBase< Size_T >::size(), llvm::SM_SentinelUndef, llvm::SM_SentinelZero, llvm::APInt::uge(), llvm::X86ISD::VBROADCAST, llvm::X86ISD::VPCOM, llvm::X86ISD::VPCOMU, llvm::X86ISD::VSHLI, llvm::X86ISD::VSRAI, llvm::X86ISD::VTRUNC, and llvm::APInt::zextOrTrunc().
Return true if a select of constants (select Cond, C1, C2) should be transformed into simple math ops with the condition value.
For example: select Cond, C1, C1-1 --> add (zext Cond), C1-1
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3158 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasAVX512(), and llvm::EVT::isVector().
Use bitwise logic to make pairs of compares more efficient.
For example: and (seteq A, B), (seteq C, D) --> seteq (or (xor A, B), (xor C, D)), 0 This should be true when it takes more than one instruction to lower setcc (cmp+set on x86 scalar), when bitwise ops are faster than logic on condition bits (crand on PowerPC), and/or when reducing cmp+br is a win.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1239 of file X86ISelLowering.h.
References llvm::EVT::isScalarInteger().
|
overridevirtual |
This method returns a target specific FastISel object, or null if the target does not support "fast" ISel.
Reimplemented from llvm::TargetLowering.
Definition at line 2635 of file X86ISelLowering.cpp.
References llvm::X86::createFastISel().
|
overridevirtual |
Return true if it is profitable to transform an integer multiplication-by-constant into simpler operations like shifts and adds.
This may be true if the target does not directly support the multiplication operation for the specified type or the sequence of simpler ops is faster than the multiply.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3167 of file X86ISelLowering.cpp.
References llvm::CallingConv::C, llvm::EVT::getScalarSizeInBits(), llvm::TargetLoweringBase::getTypeAction(), getTypeToTransformTo(), llvm::ISD::isConstantSplatVector(), llvm::TargetLoweringBase::isOperationLegal(), llvm::ISD::MUL, and llvm::TargetLoweringBase::TypeLegal.
|
overridevirtual |
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. As long as the returned basic block is different (i.e., we created a new one), the custom inserter is free to modify the rest of MBB
.
Reimplemented from llvm::TargetLowering.
Definition at line 36605 of file X86ISelLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::addFrameReference(), llvm::addFullAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::addRegOffset(), llvm::X86::AddrNumOperands, llvm::MachineInstrBuilder::addUse(), assert(), llvm::BuildMI(), llvm::MachineFrameInfo::CreateStackObject(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), llvm::RegState::Define, llvm::DirectReg, llvm::TargetLoweringBase::emitPatchPoint(), emitXBegin(), GET_EGPR_IF_ENABLED, llvm::getAddressFromInstr(), llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::X86Subtarget::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::TargetLoweringBase::getPointerTy(), llvm::X86MachineFunctionInfo::getPreallocatedArgOffsets(), llvm::X86MachineFunctionInfo::getPreallocatedStackSize(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::X86Subtarget::getRegisterInfo(), Idx, llvm::X86AddressMode::IndexReg, llvm::MachineBasicBlock::isLiveIn(), llvm::RegState::Kill, LLVM_DEBUG, llvm_unreachable, llvm::ManagedRA, MBBI, MI, MRI, llvm::MachineBasicBlock::rend(), llvm::X86MachineFunctionInfo::setAMXProgModel(), llvm::setDirectAddressInInstr(), llvm::X86MachineFunctionInfo::setHasPreallocatedCall(), TII, TRI, and llvm::RegState::Undef.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59548 of file X86ISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::StringRef::ends_with(), llvm::MachineBasicBlock::eraseFromParent(), llvm::MachineInstrBuilder::getInstr(), llvm::MachineBasicBlock::getParent(), llvm::MachineBasicBlock::insert(), llvm_unreachable, MBB, MBBI, llvm::MachineFunction::moveCallSiteInfo(), llvm::report_fatal_error(), and TII.
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 2609 of file X86ISelLowering.cpp.
References DL, llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getMachineNode(), and llvm::TargetLoweringBase::getPointerTy().
|
overridevirtual |
Expands target specific indirect branch for the case of JumpTable expansion.
Reimplemented from llvm::TargetLowering.
Definition at line 58240 of file X86ISelLowering.cpp.
References Addr, llvm::TargetLowering::expandIndirectJTBranch(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getJumpTableDebugInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), llvm::GlobalValue::getParent(), and llvm::X86ISD::NT_BRIND.
This hook allows the target to expand an inline asm call to be explicit llvm code if it wants to.
This is useful for turning simple inline asms into LLVM intrinsics, which gives the compiler more information about the behavior of the code.
Reimplemented from llvm::TargetLowering.
Definition at line 58401 of file X86ISelLowering.cpp.
References llvm::array_pod_sort(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::clear(), clobbersFlagRegisters(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::IntegerType::getBitWidth(), llvm::CallBase::getCalledOperand(), llvm::Value::getType(), llvm::Type::isIntegerTy(), llvm::IntrinsicLowering::LowerToByteSwap(), matchAsm(), llvm::SmallVectorBase< Size_T >::size(), and substr().
|
overrideprotectedvirtual |
Return the largest legal super-reg register class of the register class for the specified type and its associated "cost".
findRepresentativeClass - Return the largest legal super-reg register class of the register class for the specified type and its associated "cost".
Reimplemented from llvm::TargetLoweringBase.
Definition at line 499 of file X86ISelLoweringCall.cpp.
References llvm::TargetLoweringBase::findRepresentativeClass(), llvm::MVT::SimpleTy, and TRI.
|
overridevirtual |
Return the desired alignment for ByVal aggregate function arguments in the caller parameter area.
For X86, aggregates that contains are placed at 16-byte boundaries while the rest are at 4-byte boundaries.
For X86, aggregates that contain SSE vectors are placed at 16-byte boundaries while the rest are at 4-byte boundaries.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 262 of file X86ISelLoweringCall.cpp.
References DL, getMaxByValAlign(), llvm::X86Subtarget::hasSSE1(), and llvm::Align::value().
|
overridevirtual |
Given a constraint letter, return the type of constraint for this target.
Reimplemented from llvm::TargetLowering.
Definition at line 58513 of file X86ISelLowering.cpp.
References llvm::TargetLowering::C_Immediate, llvm::TargetLowering::C_Other, llvm::TargetLowering::C_Register, llvm::TargetLowering::C_RegisterClass, llvm::X86::COND_INVALID, llvm::TargetLowering::getConstraintType(), parseConstraintCode(), and llvm::StringRef::size().
|
overridevirtual |
If a physical register, this returns the register that receives the exception address on entry to an EH pad.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 27418 of file X86ISelLowering.cpp.
References llvm::classifyEHPersonality(), llvm::CoreCLR, and llvm::X86Subtarget::isTarget64BitLP64().
|
overridevirtual |
If a physical register, this returns the register that receives the exception typeid on entry to a landing pad.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 27426 of file X86ISelLowering.cpp.
References llvm::classifyEHPersonality(), llvm::isFuncletEHPersonality(), and llvm::X86Subtarget::isTarget64BitLP64().
|
inlineoverridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 1343 of file X86ISelLowering.h.
References llvm::TargetLowering::getInlineAsmMemConstraint(), and llvm::InlineAsm::v.
|
overridevirtual |
If the target has a standard location for the stack protector cookie, returns the address of that location.
Otherwise, returns nullptr.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 543 of file X86ISelLoweringCall.cpp.
References llvm::StringRef::empty(), llvm::GlobalValue::ExternalLinkage, llvm::X86AS::FS, llvm::IRBuilderBase::GetInsertBlock(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), llvm::TargetLoweringBase::getIRStackGuard(), llvm::GlobalValue::getParent(), llvm::BasicBlock::getParent(), llvm::X86Subtarget::getTargetTriple(), llvm::X86AS::GS, hasStackGuardSlotTLS(), llvm::X86Subtarget::isTargetDarwin(), llvm::X86Subtarget::isTargetFuchsia(), llvm::GlobalValue::NotThreadLocal, llvm::Offset, SegmentOffset(), and llvm::GlobalValue::setDSOLocal().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3437 of file X86ISelLowering.cpp.
References BrMergingBaseCostThresh, BrMergingCcmpBias, BrMergingLikelyBias, BrMergingUnlikelyBias, llvm::CmpInst::ICMP_EQ, llvm::PatternMatch::m_SpecificICmp(), llvm::PatternMatch::m_Value(), and llvm::PatternMatch::match().
|
overridevirtual |
Return the entry encoding for a jump table in the current function.
The returned value is a member of the MachineJumpTableInfo::JTEntryKind enum.
Reimplemented from llvm::TargetLowering.
Definition at line 415 of file X86ISelLoweringCall.cpp.
References llvm::MachineJumpTableInfo::EK_Custom32, llvm::MachineJumpTableInfo::EK_LabelDifference64, getCodeModel(), llvm::TargetLowering::getJumpTableEncoding(), llvm::TargetLoweringBase::getTargetMachine(), llvm::X86Subtarget::isPICStyleGOT(), llvm::TargetLowering::isPositionIndependent(), llvm::X86Subtarget::isTargetCOFF(), and llvm::CodeModel::Large.
|
inlineoverridevirtual |
Get the maximum supported factor for interleaved memory accesses.
Default to be the minimum interleave factor: 2.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1605 of file X86ISelLowering.h.
Referenced by lowerInterleavedLoad(), and lowerInterleavedStore().
|
overridevirtual |
Return the newly negated expression if the cost is not expensive and set the cost in Cost
to indicate that if it is cheaper or neutral to do the negation.
Reimplemented from llvm::TargetLowering.
Definition at line 52975 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::Cheaper, llvm::Depth, llvm::ISD::FMA, llvm::X86ISD::FMADD_RND, llvm::X86ISD::FMSUB, llvm::X86ISD::FMSUB_RND, llvm::X86ISD::FNMADD, llvm::X86ISD::FNMADD_RND, llvm::X86ISD::FNMSUB, llvm::X86ISD::FNMSUB_RND, llvm::X86ISD::FRCP, llvm::SelectionDAG::getBitcast(), llvm::TargetLowering::getCheaperNegatedExpression(), getNegatedExpression(), llvm::TargetLowering::getNegatedExpression(), llvm::SelectionDAG::getNode(), llvm::DWARFExpression::Operation::getNumOperands(), llvm::EVT::getScalarType(), llvm::X86Subtarget::hasAnyFMA(), isFNEG(), llvm::TargetLoweringBase::isOperationLegal(), llvm::TargetLoweringBase::isTypeLegal(), negateFMAOpcode(), and llvm::TargetLoweringBase::Neutral.
Referenced by getNegatedExpression().
|
overridevirtual |
Certain targets require unusual breakdowns of certain types.
For MIPS, this occurs when a vector type is used, as vector are passed through the integer register set.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 137 of file X86ISelLoweringCall.cpp.
References CC, llvm::EVT::changeVectorElementType(), llvm::TargetLoweringBase::getNumRegistersForCallingConv(), getNumRegistersForCallingConv(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), handleMaskRegisterForCallingConv(), llvm::X86Subtarget::hasAVX512(), llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, and llvm::EVT::isVector().
Referenced by getNumRegistersForCallingConv().
|
overridevirtual |
It returns EVT::Other if the type should be determined using generic target-independent logic.
For vector ops we check that the overall size isn't larger than our preferred vector width.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 282 of file X86ISelLoweringCall.cpp.
References llvm::X86Subtarget::getPreferVectorWidth(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::AttributeList::hasFnAttr(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), and llvm::X86Subtarget::useLight256BitInstructions().
|
overridevirtual |
Returns relocation base for the given PIC jumptable.
Reimplemented from llvm::TargetLowering.
Definition at line 473 of file X86ISelLoweringCall.cpp.
References llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getNode(), llvm::TargetLoweringBase::getPointerTy(), and llvm::X86ISD::GlobalBaseReg.
|
overridevirtual |
This returns the relocation base for the given PIC jumptable, the same as getPICJumpTableRelocBase, but as an MCExpr.
Reimplemented from llvm::TargetLowering.
Definition at line 485 of file X86ISelLoweringCall.cpp.
References llvm::MCSymbolRefExpr::create(), getCodeModel(), llvm::MachineFunction::getPICBaseSymbol(), llvm::TargetLowering::getPICJumpTableRelocBaseExpr(), llvm::TargetLoweringBase::getTargetMachine(), llvm::X86Subtarget::isPICStyleRIPRel(), and llvm::CodeModel::Large.
|
overridevirtual |
Returns preferred type for switch condition.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34508 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::getPreferredSwitchConditionType(), and llvm::EVT::getSizeInBits().
|
overridevirtual |
Customize the preferred legalization strategy for certain types.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 2618 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::getPreferredVectorAction(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), llvm::X86Subtarget::hasAVX512(), llvm::MVT::isScalableVector(), llvm::TargetLoweringBase::TypeSplitVector, and llvm::TargetLoweringBase::TypeWidenVector.
|
overridevirtual |
Return the preferred loop alignment.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59666 of file X86ISelLowering.cpp.
References ExperimentalPrefInnermostLoopAlignment, llvm::TargetLoweringBase::getPrefLoopAlignment(), and ML.
|
overridevirtual |
Given a physical register constraint (e.g.
{edx}), return the register number and the register class for the register. This should only be used for C_Register constraints. On error, this returns a register number of 0.
Reimplemented from llvm::TargetLowering.
Definition at line 58978 of file X86ISelLowering.cpp.
References assert(), llvm::X86::COND_INVALID, llvm::TargetRegisterClass::contains(), llvm::TargetLowering::getRegForInlineAsmConstraint(), getRegForInlineAsmConstraint(), llvm::MVT::getSizeInBits(), llvm::getX86SubSuperRegister(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasSSE1(), is64Bit(), isFRClass(), isGRClass(), isScalarFPTypeInSSEReg(), llvm::Register::isValid(), llvm::MVT::isVector(), isVKClass(), parseConstraintCode(), llvm::MVT::SimpleTy, llvm::StringRef::size(), Size, TRI, and useEGPRInlineAsm().
Referenced by getRegForInlineAsmConstraint().
|
overridevirtual |
Return the register ID of the name passed in.
Used by named register global variables extension. There is no target-independent behaviour so the default action is to bail.
Reimplemented from llvm::TargetLowering.
Definition at line 27379 of file X86ISelLowering.cpp.
References assert(), llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), llvm::X86Subtarget::getFrameLowering(), llvm::X86RegisterInfo::getPtrSizedFrameRegister(), llvm::X86Subtarget::getRegisterInfo(), llvm::TargetFrameLowering::hasFP(), RegName, and llvm::report_fatal_error().
|
overridevirtual |
Certain combinations of ABIs, Targets and features require that types are legal for some operations and not for other operations.
For MIPS all vector types must be passed through the integer register set.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 103 of file X86ISelLoweringCall.cpp.
References CC, llvm::EVT::changeVectorElementType(), llvm::TargetLoweringBase::getRegisterTypeForCallingConv(), getRegisterTypeForCallingConv(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), handleMaskRegisterForCallingConv(), llvm::X86Subtarget::hasAVX512(), llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, and llvm::EVT::isVector().
Referenced by getRegisterTypeForCallingConv().
SDValue X86TargetLowering::getReturnAddressFrameIndex | ( | SelectionDAG & | DAG | ) | const |
Definition at line 2754 of file X86ISelLowering.cpp.
References llvm::MachineFrameInfo::CreateFixedObject(), llvm::SelectionDAG::getDataLayout(), llvm::SelectionDAG::getFrameIndex(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getPointerTy(), llvm::X86MachineFunctionInfo::getRAIndex(), llvm::X86Subtarget::getRegisterInfo(), llvm::X86RegisterInfo::getSlotSize(), and llvm::X86MachineFunctionInfo::setRAIndex().
|
overridevirtual |
Return true if the target stores SafeStack pointer at a fixed offset in some non-standard address space, and populates the address space and offset as appropriate.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 637 of file X86ISelLoweringCall.cpp.
References llvm::TargetLoweringBase::getSafeStackPointerLocation(), llvm::X86Subtarget::isTargetAndroid(), llvm::X86Subtarget::isTargetFuchsia(), llvm::Offset, and SegmentOffset().
|
inlineoverridevirtual |
Return the type to use for a scalar shift opcode, given the shifted amount type.
Targets should return a legal type if the input type is legal. Targets can return a type that is too small if the input type is illegal.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1036 of file X86ISelLowering.h.
Return the variable that's previously inserted by insertSSPDeclarations, if any, otherwise return nullptr.
Should be used only when getIRStackGuard returns nullptr.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 618 of file X86ISelLoweringCall.cpp.
References llvm::TargetLoweringBase::getSDagStackGuard(), llvm::X86Subtarget::getTargetTriple(), llvm::Triple::isWindowsItaniumEnvironment(), and llvm::Triple::isWindowsMSVCEnvironment().
|
overridevirtual |
Return the value type to use for ISD::SETCC.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 204 of file X86ISelLoweringCall.cpp.
References llvm::EVT::changeVectorElementTypeToInteger(), llvm::EVT::getSimpleVT(), llvm::MVT::getSizeInBits(), llvm::TargetLoweringBase::getTypeAction(), getTypeToTransformTo(), llvm::EVT::getVectorElementCount(), llvm::MVT::getVectorElementType(), llvm::EVT::getVectorVT(), llvm::X86Subtarget::hasAVX512(), llvm::MVT::is512BitVector(), llvm::EVT::isVector(), llvm::MVT::isVector(), and llvm::TargetLoweringBase::TypeLegal.
|
overridevirtual |
Examine constraint string and operand type and determine a weight value.
Examine constraint type and operand type and determine a weight value.
The operand object must already have been set up with the operand type.
This object must already have been set up with the operand type and the current alternative constraint selected.
Reimplemented from llvm::TargetLowering.
Definition at line 58592 of file X86ISelLowering.cpp.
References llvm::CallingConv::C, llvm::TargetLowering::CW_Constant, llvm::TargetLowering::CW_Default, llvm::TargetLowering::CW_Invalid, llvm::TargetLowering::CW_Register, llvm::TargetLowering::CW_SpecificReg, llvm::Type::getPrimitiveSizeInBits(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::Value::getType(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), Info, llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::size().
If the target has a standard stack protection check function that performs validation and error handling, returns the function.
Otherwise, returns nullptr. Must be previously inserted by insertSSPDeclarations. Should be used only when getIRStackGuard returns nullptr.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 627 of file X86ISelLoweringCall.cpp.
References llvm::TargetLoweringBase::getSSPStackGuardCheck(), llvm::X86Subtarget::getTargetTriple(), llvm::Triple::isWindowsItaniumEnvironment(), and llvm::Triple::isWindowsMSVCEnvironment().
unsigned X86TargetLowering::getStackProbeSize | ( | const MachineFunction & | MF | ) | const |
Definition at line 59659 of file X86ISelLowering.cpp.
References llvm::Function::getFnAttributeAsParsedInteger(), and llvm::MachineFunction::getFunction().
Referenced by llvm::X86FrameLowering::emitPrologue().
|
overridevirtual |
Returns the name of the symbol used to emit stack probes or the empty string if not applicable.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59636 of file X86ISelLowering.cpp.
References llvm::Function::getFnAttribute(), llvm::MachineFunction::getFunction(), llvm::Attribute::getValueAsString(), llvm::Function::hasFnAttribute(), hasInlineStackProbe(), llvm::X86Subtarget::isOSWindows(), llvm::X86Subtarget::isTargetCygMing(), and llvm::X86Subtarget::isTargetMachO().
Referenced by hasStackProbeSymbol().
|
overridevirtual |
This method returns the constant pool value that will be loaded by LD.
NOTE: You must check for implicit extensions of the constant by LD.
Reimplemented from llvm::TargetLowering.
Definition at line 4728 of file X86ISelLowering.cpp.
References assert(), and getTargetConstantFromNode().
This method returns the name of a target specific DAG node.
Reimplemented from llvm::TargetLowering.
Definition at line 33703 of file X86ISelLowering.cpp.
References llvm::BEXTRI, llvm::BLENDV, llvm::COMI, EXPAND, llvm::X86ISD::FIRST_NUMBER, llvm::FMSUB, llvm::FNMADD, llvm::FNMSUB, NODE_NAME_CASE, llvm::RDRAND, llvm::RDSEED, Wrapper, and llvm::XTEST.
|
overridevirtual |
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 stores the intrinsic information into the IntrinsicInfo that was passed to the function.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 2946 of file X86ISelLowering.cpp.
References llvm::GATHER, llvm::GATHER_AVX2, llvm::EVT::getIntegerVT(), llvm::getIntrinsicWithChain(), llvm::MVT::getVectorElementType(), llvm::MVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::MVT::getVT(), I, Info, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MOStore, llvm::MachineMemOperand::MOVolatile, llvm::SCATTER, Size, llvm::TRUNCATE_TO_MEM_VI16, llvm::TRUNCATE_TO_MEM_VI32, llvm::TRUNCATE_TO_MEM_VI8, and llvm::IntrinsicData::Type.
|
inlineoverridevirtual |
For types supported by the target, this is an identity function.
For types that must be promoted to larger types, this returns the larger type to promote to. For integer types that are larger than the largest integer register, this contains one step in the expansion to get to the smaller register. For illegal floating point types, this returns the integer type to transform to.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1635 of file X86ISelLowering.h.
References llvm::EVT::getIntegerVT(), and llvm::TargetLoweringBase::getTypeToTransformTo().
Referenced by decomposeMulByConstant(), getSetCCResultType(), and ReplaceNodeResults().
|
overridevirtual |
Certain targets such as MIPS require that some types such as vectors are always broken down into scalars in some contexts.
This occurs even if the vector type is legal.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 172 of file X86ISelLoweringCall.cpp.
References CC, llvm::EVT::changeVectorElementType(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::TargetLoweringBase::getVectorTypeBreakdownForCallingConv(), llvm::X86Subtarget::hasAVX512(), llvm::isPowerOf2_32(), llvm::EVT::isVector(), llvm::X86Subtarget::useAVX512Regs(), and llvm::CallingConv::X86_RegCall.
Return true if the target has a bitwise and-not operation: X = ~A & B This can be used to simplify select or other instructions.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3325 of file X86ISelLowering.cpp.
References llvm::EVT::getSizeInBits(), hasAndNotCompare(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), llvm::EVT::isVector(), and Y.
Return true if the target should transform: (X & Y) == Y —> (~X & Y) == 0 (X & Y) != Y —> (~X & Y) != 0.
This may be profitable if the target has a bitwise and-not operation that sets comparison flags. A target may want to limit the transformation based on the type of Y or if Y is a constant.
Note that the transform will not occur if Y is known to be a power-of-2 because a mask and compare of a single bit can be handled by inverting the predicate, for example: (X & 8) == 8 —> (X & 8) != 0
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3309 of file X86ISelLowering.cpp.
References llvm::EVT::isVector(), and Y.
Referenced by hasAndNot().
Return true if the target has a bit-test instruction: (X & (1 << Y)) ==/!= 0 This knowledge can be used to prevent breaking the pattern, or creating it if it could be recognized.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3342 of file X86ISelLowering.cpp.
References X.
Vector-sized comparisons are fast using PCMPEQ + PMOVMSK or PTEST.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3507 of file X86ISelLowering.cpp.
References llvm::MVT::getIntegerVT(), llvm::MVT::INVALID_SIMPLE_VALUE_TYPE, and llvm::TargetLoweringBase::isTypeLegal().
|
overridevirtual |
Returns true if stack probing through inline assembly is requested.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59618 of file X86ISelLowering.cpp.
References llvm::Function::getFnAttribute(), llvm::MachineFunction::getFunction(), llvm::Attribute::getValueAsString(), llvm::Function::hasFnAttribute(), and llvm::X86Subtarget::isOSWindows().
Referenced by llvm::X86FrameLowering::emitSPUpdate(), and getStackProbeSymbolName().
|
overridevirtual |
Returns true if stack probing through a function call is requested.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59613 of file X86ISelLowering.cpp.
References llvm::StringRef::empty(), and getStackProbeSymbolName().
Referenced by llvm::X86FrameLowering::emitPrologue().
|
inlineoverridevirtual |
Return true if the target has a vector blend instruction.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1603 of file X86ISelLowering.h.
|
overridevirtual |
Inserts necessary declarations for SSP (stack protection) purpose.
Should be used only when getIRStackGuard returns nullptr.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 590 of file X86ISelLoweringCall.cpp.
References llvm::StringRef::empty(), F, llvm::FunctionCallee::getCallee(), llvm::X86Subtarget::getTargetTriple(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), hasStackGuardSlotTLS(), llvm::TargetLoweringBase::insertSSPDeclarations(), llvm::Triple::isWindowsItaniumEnvironment(), llvm::Triple::isWindowsMSVCEnvironment(), and llvm::CallingConv::X86_FastCall.
Add x86-specific opcodes to the default list.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34234 of file X86ISelLowering.cpp.
References llvm::X86ISD::ANDNP, llvm::X86ISD::FANDN, llvm::X86ISD::FMAX, llvm::X86ISD::FMIN, llvm::TargetLoweringBase::isBinOp(), llvm::X86ISD::PCMPGT, llvm::X86ISD::VPSHA, llvm::X86ISD::VPSHL, llvm::X86ISD::VSHLV, llvm::X86ISD::VSRAV, and llvm::X86ISD::VSRLV.
Return true if it is cheap to speculate a call to intrinsic ctlz.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3247 of file X86ISelLowering.cpp.
Return true if it is cheap to speculate a call to intrinsic cttz.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3240 of file X86ISelLowering.cpp.
References llvm::Type::getScalarSizeInBits(), and llvm::Type::isVectorTy().
Returns true if the opcode is a commutative binary operation.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34254 of file X86ISelLowering.cpp.
References llvm::X86ISD::FAND, llvm::X86ISD::FMAXC, llvm::X86ISD::FMINC, llvm::X86ISD::FOR, llvm::X86ISD::FXOR, llvm::TargetLoweringBase::isCommutativeBinOp(), llvm::X86ISD::PCMPEQ, llvm::X86ISD::PMULDQ, and llvm::X86ISD::PMULUDQ.
|
overridevirtual |
Return true if ctlz instruction is fast.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3300 of file X86ISelLowering.cpp.
Referenced by combineOrCmpEqZeroToCtlzSrl().
|
overridevirtual |
Return prefered fold type, Abs if this is a vector, AddAnd if its an integer, None otherwise.
Reimplemented from llvm::TargetLowering.
Definition at line 58259 of file X86ISelLowering.cpp.
References llvm::ISD::ABS, llvm::TargetLoweringBase::ABS, llvm::TargetLoweringBase::AddAnd, llvm::SDNode::getOperand(), llvm::SDValue::getValueType(), llvm::SDNode::getValueType(), llvm::EVT::isInteger(), llvm::TargetLoweringBase::isOperationLegal(), llvm::EVT::isVector(), llvm::TargetLoweringBase::None, and llvm::TargetLoweringBase::NotAnd.
Return true if the target has native support for the specified value type and it is 'desirable' to use the type.
e.g. On x86 i16 is legal, but undesirable since i16 instruction encodings are longer and some i16 instructions are slow.
Reimplemented from llvm::TargetLowering.
Definition at line 58281 of file X86ISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::ISD::isNormalStore(), llvm::X86::mayFoldLoad(), llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::XOR, and llvm::ISD::ZERO_EXTEND.
|
overridevirtual |
Return true if EXTRACT_SUBVECTOR is cheap for this result type with this index.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3199 of file X86ISelLowering.cpp.
References llvm::ISD::EXTRACT_SUBVECTOR, llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), and llvm::TargetLoweringBase::isOperationLegalOrCustom().
|
inlineoverridevirtual |
Extract of a scalar FP value from index 0 of a vector is free.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1505 of file X86ISelLowering.h.
References llvm::EVT::getScalarType().
|
overridevirtual |
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.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34424 of file X86ISelLowering.cpp.
References llvm::EVT::getScalarType(), llvm::EVT::getSimpleVT(), llvm::X86Subtarget::hasAnyFMA(), llvm::EVT::isSimple(), and llvm::MVT::SimpleTy.
|
overridevirtual |
Returns true if the target can instruction select the specified FP immediate natively.
If false, the legalizer will materialize the FP immediate as a load from a constant pool.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3095 of file X86ISelLowering.cpp.
|
overridevirtual |
Return true if this function can prove that Op
is never poison and, if PoisonOnly
is false, does not have undef bits.
The DemandedElts argument limits the check to the requested vector elements.
Reimplemented from llvm::TargetLowering.
Definition at line 43389 of file X86ISelLowering.cpp.
References assert(), llvm::Depth, llvm::enumerate(), llvm::APInt::getBitWidth(), getTargetShuffleMask(), llvm::APInt::getZero(), llvm::SelectionDAG::isGuaranteedNotToBeUndefOrPoison(), llvm::TargetLowering::isGuaranteedNotToBeUndefOrPoisonForTargetNode(), PoisonOnly, llvm::X86ISD::PSHUFD, llvm::SmallVectorBase< Size_T >::size(), llvm::SM_SentinelUndef, llvm::SM_SentinelZero, and llvm::X86ISD::VPERMILPI.
|
overridevirtual |
On x86, return true if the operand with index OpNo is a CALL or JUMP instruction, which can use either a memory constraint or an address constraint.
-fasm-blocks "__asm call foo" lowers to call void asm sideeffect inteldialect "call ${0:P}", "*m..."
This function is used by a hack to choose the address constraint, lowering to a direct call.
Reimplemented from llvm::TargetLowering.
Definition at line 32333 of file X86ISelLowering.cpp.
References llvm::StringRef::equals_insensitive(), and getInstrStrFromOpNo().
|
overridevirtual |
Return true if integer divide is usually cheaper than a sequence of several shifts, adds, and multiplies for this target.
The definition of "cheaper" may depend on whether we're optimizing for speed or for size.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 59482 of file X86ISelLowering.cpp.
References llvm::AttributeList::hasFnAttr(), and llvm::EVT::isVector().
|
overridevirtual |
Return true if the specified immediate is legal add immediate, that is the target has add instructions which can add a register and the immediate without having to materialize the immediate into a register.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34297 of file X86ISelLowering.cpp.
|
overridevirtual |
Return true if the addressing mode represented by AM is legal for this target, for a load/store of the specified type.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34159 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::AddrMode::BaseGV, llvm::TargetLoweringBase::AddrMode::BaseOffs, llvm::X86Subtarget::classifyGlobalReference(), llvm::TargetMachine::getCodeModel(), llvm::TargetLoweringBase::getTargetMachine(), llvm::TargetLoweringBase::AddrMode::HasBaseReg, llvm::isGlobalRelativeToPICBase(), llvm::isGlobalStubReference(), llvm::X86::isOffsetSuitableForCodeModel(), llvm::TargetLowering::isPositionIndependent(), llvm::TargetLoweringBase::AddrMode::Scale, and llvm::CodeModel::Small.
|
overridevirtual |
Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructions which can compare a register against the immediate without having to materialize the immediate into a register.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34293 of file X86ISelLowering.cpp.
|
overridevirtual |
Return true if the specified immediate is legal for the value input of a store instruction.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34302 of file X86ISelLowering.cpp.
|
overridevirtual |
Return true if the following transform is beneficial: fold (conv (load x)) -> (load (conv*)x) On architectures that don't natively support some vector loads efficiently, casting the load to a smaller vector of larger types and loading is more efficient, however, this can be undone by optimizations in dag combiner.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3264 of file X86ISelLowering.cpp.
References llvm::EVT::getVectorElementType(), llvm::X86Subtarget::hasAVX512(), llvm::TargetLoweringBase::isLoadBitCastBeneficial(), llvm::TargetLoweringBase::isTypeLegal(), and llvm::EVT::isVector().
|
overridevirtual |
Return if the target supports combining a chain like:
into a single machine instruction of a form like:
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3304 of file X86ISelLowering.cpp.
Definition at line 340 of file X86ISelLoweringCall.cpp.
References llvm::EVT::getSizeInBits(), and isBitAligned().
Referenced by allowsMemoryAccess(), and allowsMisalignedMemoryAccesses().
|
inlineoverridevirtual |
Return true if it is cheaper to split the store of a merged int val from a pair of smaller values into multiple stores.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1164 of file X86ISelLowering.h.
References llvm::EVT::isFloatingPoint(), and llvm::EVT::isInteger().
Return true if it's profitable to narrow operations of type SrcVT to DestVT.
e.g. on x86, it's profitable to narrow from i32 to i8 but not from i32 to i16.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34447 of file X86ISelLowering.cpp.
Returns true if it's safe to use load / store of the specified type to expand memcpy / memset inline.
This is mostly true for all types except for some special cases. For example, on X86 targets without SSE2 f64 load / store are done with fldl / fstpl which also does type conversion. Note the specified type doesn't have to be legal as the hook is used before type legalization.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 328 of file X86ISelLoweringCall.cpp.
References llvm::X86Subtarget::hasSSE1(), and llvm::X86Subtarget::hasSSE2().
Return true if the specified scalar FP type is computed in an SSE register, not on the X87 floating point stack.
Definition at line 3259 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasSSE1(), and llvm::X86Subtarget::hasSSE2().
Referenced by BuildFILD(), and getRegForInlineAsmConstraint().
Targets can use this to indicate that they only support some VECTOR_SHUFFLE operations, those with specific masks.
By default, if a target supports the VECTOR_SHUFFLE node, all mask values are assumed to be legal.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34470 of file X86ISelLowering.cpp.
References llvm::MVT::getScalarType(), llvm::EVT::getSimpleVT(), llvm::MVT::getSizeInBits(), llvm::EVT::isSimple(), and llvm::TargetLoweringBase::isTypeLegal().
Referenced by isVectorClearMaskLegal().
|
overridevirtual |
Return true if vector Op
has the same value across all DemandedElts
, indicating any elements which may be undef in the output UndefElts
.
Reimplemented from llvm::TargetLowering.
Definition at line 43458 of file X86ISelLowering.cpp.
References llvm::Depth, llvm::APInt::getBitWidth(), llvm::APInt::getZero(), llvm::TargetLowering::isSplatValueForTargetNode(), llvm::X86ISD::VBROADCAST, and llvm::X86ISD::VBROADCAST_LOAD.
|
inlineoverridevirtual |
Returns true if the given Opc is considered a canonical constant for the target, which should not be transformed back into a BUILD_VECTOR.
Reimplemented from llvm::TargetLowering.
Definition at line 1304 of file X86ISelLowering.h.
References llvm::ISD::BITCAST, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::INSERT_SUBVECTOR, llvm::TargetLowering::isTargetCanonicalConstantNode(), and llvm::X86ISD::VBROADCAST_LOAD.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34306 of file X86ISelLowering.cpp.
References llvm::EVT::getSizeInBits(), and llvm::EVT::isScalarInteger().
Return true if it's free to truncate a value of type Ty1 to type Ty2.
e.g. On x86 it's free to truncate a i32 value in register EAX to i16 by referencing its sub-register AX.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34271 of file X86ISelLowering.cpp.
References llvm::Type::getPrimitiveSizeInBits(), and llvm::Type::isIntegerTy().
Return true if the target has native support for the specified value type and it is 'desirable' to use the type for the given node type.
e.g. On x86 i16 is legal, but undesirable since i16 instruction encodings are longer and some i16 instructions are slow.
Reimplemented from llvm::TargetLowering.
Definition at line 58190 of file X86ISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::EVT::getVectorElementType(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::ISD::LOAD, llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::XOR, and llvm::ISD::ZERO_EXTEND.
|
overridevirtual |
Similar to isShuffleMaskLegal.
Targets can use this to indicate if there is a suitable VECTOR_SHUFFLE that can be used to replace a VAND with a constant pool entry.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34487 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasAVX2(), and isShuffleMaskLegal().
Return true if folding a vector load into ExtVal (a sign, zero, or any extend node) is profitable.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34411 of file X86ISelLowering.cpp.
References llvm::SDValue::getOperand(), llvm::EVT::getScalarType(), and llvm::SDValue::getValueType().
This is used to enable splatted operand transforms for vector shifts and vector funnel shifts.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34211 of file X86ISelLowering.cpp.
References llvm::Type::getScalarSizeInBits(), and llvm::X86Subtarget::hasAVX2().
Referenced by shouldSinkOperands().
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 22791 of file X86ISelLowering.cpp.
References Cond, llvm::EVT::isVector(), and llvm::ISD::SETEQ.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34319 of file X86ISelLowering.cpp.
Return true if zero-extending the specific node Val to type VT2 is free (either because it's implicitly zero-extended such as ARM ldrb / ldrh or because it's folded such as X86 zero-extending loads).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34324 of file X86ISelLowering.cpp.
References llvm::SDValue::getOpcode(), llvm::EVT::getSimpleVT(), llvm::SDValue::getValueType(), llvm::EVT::isInteger(), llvm::EVT::isSimple(), isZExtFree(), llvm::ISD::LOAD, and llvm::MVT::SimpleTy.
Return true if any actual instruction that defines a value of type Ty1 implicit zero-extends the value to Ty2 in the result register.
This does not necessarily include registers defined in unknown ways, such as incoming arguments, or copies from unknown virtual registers. Also, if isTruncateFree(Ty2, Ty1) is true, this does not necessarily apply to truncate instructions. e.g. on x86-64, all instructions that define 32-bit values implicit zero-extend the result out to 64 bits.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34314 of file X86ISelLowering.cpp.
References llvm::Type::isIntegerTy().
Referenced by isZExtFree().
|
overridevirtual |
Lower the specified operand into the Ops vector.
If it is invalid, don't add anything to Ops. If hasMemory is true it means one of the asm constraint of the inline asm instruction being processed is 'm'.
If it is invalid, don't add anything to Ops.
Reimplemented from llvm::TargetLowering.
Definition at line 58781 of file X86ISelLowering.cpp.
References llvm::ISD::ADD, assert(), llvm::CallingConv::C, llvm::X86Subtarget::classifyGlobalReference(), llvm::TargetLoweringBase::getBooleanContents(), llvm::SelectionDAG::getContext(), llvm::TargetLoweringBase::getExtendForContent(), llvm::GlobalAddressSDNode::getGlobal(), llvm::Type::getInt32Ty(), llvm::SelectionDAG::getTargetBlockAddress(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::SDNode::getValueType(), llvm::isGlobalStubReference(), llvm::X86Subtarget::isPICStyleGOT(), llvm::X86Subtarget::isPICStyleStubPIC(), llvm::ConstantInt::isValueValidForType(), llvm::TargetLowering::LowerAsmOperandForConstraint(), llvm::Offset, llvm::ISD::SIGN_EXTEND, and llvm::ISD::ZERO_EXTEND.
|
overridevirtual |
Handle Lowering flag assembly outputs.
Reimplemented from llvm::TargetLowering.
Definition at line 58754 of file X86ISelLowering.cpp.
References CC, Cond, llvm::X86::COND_INVALID, llvm::TargetLowering::AsmOperandInfo::ConstraintCode, llvm::TargetLowering::AsmOperandInfo::ConstraintVT, DL, llvm::SelectionDAG::getCopyFromReg(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), getSETCC(), llvm::MVT::getSizeInBits(), llvm::SDValue::getValue(), llvm::MVT::isInteger(), llvm::MVT::isVector(), parseConstraintCode(), llvm::report_fatal_error(), and llvm::ISD::ZERO_EXTEND.
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 462 of file X86ISelLoweringCall.cpp.
References assert(), llvm::MCSymbolRefExpr::create(), llvm::MachineBasicBlock::getSymbol(), llvm::X86Subtarget::isPICStyleGOT(), llvm::TargetLowering::isPositionIndependent(), MBB, and llvm::MCSymbolRefExpr::VK_GOTOFF.
|
overridevirtual |
Lower interleaved load(s) into target specific instructions/intrinsics.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 806 of file X86InterleavedAccess.cpp.
References assert(), llvm::ArrayRef< T >::empty(), getMaxSupportedInterleaveFactor(), and llvm::ArrayRef< T >::size().
|
overridevirtual |
Lower interleaved store(s) into target specific instructions/intrinsics.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 823 of file X86InterleavedAccess.cpp.
References assert(), getMaxSupportedInterleaveFactor(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::ShuffleVectorInst::getType(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
overridevirtual |
Provide custom lowering hooks for some operations.
Reimplemented from llvm::TargetLowering.
Definition at line 32393 of file X86ISelLowering.cpp.
References llvm::ISD::ABDS, llvm::ISD::ABDU, llvm::ISD::ABS, llvm::ISD::ADD, llvm::ISD::ADDROFRETURNADDR, llvm::ISD::ADDRSPACECAST, llvm::ISD::ADJUST_TRAMPOLINE, llvm::ISD::ANY_EXTEND, llvm::ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, llvm::ISD::ATOMIC_FENCE, llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_STORE, llvm::ISD::AVGCEILU, llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BlockAddress, llvm::ISD::BRCOND, llvm::ISD::BUILD_VECTOR, llvm::ISD::CONCAT_VECTORS, llvm::ISD::ConstantPool, llvm::ISD::CTLZ, llvm::ISD::CTLZ_ZERO_UNDEF, llvm::ISD::CTPOP, llvm::ISD::CTTZ, llvm::ISD::CTTZ_ZERO_UNDEF, llvm::X86ISD::CVTPS2PH, llvm::ISD::DYNAMIC_STACKALLOC, llvm::ISD::EH_RETURN, llvm::ISD::EH_SJLJ_LONGJMP, llvm::ISD::EH_SJLJ_SETJMP, llvm::ISD::EH_SJLJ_SETUP_DISPATCH, llvm::ISD::ExternalSymbol, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FABS, llvm::ISD::FADD, llvm::ISD::FCOPYSIGN, llvm::ISD::FGETSIGN, llvm::ISD::FMAXIMUM, llvm::ISD::FMINIMUM, llvm::ISD::FNEG, llvm::ISD::FP16_TO_FP, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_BF16, llvm::ISD::FP_TO_FP16, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_SINT_SAT, llvm::ISD::FP_TO_UINT, llvm::ISD::FP_TO_UINT_SAT, llvm::ISD::FRAME_TO_ARGS_OFFSET, llvm::ISD::FRAMEADDR, llvm::ISD::FROUND, llvm::ISD::FSHL, llvm::ISD::FSHR, llvm::ISD::FSINCOS, llvm::ISD::FSUB, llvm::ISD::GC_TRANSITION_END, llvm::ISD::GC_TRANSITION_START, llvm::ISD::GET_FPENV_MEM, llvm::ISD::GET_ROUNDING, llvm::ISD::GlobalAddress, llvm::ISD::GlobalTLSAddress, llvm::ISD::INIT_TRAMPOLINE, llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::ISD::JumpTable, llvm::ISD::LLRINT, llvm_unreachable, llvm::ISD::LOAD, LowerABD(), LowerABS(), LowerADDRSPACECAST(), LowerADDSAT_SUBSAT(), lowerAddSub(), LowerADDSUBO_CARRY(), LowerADJUST_TRAMPOLINE(), LowerANY_EXTEND(), LowerATOMIC_FENCE(), LowerATOMIC_STORE(), lowerAtomicArith(), LowerAVG(), LowerBITCAST(), LowerBITREVERSE(), LowerCMP_SWAP(), LowerCONCAT_VECTORS(), LowerCTLZ(), LowerCTPOP(), LowerCTTZ(), LowerCVTPS2PH(), LowerEXTEND_VECTOR_INREG(), LowerEXTRACT_SUBVECTOR(), LowerFABSorFNEG(), LowerFCOPYSIGN(), LowerFGETSIGN(), LowerFMINIMUM_FMAXIMUM(), LowerFP16_TO_FP(), LowerFP_TO_FP16(), LowerFROUND(), LowerFSINCOS(), LowerFunnelShift(), LowerINSERT_SUBVECTOR(), LowerINTRINSIC_W_CHAIN(), LowerLoad(), LowerMGATHER(), LowerMINMAX(), LowerMLOAD(), LowerMSCATTER(), LowerMSTORE(), LowerMUL(), LowerMULH(), LowerMULO(), LowerPARITY(), LowerPREFETCH(), LowerREADCYCLECOUNTER(), LowerRotate(), LowerSCALAR_TO_VECTOR(), LowerShift(), LowerShiftParts(), LowerSIGN_EXTEND(), LowerStore(), LowerVACOPY(), lowerVECTOR_SHUFFLE(), LowerXALUO(), LowerZERO_EXTEND(), llvm::ISD::LRINT, llvm::ISD::MGATHER, llvm::ISD::MLOAD, llvm::ISD::MSCATTER, llvm::ISD::MSTORE, llvm::ISD::MUL, llvm::ISD::MULHS, llvm::ISD::MULHU, llvm::ISD::PARITY, llvm::ISD::PREFETCH, llvm::ISD::READCYCLECOUNTER, llvm::ISD::RESET_FPENV, llvm::ISD::RETURNADDR, llvm::ISD::ROTL, llvm::ISD::ROTR, llvm::ISD::SADDO, llvm::ISD::SADDO_CARRY, llvm::ISD::SADDSAT, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SELECT, llvm::ISD::SET_FPENV_MEM, llvm::ISD::SET_ROUNDING, llvm::ISD::SETCC, llvm::ISD::SETCCCARRY, llvm::ISD::SHL, llvm::ISD::SHL_PARTS, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::ISD::SINT_TO_FP, llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::SMULO, llvm::ISD::SRA, llvm::ISD::SRA_PARTS, llvm::ISD::SRL, llvm::ISD::SRL_PARTS, llvm::ISD::SSUBO, llvm::ISD::SSUBO_CARRY, llvm::ISD::SSUBSAT, llvm::ISD::STORE, llvm::ISD::STRICT_FP16_TO_FP, llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FP_TO_FP16, llvm::ISD::STRICT_FP_TO_SINT, llvm::ISD::STRICT_FP_TO_UINT, llvm::ISD::STRICT_FSETCC, llvm::ISD::STRICT_FSETCCS, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::ISD::SUB, llvm::ISD::TRUNCATE, llvm::ISD::UADDO, llvm::ISD::UADDO_CARRY, llvm::ISD::UADDSAT, llvm::ISD::UINT_TO_FP, llvm::ISD::UMAX, llvm::ISD::UMIN, llvm::ISD::UMULO, llvm::ISD::USUBO, llvm::ISD::USUBO_CARRY, llvm::ISD::USUBSAT, llvm::ISD::VAARG, llvm::ISD::VACOPY, llvm::ISD::VASTART, llvm::ISD::VECTOR_SHUFFLE, llvm::ISD::VSELECT, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.
Try to replace an X constraint, which matches anything, with another that has more specific requirements based on the type of the corresponding operand.
Reimplemented from llvm::TargetLowering.
Definition at line 58741 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasSSE1(), llvm::EVT::isFloatingPoint(), and llvm::TargetLowering::LowerXConstraint().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 433 of file X86ISelLoweringCall.cpp.
References llvm::CallingConv::C, CC, llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFunction(), llvm::GlobalValue::getParent(), llvm::DataLayout::getTypeAllocSize(), and llvm::CallingConv::X86_StdCall.
Do not merge vector stores after legalization because that may conflict with x86-specific store splitting optimizations.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1151 of file X86ISelLowering.h.
References llvm::EVT::isVector().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 27434 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::isTargetWin64().
|
overridevirtual |
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 57981 of file X86ISelLowering.cpp.
References llvm::X86ISD::ADC, llvm::ISD::ADD, llvm::X86ISD::ADD, llvm::ISD::AND, llvm::X86ISD::ANDNP, llvm::ISD::ANY_EXTEND, llvm::ISD::ANY_EXTEND_VECTOR_INREG, llvm::ISD::AVGCEILS, llvm::ISD::AVGCEILU, llvm::ISD::AVGFLOORS, llvm::ISD::AVGFLOORU, llvm::X86ISD::BEXTR, llvm::X86ISD::BEXTRI, llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::X86ISD::BLENDI, llvm::X86ISD::BLENDV, llvm::X86ISD::BRCOND, llvm::X86ISD::BT, llvm::X86ISD::CLOAD, llvm::X86ISD::CMOV, llvm::X86ISD::CMP, combineADC(), combineAdd(), combineAnd(), combineAndnp(), combineAVG(), combineBEXTR(), combineBitcast(), combineBITREVERSE(), combineBrCond(), combineBROADCAST_LOAD(), combineBT(), combineCMov(), combineCMP(), combineCONCAT_VECTORS(), combineCVTP2I_CVTTP2I(), combineCVTPH2PS(), combineEXTEND_VECTOR_INREG(), combineEXTRACT_SUBVECTOR(), combineExtractVectorElt(), combineFaddFsub(), combineFAnd(), combineFAndn(), combineFMA(), combineFMADDSUB(), combineFMinFMax(), combineFMinNumFMaxNum(), combineFMulcFCMulc(), combineFneg(), combineFOr(), combineFP16_TO_FP(), combineFP_EXTEND(), combineFP_ROUND(), combineGatherScatter(), combineINSERT_SUBVECTOR(), combineINTRINSIC_VOID(), combineINTRINSIC_W_CHAIN(), combineINTRINSIC_WO_CHAIN(), combineKSHIFT(), combineLoad(), combineLRINT_LLRINT(), combineMaskedLoad(), combineMaskedStore(), combineMOVDQ2Q(), combineMOVMSK(), combineMul(), combineOr(), combinePDEP(), combinePMULDQ(), combineSBB(), combineScalarToVector(), combineSelect(), combineSetCC(), combineSext(), combineShiftLeft(), combineShiftRightArithmetic(), combineShiftRightLogical(), combineShuffle(), combineSignExtendInReg(), combineSIntToFP(), combineStore(), combineSub(), combineTESTP(), combineTruncate(), combineUIntToFP(), combineVectorCompare(), combineVectorHADDSUB(), combineVectorInsert(), combineVectorPack(), combineVectorShiftImm(), combineVectorShiftVar(), combineVEXTRACT_STORE(), combineVPMADD(), combineVTRUNC(), combineX86AddSub(), combineX86CloadCstore(), combineX86GatherScatter(), combineX86INT_TO_FP(), combineX86SetCC(), combineXor(), combineZext(), llvm::ISD::CONCAT_VECTORS, llvm::X86ISD::CSTORE, llvm::X86ISD::CVTP2SI, llvm::X86ISD::CVTP2UI, llvm::X86ISD::CVTPH2PS, llvm::X86ISD::CVTSI2P, llvm::X86ISD::CVTTP2SI, llvm::X86ISD::CVTTP2UI, llvm::X86ISD::CVTUI2P, llvm::TargetLowering::DAGCombinerInfo::DAG, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::X86ISD::EXTRQI, llvm::ISD::FADD, llvm::X86ISD::FAND, llvm::X86ISD::FANDN, llvm::X86ISD::FHADD, llvm::X86ISD::FHSUB, llvm::ISD::FMA, llvm::X86ISD::FMADD_RND, llvm::X86ISD::FMADDSUB, llvm::X86ISD::FMADDSUB_RND, llvm::X86ISD::FMAX, llvm::ISD::FMAXNUM, llvm::X86ISD::FMIN, llvm::ISD::FMINNUM, llvm::X86ISD::FMSUB, llvm::X86ISD::FMSUB_RND, llvm::X86ISD::FMSUBADD, llvm::X86ISD::FMSUBADD_RND, llvm::ISD::FNEG, llvm::X86ISD::FNMADD, llvm::X86ISD::FNMADD_RND, llvm::X86ISD::FNMSUB, llvm::X86ISD::FNMSUB_RND, llvm::X86ISD::FOR, llvm::ISD::FP16_TO_FP, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FSUB, llvm::X86ISD::FXOR, llvm::X86ISD::HADD, llvm::X86ISD::HSUB, llvm::ISD::INSERT_SUBVECTOR, llvm::ISD::INSERT_VECTOR_ELT, llvm::X86ISD::INSERTPS, llvm::X86ISD::INSERTQI, llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, llvm::ISD::INTRINSIC_WO_CHAIN, llvm::X86ISD::KSHIFTL, llvm::X86ISD::KSHIFTR, llvm::ISD::LLRINT, llvm::ISD::LOAD, llvm::ISD::LRINT, llvm::ISD::MGATHER, llvm::X86ISD::MGATHER, llvm::ISD::MLOAD, llvm::X86ISD::MOVDDUP, llvm::X86ISD::MOVDQ2Q, llvm::X86ISD::MOVHLPS, llvm::X86ISD::MOVLHPS, llvm::X86ISD::MOVMSK, llvm::X86ISD::MOVSD, llvm::X86ISD::MOVSH, llvm::X86ISD::MOVSHDUP, llvm::X86ISD::MOVSLDUP, llvm::X86ISD::MOVSS, llvm::ISD::MSCATTER, llvm::X86ISD::MSCATTER, llvm::ISD::MSTORE, llvm::ISD::MUL, N, llvm::ISD::OR, llvm::X86ISD::PACKSS, llvm::X86ISD::PACKUS, llvm::X86ISD::PALIGNR, llvm::X86ISD::PCMPEQ, llvm::X86ISD::PCMPGT, llvm::X86ISD::PDEP, llvm::X86ISD::PEXTRB, llvm::X86ISD::PEXTRW, llvm::X86ISD::PINSRB, llvm::X86ISD::PINSRW, llvm::X86ISD::PMULDQ, llvm::X86ISD::PMULUDQ, llvm::X86ISD::PSHUFB, llvm::X86ISD::PSHUFD, llvm::X86ISD::PSHUFHW, llvm::X86ISD::PSHUFLW, llvm::X86ISD::SBB, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::X86ISD::SETCC, llvm::ISD::SHL, llvm::X86ISD::SHUF128, llvm::X86ISD::SHUFP, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SIGN_EXTEND_VECTOR_INREG, llvm::ISD::SINT_TO_FP, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::STORE, llvm::X86ISD::STRICT_CVTPH2PS, llvm::X86ISD::STRICT_CVTTP2SI, llvm::X86ISD::STRICT_CVTTP2UI, llvm::ISD::STRICT_FMA, llvm::X86ISD::STRICT_FMSUB, llvm::X86ISD::STRICT_FNMADD, llvm::X86ISD::STRICT_FNMSUB, llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::ISD::SUB, llvm::X86ISD::SUB, llvm::X86ISD::SUBV_BROADCAST_LOAD, llvm::X86ISD::TESTP, llvm::ISD::TRUNCATE, llvm::ISD::UINT_TO_FP, llvm::X86ISD::UNPCKH, llvm::X86ISD::UNPCKL, llvm::X86ISD::VALIGN, llvm::X86ISD::VBROADCAST, llvm::X86ISD::VBROADCAST_LOAD, llvm::ISD::VECTOR_SHUFFLE, llvm::X86ISD::VEXTRACT_STORE, llvm::X86ISD::VFCMULC, llvm::X86ISD::VFMULC, llvm::X86ISD::VPERM2X128, llvm::X86ISD::VPERMI, llvm::X86ISD::VPERMIL2, llvm::X86ISD::VPERMILPI, llvm::X86ISD::VPERMILPV, llvm::X86ISD::VPERMV, llvm::X86ISD::VPERMV3, llvm::X86ISD::VPMADDUBSW, llvm::X86ISD::VPMADDWD, llvm::X86ISD::VPPERM, llvm::ISD::VSELECT, llvm::X86ISD::VSHL, llvm::X86ISD::VSHLDQ, llvm::X86ISD::VSHLI, llvm::X86ISD::VSRA, llvm::X86ISD::VSRAI, llvm::X86ISD::VSRL, llvm::X86ISD::VSRLDQ, llvm::X86ISD::VSRLI, llvm::X86ISD::VTRUNC, llvm::X86ISD::VZEXT_MOVL, llvm::ISD::XOR, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZERO_EXTEND_VECTOR_INREG.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 58180 of file X86ISelLowering.cpp.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3369 of file X86ISelLowering.cpp.
References assert(), llvm::EVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), llvm::APInt::getZExtValue(), llvm::X86Subtarget::hasAVX512(), llvm::EVT::isInteger(), llvm::EVT::isVector(), llvm::ISD::ROTL, llvm::ISD::SHL, llvm::ISD::SRL, llvm::APInt::uge(), and llvm::APInt::ult().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3492 of file X86ISelLowering.cpp.
References llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), llvm::Function::hasMinSize(), llvm::X86Subtarget::isOSWindows(), llvm::TargetLoweringBase::LowerToLibcall, N, and llvm::TargetLoweringBase::preferredShiftLegalizationStrategy().
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3454 of file X86ISelLowering.cpp.
References llvm::ISD::FP_EXTEND, and N.
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 58185 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasAVX512(), and llvm::EVT::isVector().
Return true if it is profitable to convert a select of FP constants into a constant pool load whose address depends on the select condition.
The parameter may be used to differentiate a select with FP compare from integer compare.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3149 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasAVX(), llvm::EVT::isFloatingPoint(), and llvm::X86Subtarget::isTarget64BitLP64().
|
overridevirtual |
Replace the results of node with an illegal result type with new values built out of custom code.
Replace a node with an illegal result type with a new node built out of custom code.
Reimplemented from llvm::TargetLowering.
Definition at line 32553 of file X86ISelLowering.cpp.
References llvm::ISD::ADDRSPACECAST, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, assert(), llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_LOAD_ADD, llvm::ISD::ATOMIC_LOAD_AND, llvm::ISD::ATOMIC_LOAD_MAX, llvm::ISD::ATOMIC_LOAD_MIN, llvm::ISD::ATOMIC_LOAD_NAND, llvm::ISD::ATOMIC_LOAD_OR, llvm::ISD::ATOMIC_LOAD_SUB, llvm::ISD::ATOMIC_LOAD_UMAX, llvm::ISD::ATOMIC_LOAD_UMIN, llvm::ISD::ATOMIC_LOAD_XOR, llvm::ISD::ATOMIC_SWAP, llvm::ISD::BITCAST, llvm::ISD::BITREVERSE, llvm::ISD::BUILD_PAIR, llvm::X86Subtarget::canUseCMPXCHG16B(), llvm::EVT::changeVectorElementType(), llvm::EVT::changeVectorElementTypeToInteger(), llvm::SelectionDAG::computeKnownBits(), llvm::ISD::CONCAT_VECTORS, llvm::X86::COND_E, llvm::KnownBits::countMinLeadingZeros(), llvm::KnownBits::countMinTrailingZeros(), llvm::SelectionDAG::CreateStackTemporary(), llvm::ISD::CTPOP, llvm::X86ISD::CVTPH2PS, llvm::X86ISD::CVTPS2PH, llvm::X86ISD::CVTSI2P, llvm::X86ISD::CVTTP2SI, llvm::X86ISD::CVTTP2UI, llvm::X86ISD::CVTUI2P, llvm::dbgs(), expandFP_TO_UINT_SSE(), expandIntrinsicWChainHelper(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FADD, llvm::X86ISD::FILD, llvm::X86ISD::FIST, llvm::X86ISD::FMAX, llvm::X86ISD::FMAXC, llvm::X86ISD::FMIN, llvm::X86ISD::FMINC, llvm::ISD::FP_EXTEND, llvm::ISD::FP_ROUND, llvm::ISD::FP_TO_SINT, llvm::ISD::FP_TO_UINT, llvm::ISD::FSUB, llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getConstantFP(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getCopyToReg(), getEXTEND_VECTOR_INREG(), llvm::MachinePointerInfo::getFixedStack(), llvm::SDNode::getFlags(), llvm::MachineFunction::getFunction(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getIntPtrConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getNode(), getReadTimeStampCounter(), llvm::EVT::getScalarSizeInBits(), llvm::SelectionDAG::getSelect(), getSETCC(), llvm::SelectionDAG::getSetCC(), llvm::SelectionDAG::getShiftAmountConstant(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::SelectionDAG::GetSplitDestVTs(), llvm::TargetLoweringBase::getTypeAction(), getTypeToTransformTo(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getValueType(), llvm::EVT::getVectorElementType(), llvm::MVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::SelectionDAG::getVectorShuffle(), llvm::EVT::getVectorVT(), llvm::MVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::Function::hasFnAttribute(), llvm::X86Subtarget::hasSSE1(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), llvm::X86Subtarget::hasSSSE3(), llvm::Hi, I, llvm::ISD::INSERT_VECTOR_ELT, llvm::ISD::INTRINSIC_W_CHAIN, llvm::EVT::is128BitVector(), llvm::MVT::is128BitVector(), llvm::ISD::isConstantSplatVector(), llvm::MVT::isInteger(), llvm::ISD::isNON_EXTLoad(), isSoftF16(), llvm::X86Subtarget::isTargetWin64(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::MVT::isVector(), llvm::X86ISD::LCMPXCHG16_DAG, llvm::X86ISD::LCMPXCHG8_DAG, LHS, llvm::ISD::LLRINT, llvm_unreachable, llvm::Lo, llvm::ISD::LOAD, LowerADDRSPACECAST(), LowerBITREVERSE(), LowerCVTPS2PH(), llvm::ISD::LRINT, matchTruncateWithPACK(), llvm::ISD::MGATHER, llvm::X86ISD::MGATHER, llvm::MachineMemOperand::MOStore, llvm::X86ISD::MOVQ2DQ, llvm::ISD::MUL, N, llvm::Or, llvm::ISD::OR, llvm::ISD::READCYCLECOUNTER, Results, RHS, llvm::ISD::SCALAR_TO_VECTOR, llvm::ISD::SDIV, llvm::ISD::SETGT, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SIGN_EXTEND, llvm::ISD::SINT_TO_FP, llvm::SM_SentinelUndef, llvm::ISD::SMULO, llvm::SelectionDAG::SplitScalar(), llvm::SelectionDAG::SplitVector(), llvm::SelectionDAG::SplitVectorOperand(), llvm::ISD::SRA, llvm::ISD::SREM, llvm::ISD::SRL, llvm::X86ISD::STRICT_CVTPH2PS, llvm::X86ISD::STRICT_CVTPS2PH, llvm::X86ISD::STRICT_CVTSI2P, llvm::X86ISD::STRICT_CVTTP2SI, llvm::X86ISD::STRICT_CVTTP2UI, llvm::X86ISD::STRICT_CVTUI2P, llvm::ISD::STRICT_FADD, llvm::ISD::STRICT_FP_EXTEND, llvm::ISD::STRICT_FP_ROUND, llvm::ISD::STRICT_FP_TO_SINT, llvm::ISD::STRICT_FP_TO_UINT, llvm::ISD::STRICT_FSUB, llvm::ISD::STRICT_SINT_TO_FP, llvm::ISD::STRICT_UINT_TO_FP, llvm::X86ISD::STRICT_VFPROUND, Success, llvm::ISD::TokenFactor, llvm::ISD::TRUNCATE, truncateVectorWithPACK(), llvm::TargetLoweringBase::TypePromoteInteger, llvm::TargetLoweringBase::TypeSplitVector, llvm::TargetLoweringBase::TypeWidenVector, llvm::ISD::UDIV, llvm::ISD::UINT_TO_FP, llvm::ISD::UMULO, llvm::ISD::UREM, llvm::X86ISD::VFPROUND, llvm::X86ISD::VPMADDWD, llvm::X86ISD::VTRUNC, llvm::X86ISD::VZEXT_LOAD, widenSubVector(), and llvm::ISD::ZERO_EXTEND.
|
overridevirtual |
Returns true if it is beneficial to convert a load of a constant to just the constant itself.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3139 of file X86ISelLowering.cpp.
References assert(), llvm::Type::getPrimitiveSizeInBits(), and llvm::Type::isIntegerTy().
|
inlineoverridevirtual |
Should we generate fp_to_si_sat and fp_to_ui_sat from type FPVT to type VT from min(max(fptoi)) saturation patterns.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1233 of file X86ISelLowering.h.
References llvm::ISD::FP_TO_UINT_SAT, and llvm::TargetLoweringBase::isOperationLegalOrCustom().
Given a set in interconnected phis of type 'From' that are loaded/stored or bitcast to type 'To', return true if the set should be converted to 'To'.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34405 of file X86ISelLowering.cpp.
References From, and llvm::TargetLoweringBase::shouldConvertPhiType().
|
overridevirtual |
Return true if it is profitable to fold a pair of shifts into a mask.
This is usually true on most targets. But some targets, like Thumb1, have immediate shift instructions, but no immediate "and" instruction; this makes the fold unprofitable.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3458 of file X86ISelLowering.cpp.
References assert(), llvm::EVT::isVector(), N, llvm::ISD::SHL, llvm::TargetLoweringBase::shouldFoldConstantShiftPairToMask(), and llvm::ISD::SRL.
There are two ways to clear extreme bits (either low or high): Mask: x & (-1 << y) (the instcombine canonical form) Shifts: x >> y << y Return true if the variant with 2 variable shifts is preferred.
Return false if there is no preference.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3477 of file X86ISelLowering.cpp.
References llvm::EVT::isVector(), and Y.
|
overridevirtual |
Return true if pulling a binary operation into a select with an identity constant is profitable.
This is the inverse of an IR transform. Example: X + (Cond ? Y : 0) --> Cond ? (X + Y) : X
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34452 of file X86ISelLowering.cpp.
References llvm::EVT::getScalarType(), llvm::X86Subtarget::hasAVX512(), llvm::EVT::is512BitVector(), and llvm::EVT::isVector().
|
overridevirtual |
Overflow nodes should get combined/lowered to optimal instructions (they should allow eliminating explicit compares by getting flags from math ops).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3232 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::isOperationExpand(), llvm::EVT::isSimple(), and llvm::EVT::isVector().
|
overridevirtual |
Given the pattern (X & (C l>>/<< Y)) ==/!= 0 return true if it should be transformed into: ((X <</l>> Y) & C) ==/!= 0 WARNING: if 'X' is a constant, the fold may deadlock! FIXME: we could avoid passing XC, but we can't use isConstOrConstSplat() here because it can end up being not linked in.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3346 of file X86ISelLowering.cpp.
References CC, llvm::X86Subtarget::hasAVX2(), llvm::SelectionDAG::isSplatValue(), llvm::ISD::SHL, llvm::TargetLoweringBase::shouldProduceAndByConstByHoistingConstFromShiftsLHSOfAnd(), X, and Y.
|
overridevirtual |
Return true if we believe it is correct and profitable to reduce the load node to a smaller type.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3103 of file X86ISelLowering.cpp.
References assert(), llvm::ISD::EXTRACT_SUBVECTOR, llvm::EVT::is256BitVector(), llvm::EVT::is512BitVector(), isSimple(), llvm::X86II::MO_GOTTPOFF, llvm::ISD::STORE, and llvm::X86ISD::WrapperRIP.
Scalar ops always have equal or better analysis/performance/power than the vector equivalent, so this always makes sense if the scalar op is supported.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3213 of file X86ISelLowering.cpp.
References llvm::ISD::BUILTIN_OP_END, llvm::SDValue::getOpcode(), llvm::EVT::getScalarType(), llvm::SDValue::getValueType(), and llvm::TargetLoweringBase::isOperationLegalOrCustomOrPromote().
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 3252 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::hasSSE2().
|
overridevirtual |
Return true if sinking I's operands to the same basic block as I is profitable, e.g.
because the operands can be folded into a target instruction during instruction selection. After calling the function Ops
contains the Uses to sink ordered by dominance (dominating users come first).
Reimplemented from llvm::TargetLoweringBase.
Definition at line 34348 of file X86ISelLowering.cpp.
References llvm::any_of(), llvm::SmallVectorBase< Size_T >::empty(), llvm::VectorType::getElementType(), llvm::getSplatIndex(), llvm::X86Subtarget::hasSSE2(), llvm::X86Subtarget::hasSSE41(), I, II, llvm::Type::isIntegerTy(), isVectorShiftByScalarCheap(), llvm::PatternMatch::m_And(), llvm::PatternMatch::m_AShr(), llvm::PatternMatch::m_Shl(), llvm::PatternMatch::m_SpecificInt(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::match(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Return true if inserting a scalar into a variable element of an undef vector is more efficiently handled by splatting the scalar instead.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 3501 of file X86ISelLowering.cpp.
References llvm::TargetLoweringBase::isTypeLegal().
|
inlineoverridevirtual |
Should we tranform the IR-optimal check for whether given truncation down into KeptBits would be truncating or not: (add x, (1 << (KeptBits-1))) srccond (1 << KeptBits) Into it's more traditional form: ((x << C) a>> C) dstcond x Return true if we should transform.
Return false if there is no preference.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1210 of file X86ISelLowering.h.
References llvm::MVT::getIntegerVT(), and llvm::EVT::isVector().
|
overridevirtual |
Attempt to simplify any target nodes based on the demanded bits/elts, returning true on success.
Otherwise, analyze the expression and return a mask of KnownOne and KnownZero bits for the expression (used to simplify the caller). The KnownZero/One bits may only be accurate for those bits in the Demanded masks.
Reimplemented from llvm::TargetLowering.
Definition at line 42755 of file X86ISelLowering.cpp.
References llvm::ISD::AND, llvm::X86ISD::ANDNP, assert(), llvm::X86ISD::BEXTR, llvm::X86ISD::BEXTRI, llvm::BitWidth, llvm::X86ISD::BLENDV, llvm::APInt::clearAllBits(), llvm::APInt::clearBit(), llvm::X86ISD::CMOV, llvm::TargetLowering::TargetLoweringOpt::CombineTo(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::APInt::countl_zero(), llvm::KnownBits::countMinTrailingZeros(), llvm::APInt::countr_zero(), llvm::TargetLowering::TargetLoweringOpt::DAG, llvm::Depth, DL, extract128BitVector(), llvm::KnownBits::extractBits(), llvm::APInt::getActiveBits(), llvm::APInt::getAllOnes(), llvm::SDNode::getAsZExtVal(), llvm::SelectionDAG::getBitcast(), llvm::APInt::getBitsSet(), llvm::APInt::getBitWidth(), llvm::KnownBits::getConstant(), llvm::SelectionDAG::getConstant(), llvm::SDValue::getConstantOperandVal(), llvm::MVT::getIntegerVT(), llvm::APInt::getLowBitsSet(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::APInt::getOneBitSet(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), getPackDemandedElts(), llvm::MVT::getScalarSizeInBits(), llvm::SDValue::getScalarValueSizeInBits(), llvm::APInt::getSignMask(), llvm::SDValue::getSimpleValueType(), llvm::SelectionDAG::getTargetConstant(), llvm::MVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::MVT::getVectorVT(), llvm::X86Subtarget::hasAVX512(), Idx, llvm::KnownBits::intersectWith(), llvm::MVT::is256BitVector(), llvm::ISD::isBuildVectorAllZeros(), llvm::KnownBits::isConstant(), llvm::APInt::isOne(), llvm::MVT::isScalarInteger(), llvm::APInt::isSignMask(), llvm::SelectionDAG::isSplatValue(), llvm::MVT::isVector(), llvm::KnownBits::isZero(), llvm::Length, LHS, llvm::APInt::lshr(), llvm::APInt::lshrInPlace(), llvm::X86ISD::MOVMSK, llvm::KnownBits::One, llvm::X86ISD::PACKSS, llvm::X86ISD::PCMPGT, llvm::X86ISD::PDEP, llvm::X86ISD::PEXTRB, llvm::X86ISD::PEXTRW, llvm::X86ISD::PINSRB, llvm::X86ISD::PINSRW, llvm::X86ISD::PMULDQ, llvm::X86ISD::PMULUDQ, llvm::popcount(), RHS, llvm::KnownBits::setAllZero(), llvm::APInt::setHighBits(), llvm::APInt::setLowBits(), llvm::APInt::setSignBit(), llvm::TargetLowering::ShrinkDemandedConstant(), llvm::TargetLowering::SimplifyDemandedBits(), llvm::TargetLowering::SimplifyDemandedBitsForTargetNode(), llvm::TargetLowering::SimplifyDemandedVectorElts(), llvm::TargetLowering::SimplifyMultipleUseDemandedBits(), llvm::X86ISD::TESTP, llvm::KnownBits::trunc(), llvm::APInt::trunc(), llvm::ISD::TRUNCATE, llvm::X86ISD::VBROADCAST, llvm::X86ISD::VSHLI, llvm::X86ISD::VSRAI, llvm::X86ISD::VSRLI, llvm::X86ISD::VTRUNC, llvm::KnownBits::Zero, llvm::KnownBits::zext(), llvm::APInt::zext(), llvm::KnownBits::zextOrTrunc(), and llvm::APInt::zextOrTrunc().
|
overridevirtual |
Attempt to simplify any target nodes based on the demanded vector elements, returning true on success.
Otherwise, analyze the expression and return a mask of KnownUndef and KnownZero elements for the expression (used to simplify the caller). The KnownUndef/Zero elements may only be accurate for those bits in the DemandedMask.
Reimplemented from llvm::TargetLowering.
Definition at line 41966 of file X86ISelLowering.cpp.
References llvm::all_of(), llvm::X86ISD::ANDNP, llvm::any_of(), assert(), llvm::X86ISD::BLENDI, llvm::X86ISD::BLENDV, llvm::APInt::clearAllBits(), llvm::APInt::clearLowBits(), combineBlendOfPermutes(), llvm::TargetLowering::TargetLoweringOpt::CombineTo(), combineX86ShufflesRecursively(), llvm::X86ISD::CVTPH2PS, llvm::X86ISD::CVTPS2PH, llvm::X86ISD::CVTSI2P, llvm::X86ISD::CVTTP2SI, llvm::X86ISD::CVTTP2UI, llvm::X86ISD::CVTUI2P, llvm::TargetLowering::TargetLoweringOpt::DAG, llvm::DecodeBLENDMask(), llvm::DecodeVPERMMask(), llvm::Depth, DL, extractSubVector(), llvm::X86ISD::FHADD, llvm::X86ISD::FHSUB, llvm::X86ISD::FMAX, llvm::X86ISD::FMAXC, llvm::X86ISD::FMIN, llvm::X86ISD::FMINC, llvm::APInt::getAllOnes(), llvm::SelectionDAG::getBitcast(), llvm::APInt::getBitWidth(), getBROADCAST_LOAD(), llvm::SelectionDAG::getContext(), llvm::APInt::getHighBitsSet(), getHorizDemandedElts(), llvm::SelectionDAG::getLoad(), llvm::APInt::getLowBitsSet(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getNode(), llvm::DWARFExpression::Operation::getNumOperands(), llvm::APInt::getOneBitSet(), getPackDemandedElts(), llvm::EVT::getScalarSizeInBits(), llvm::MVT::getScalarSizeInBits(), llvm::EVT::getScalarType(), llvm::MVT::getScalarType(), llvm::SDValue::getSimpleValueType(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), llvm::EVT::getStoreSizeInBits(), llvm::SelectionDAG::getTargetConstant(), getTargetConstantBitsFromNode(), getTargetShuffleInputs(), llvm::SelectionDAG::getUNDEF(), llvm::SDValue::getValue(), llvm::SDValue::getValueType(), llvm::TargetLoweringBase::getValueType(), llvm::MVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::MVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::MVT::getVectorVT(), llvm::SelectionDAG::getVTList(), llvm::APInt::getZero(), getZeroVector(), llvm::X86ISD::HADD, llvm::X86ISD::HSUB, I, insertSubVector(), llvm::APInt::intersects(), llvm::MVT::is128BitVector(), llvm::EVT::is256BitVector(), llvm::EVT::is512BitVector(), llvm::APInt::isAllOnes(), llvm::APInt::isOne(), isSequentialOrUndefInRange(), llvm::SelectionDAG::isSplatValue(), llvm::APInt::isSubsetOf(), llvm::TargetLoweringBase::isTypeLegal(), isUndefInRange(), isUndefOrEqual(), isUndefOrZeroInRange(), llvm::EVT::isVector(), llvm::MVT::isVector(), isZero(), llvm::X86ISD::KSHIFTL, llvm::X86ISD::KSHIFTR, LHS, llvm::Lo, llvm::APInt::lshr(), llvm::APInt::lshrInPlace(), llvm::SelectionDAG::makeEquivalentMemoryOrdering(), llvm::SelectionDAG::MaskedVectorIsZero(), llvm::X86::MaxShuffleCombineDepth, llvm::X86ISD::PACKSS, llvm::X86ISD::PACKUS, llvm::X86ISD::PCMPEQ, llvm::X86ISD::PCMPGT, llvm::X86ISD::PMULDQ, llvm::X86ISD::PMULUDQ, llvm::X86ISD::PSADBW, llvm::X86ISD::PSHUFB, llvm::X86ISD::PSHUFD, llvm::X86ISD::PSHUFHW, llvm::X86ISD::PSHUFLW, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::ISD::SCALAR_TO_VECTOR, llvm::APIntOps::ScaleBitMask(), llvm::APInt::setAllBits(), llvm::APInt::setBit(), llvm::APInt::setHighBits(), llvm::APInt::setLowBits(), llvm::APInt::shl(), llvm::TargetLowering::SimplifyDemandedVectorElts(), SimplifyDemandedVectorEltsForTargetShuffle(), llvm::TargetLowering::SimplifyMultipleUseDemandedBits(), llvm::TargetLowering::SimplifyMultipleUseDemandedVectorElts(), llvm::SmallVectorBase< Size_T >::size(), llvm::SM_SentinelUndef, llvm::X86ISD::SUBV_BROADCAST_LOAD, llvm::X86ISD::UNPCKH, llvm::X86ISD::UNPCKL, llvm::SDNode::uses(), llvm::X86ISD::VBROADCAST, llvm::X86ISD::VBROADCAST_LOAD, llvm::X86ISD::VPERM2X128, llvm::X86ISD::VPERMI, llvm::X86ISD::VPERMIL2, llvm::X86ISD::VPERMILPI, llvm::X86ISD::VPERMILPV, llvm::X86ISD::VPERMV, llvm::X86ISD::VPERMV3, llvm::X86ISD::VPMADDUBSW, llvm::X86ISD::VPMADDWD, llvm::X86ISD::VPPERM, llvm::X86ISD::VPSHA, llvm::X86ISD::VPSHL, llvm::X86ISD::VSHL, llvm::X86ISD::VSHLDQ, llvm::X86ISD::VSHLI, llvm::X86ISD::VSHLV, llvm::X86ISD::VSRA, llvm::X86ISD::VSRAI, llvm::X86ISD::VSRAV, llvm::X86ISD::VSRL, llvm::X86ISD::VSRLDQ, llvm::X86ISD::VSRLI, llvm::X86ISD::VSRLV, llvm::X86ISD::VTRUNC, llvm::X86ISD::VTRUNCS, llvm::X86ISD::VTRUNCUS, llvm::X86ISD::VZEXT_LOAD, llvm::X86ISD::VZEXT_MOVL, widenSubVector(), and llvm::APInt::zextOrTrunc().
bool X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle | ( | SDValue | Op, |
const APInt & | DemandedElts, | ||
unsigned | MaskIndex, | ||
TargetLowering::TargetLoweringOpt & | TLO, | ||
unsigned | Depth | ||
) | const |
Definition at line 41899 of file X86ISelLowering.cpp.
References llvm::CallingConv::C, llvm::TargetLowering::TargetLoweringOpt::CombineTo(), llvm::TargetLowering::TargetLoweringOpt::DAG, llvm::Depth, DL, llvm::ConstantVector::get(), llvm::UndefValue::get(), llvm::SelectionDAG::getBitcast(), llvm::APInt::getBitWidth(), llvm::SelectionDAG::getConstantPool(), llvm::MachinePointerInfo::getConstantPool(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::Type::getPrimitiveSizeInBits(), getTargetConstantFromNode(), llvm::Value::getType(), llvm::SDValue::getValueType(), llvm::APInt::isAllOnes(), llvm::Type::isVectorTy(), llvm::peekThroughOneUseBitcasts(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::TargetLowering::SimplifyDemandedVectorElts().
Referenced by SimplifyDemandedVectorEltsForTargetNode().
|
overridevirtual |
More limited version of SimplifyDemandedBits that can be used to "look through" ops that don't contribute to the DemandedBits/DemandedElts - bitwise ops etc.
Reimplemented from llvm::TargetLowering.
Definition at line 43269 of file X86ISelLowering.cpp.
References llvm::all_of(), llvm::X86ISD::ANDNP, assert(), llvm::BitWidth, llvm::X86ISD::BLENDV, llvm::APInt::clearAllBits(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), Cond, llvm::APInt::countr_zero(), llvm::Depth, llvm::APInt::getAllOnes(), llvm::SelectionDAG::getBitcast(), llvm::APInt::getBitWidth(), llvm::APInt::getOneBitSet(), llvm::SDValue::getSimpleValueType(), llvm::EVT::getSimpleVT(), getTargetShuffleInputs(), llvm::SelectionDAG::getUNDEF(), llvm::MVT::getVectorNumElements(), getZeroVector(), llvm::ISD::isBuildVectorAllZeros(), llvm::KnownBits::isNegative(), llvm::KnownBits::isNonNegative(), llvm::APInt::isSubsetOf(), LHS, llvm::X86ISD::PCMPGT, llvm::X86ISD::PINSRB, llvm::X86ISD::PINSRW, llvm::APInt::popcount(), RHS, llvm::TargetLowering::SimplifyMultipleUseDemandedBitsForTargetNode(), llvm::SmallVectorBase< Size_T >::size(), llvm::X86ISD::VSHLI, llvm::X86ISD::VSRAI, and llvm::KnownBits::Zero.
|
inlineoverridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1574 of file X86ISelLowering.h.
|
inlineoverridevirtual |
Return true if it is expected to be cheaper to do a store of vector constant with the given size and type for the address space than to store the individual scalar element constants.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 1516 of file X86ISelLowering.h.
|
inlineoverridevirtual |
Return true if the target supports kcfi operand bundles.
Reimplemented from llvm::TargetLowering.
Definition at line 1591 of file X86ISelLowering.h.
|
overridevirtual |
Return true if the target supports swifterror attribute.
It optimizes loads and stores to reading and writing a specific register.
Reimplemented from llvm::TargetLowering.
Definition at line 59543 of file X86ISelLowering.cpp.
Referenced by llvm::X86RegisterInfo::getCalleeSavedRegs(), and llvm::X86RegisterInfo::getCallPreservedMask().
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 37097 of file X86ISelLowering.cpp.
References llvm::ISD::AND, llvm::X86ISD::ANDNP, llvm::bit_ceil(), llvm::CallingConv::C, llvm::TargetLowering::TargetLoweringOpt::CombineTo(), llvm::TargetLowering::TargetLoweringOpt::DAG, DL, llvm::APInt::getActiveBits(), llvm::APInt::getBitWidth(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::EVT::getIntegerVT(), llvm::APInt::getLowBitsSet(), llvm::SelectionDAG::getNode(), llvm::APInt::getNumSignBits(), llvm::EVT::getScalarSizeInBits(), llvm::SelectionDAG::getValueType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::ISD::isBuildVectorOfConstantSDNodes(), llvm::APInt::isSubsetOf(), llvm::TargetLoweringBase::isTypeLegal(), llvm::EVT::isVector(), llvm::ISD::OR, llvm::ISD::SIGN_EXTEND_INREG, llvm::APInt::trunc(), and llvm::ISD::XOR.
Reimplemented from llvm::TargetLowering.
Definition at line 37884 of file X86ISelLowering.cpp.
References N, llvm::X86ISD::Wrapper, and llvm::X86ISD::WrapperRIP.
|
overridevirtual |
If this function returns true, SelectionDAGBuilder emits a LOAD_STACK_GUARD node when it is lowering Intrinsic::stackprotector.
Reimplemented from llvm::TargetLowering.
Definition at line 2600 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::isTargetMachO().
|
overridevirtual |
Reimplemented from llvm::TargetLoweringBase.
Definition at line 429 of file X86ISelLoweringCall.cpp.
|
overridevirtual |
If this function returns true, stack protection checks should XOR the frame pointer (or whichever pointer is used to address locals) into the stack guard value before checking it.
getIRStackGuard must return nullptr if this returns true.
Reimplemented from llvm::TargetLoweringBase.
Definition at line 2604 of file X86ISelLowering.cpp.
References llvm::X86Subtarget::getTargetTriple(), llvm::Triple::isOSMSVCRT(), and llvm::X86Subtarget::isTargetMachO().
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 32355 of file X86ISelLowering.cpp.
References llvm::X86ISD::CLOAD, llvm::X86::COND_NE, DL, llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getConstant(), getFlagsOfCmpZeroFori1(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVTList(), llvm::SDValue::isUndef(), and Ptr.
|
overridevirtual |
Reimplemented from llvm::TargetLowering.
Definition at line 32375 of file X86ISelLowering.cpp.
References llvm::X86::COND_NE, llvm::X86ISD::CSTORE, DL, llvm::SelectionDAG::getBitcast(), getFlagsOfCmpZeroFori1(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVTList(), and Ptr.