14 #ifndef LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H 15 #define LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H 40 class FunctionLoweringInfo;
42 class InstrItineraryData;
44 class MachineBasicBlock;
47 class TargetLibraryInfo;
49 class TargetRegisterInfo;
303 unsigned getJumpTableEncoding()
const override;
304 bool useSoftFloat()
const override;
313 const char *getTargetNodeName(
unsigned Opcode)
const override;
317 return (Kind != ScalarCondVectorVal);
324 EVT VT)
const override;
338 bool isDesirableToTransformToIntegerOp(
unsigned Opc,
EVT VT)
const override;
343 bool allowsMisalignedMemoryAccesses(
EVT VT,
unsigned AddrSpace,
346 bool *
Fast)
const override;
348 EVT getOptimalMemOpType(uint64_t
Size,
349 unsigned DstAlign,
unsigned SrcAlign,
350 bool IsMemset,
bool ZeroMemset,
354 bool isTruncateFree(
Type *SrcTy,
Type *DstTy)
const override;
355 bool isTruncateFree(
EVT SrcVT,
EVT DstVT)
const override;
356 bool isZExtFree(
SDValue Val,
EVT VT2)
const override;
360 bool isFNegFree(
EVT VT)
const override;
362 bool isVectorLoadExtDesirable(
SDValue ExtVal)
const override;
364 bool allowTruncateForTailCall(
Type *Ty1,
Type *Ty2)
const override;
370 Type *Ty,
unsigned AS,
378 unsigned AS)
const override;
380 bool isLegalT2ScaledAddressingMode(
const AddrMode &AM,
EVT VT)
const;
384 bool isLegalT1ScaledAddressingMode(
const AddrMode &AM,
EVT VT)
const;
390 bool isLegalICmpImmediate(int64_t Imm)
const override;
396 bool isLegalAddImmediate(int64_t Imm)
const override;
413 const APInt &DemandedElts,
415 unsigned Depth)
const override;
417 bool targetShrinkDemandedConstant(
SDValue Op,
const APInt &Demanded,
421 bool ExpandInlineAsm(
CallInst *CI)
const override;
430 std::pair<unsigned, const TargetRegisterClass *>
434 const char *LowerXConstraint(
EVT ConstraintVT)
const override;
440 void LowerAsmOperandForConstraint(
SDValue Op, std::string &Constraint,
441 std::vector<SDValue> &Ops,
446 if (ConstraintCode ==
"Q")
448 else if (ConstraintCode ==
"o")
450 else if (ConstraintCode.
size() == 2) {
451 if (ConstraintCode[0] ==
'U') {
452 switch(ConstraintCode[1]) {
482 getRegClassFor(
MVT VT,
bool isDivergent =
false)
const override;
490 bool shouldAlignPointerArgs(
CallInst *CI,
unsigned &MinSize,
491 unsigned &PrefAlign)
const override;
508 bool ForCodeSize =
false)
const override;
513 unsigned Intrinsic)
const override;
517 bool shouldConvertConstantLoadToIntImm(
const APInt &Imm,
518 Type *Ty)
const override;
522 bool isExtractSubvectorCheap(
EVT ResVT,
EVT SrcVT,
523 unsigned Index)
const override;
527 bool functionArgumentNeedsConsecutiveRegisters(
533 getExceptionPointerRegister(
const Constant *PersonalityFn)
const override;
538 getExceptionSelectorRegister(
const Constant *PersonalityFn)
const override;
546 void emitAtomicCmpXchgNoStoreLLBalance(
IRBuilder<> &Builder)
const override;
553 unsigned getMaxSupportedInterleaveFactor()
const override;
555 bool lowerInterleavedLoad(
LoadInst *LI,
558 unsigned Factor)
const override;
560 unsigned Factor)
const override;
562 bool shouldInsertFencesForAtomic(
const Instruction *I)
const override;
564 shouldExpandAtomicLoadInIR(
LoadInst *LI)
const override;
565 bool shouldExpandAtomicStoreInIR(
StoreInst *SI)
const override;
571 bool useLoadStackGuardNode()
const override;
573 void insertSSPDeclarations(
Module &M)
const override;
574 Value *getSDagStackGuard(
const Module &M)
const override;
577 bool canCombineStoreAndExtract(
Type *VectorTy,
Value *Idx,
578 unsigned &Cost)
const override;
586 bool isCheapToSpeculateCttz()
const override;
587 bool isCheapToSpeculateCtlz()
const override;
598 return HasStandaloneRem;
609 bool isLegalInterleavedAccessType(
unsigned Factor,
VectorType *VecTy,
612 bool alignLoopsWithOptSize()
const override;
616 unsigned getNumInterleavedAccesses(
VectorType *VecTy,
622 Align getABIAlignmentForCallingConv(
Type *ArgTy,
625 bool isDesirableToCommuteWithShift(
const SDNode *N,
628 bool shouldFoldConstantShiftPairToMask(
const SDNode *N,
631 bool preferIncOfAddToSubOfNot(
EVT VT)
const override;
634 std::pair<const TargetRegisterClass *, uint8_t>
636 MVT VT)
const override;
648 unsigned ARMPCLabelIndex;
652 bool InsertFencesForAtomic;
654 bool HasStandaloneRem =
true;
656 void addTypeForNEON(
MVT VT,
MVT PromotedLdStVT,
MVT PromotedBitwiseVT);
657 void addDRTypeForNEON(
MVT VT);
658 void addQRTypeForNEON(
MVT VT);
671 const SDLoc &dl)
const;
674 bool isVarArg)
const;
676 bool isVarArg)
const;
738 Register getRegisterByName(
const char* RegName,
LLT VT,
745 EVT VT)
const override;
762 void insertCopiesSplitCSR(
774 unsigned InRegsParamRecordIdx,
int ArgOffset,
775 unsigned ArgSize)
const;
779 unsigned ArgOffset,
unsigned TotalArgRegsSaveSize,
780 bool ForceMutable =
false)
const;
786 void HandleByVal(
CCState *,
unsigned &,
unsigned)
const override;
791 bool IsEligibleForTailCallOptimization(
793 bool isCalleeStructRet,
bool isCallerStructRet,
797 const bool isIndirect)
const;
809 bool isUsedByReturnOnly(
SDNode *N,
SDValue &Chain)
const override;
811 bool mayBeEmittedAsTailCall(
const CallInst *CI)
const override;
813 bool shouldConsiderGEPOffsetSplit()
const override {
return true; }
815 bool isUnsupportedFloatingType(
EVT VT)
const;
823 const SDLoc &dl,
bool Signaling =
false)
const;
842 void addMVEVectorTypes(
bool HasMVEFP);
844 void setAllExpand(
MVT VT);
863 #endif // LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H
static SDValue LowerCallResult(SDValue Chain, SDValue InFlag, const SmallVectorImpl< CCValAssign > &RVLocs, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals)
LowerCallResult - Lower the result values of a call into the appropriate copies out of appropriate ph...
BUILTIN_OP_END - This must be the last enum value in this list.
A parsed version of the target data layout string in and methods for querying it. ...
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg If BaseGV is null...
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
An instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.
static void LowerMemOpCallTo(SelectionDAG &DAG, MachineFunction &MF, SDValue Chain, SDValue Arg, SDValue PtrOff, int SPDiff, unsigned ArgOffset, bool isPPC64, bool isTailCall, bool isVector, SmallVectorImpl< SDValue > &MemOpChains, SmallVectorImpl< TailCallArgumentInfo > &TailCallArguments, const SDLoc &dl)
LowerMemOpCallTo - Store the argument to the stack or remember it in case of tail calls...
bool isScalarInteger() const
Return true if this is an integer, but not a vector.
This class represents a function call, abstracting a target machine's calling convention.
bool hasStandaloneRem(EVT VT) const override
Return true if the target can handle a standalone remainder operation.
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
CCAssignFn - This function assigns a location for Val, updating State to reflect the change...
Function Alias Analysis Results
This instruction constructs a fixed permutation of two input vectors.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
unsigned const TargetRegisterInfo * TRI
An instruction for reading from memory.
an instruction that atomically reads a memory location, combines it with another value, and then stores the result back.
AtomicExpansionKind
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all.
bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override
Returns true if a cast between SrcAS and DestAS is a noop.
A convenience struct that encapsulates a DAG, and two SDValues for returning information from TargetL...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This file contains the simple types necessary to represent the attributes associated with functions a...
static SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, const SparcSubtarget *Subtarget)
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
AtomicOrdering
Atomic ordering for LLVM's memory model.
This is a fast-path instruction selection class that generates poor code and doesn't support illegal ...
This contains information for each constraint that we are lowering.
LLVM_NODISCARD size_t size() const
size - Get the string size.
Itinerary data supplied by a subtarget to be used by a target.
An instruction for storing to memory.
CondCode
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out...
virtual unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const
Analysis containing CSE Info
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
This is an important base class in LLVM.
static SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
const ARMSubtarget * getSubtarget() const
static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
TypeSize getSizeInBits() const
Return the size of the specified value type in bits.
This structure contains all information that is necessary for lowering calls.
This struct is a compact representation of a valid (non-zero power of two) alignment.
bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT, const SelectionDAG &DAG) const override
Returns if it's reasonable to merge stores to MemVT size.
LegalizeAction
This enum indicates whether operations are valid for a target, and if not, what action should be used...
CCState - This class holds information needed while lowering arguments and return values...
BlockVerifier::State From
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
bool supportSwiftError() const override
Return true if the target supports swifterror attribute.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Provides information about what library functions are available for the current target.
CCValAssign - Represent assignment of one arg/retval to a location.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const override
static const int FIRST_TARGET_MEMORY_OPCODE
FIRST_TARGET_MEMORY_OPCODE - Target-specific pre-isel operations which do not reference a specific me...
Represents one node in the SelectionDAG.
const Function & getFunction() const
Return the LLVM function that this machine code represents.
Class to represent vector types.
Class for arbitrary precision integers.
amdgpu Simplify well known AMD library false FunctionCallee Callee
static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
Flags
Flags values. These may be or'd together.
static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
Representation of each machine instruction.
static unsigned getScalingFactorCost(const TargetTransformInfo &TTI, const LSRUse &LU, const Formula &F, const Loop &L)
SelectSupportKind
Enum that describes what type of support for selects the target has.
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
bool isSelectSupported(SelectSupportKind Kind) const override
FastISel * createFastISel(FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo)
LLVM Value Representation.
Fast - This calling convention attempts to make calls as fast as possible (e.g.
static SDValue LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG)
bool convertSetCCLogicToBitwiseLogic(EVT VT) const override
Use bitwise logic to make pairs of compares more efficient.
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
static SDValue LowerFSINCOS(SDValue Op, const X86Subtarget &Subtarget, SelectionDAG &DAG)
bool isBitFieldInvertedMask(unsigned v)
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
Wrapper class representing virtual and physical registers.
This file describes how to lower LLVM code to machine code.
MemIndexedMode
MemIndexedMode enum - This enum defines the load / store indexed addressing modes.