15 #ifndef LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H 16 #define LLVM_LIB_TARGET_ARM_ARMISELLOWERING_H 41 class FunctionLoweringInfo;
43 class InstrItineraryData;
45 class MachineBasicBlock;
48 class TargetLibraryInfo;
50 class TargetRegisterInfo;
282 unsigned getJumpTableEncoding()
const override;
283 bool useSoftFloat()
const override;
292 const char *getTargetNodeName(
unsigned Opcode)
const override;
296 return (Kind != ScalarCondVectorVal);
303 EVT VT)
const override;
310 SDNode *Node)
const override;
317 bool isDesirableToTransformToIntegerOp(
unsigned Opc,
EVT VT)
const override;
322 bool allowsMisalignedMemoryAccesses(
EVT VT,
unsigned AddrSpace,
324 bool *
Fast)
const override;
326 EVT getOptimalMemOpType(uint64_t
Size,
327 unsigned DstAlign,
unsigned SrcAlign,
328 bool IsMemset,
bool ZeroMemset,
332 bool isTruncateFree(
Type *SrcTy,
Type *DstTy)
const override;
333 bool isTruncateFree(
EVT SrcVT,
EVT DstVT)
const override;
334 bool isZExtFree(
SDValue Val,
EVT VT2)
const override;
335 bool isFNegFree(
EVT VT)
const override;
337 bool isVectorLoadExtDesirable(
SDValue ExtVal)
const override;
339 bool allowTruncateForTailCall(
Type *Ty1,
Type *Ty2)
const override;
353 unsigned AS)
const override;
355 bool isLegalT2ScaledAddressingMode(
const AddrMode &AM,
EVT VT)
const;
359 bool isLegalT1ScaledAddressingMode(
const AddrMode &AM,
EVT VT)
const;
365 bool isLegalICmpImmediate(int64_t Imm)
const override;
371 bool isLegalAddImmediate(int64_t Imm)
const override;
388 const APInt &DemandedElts,
390 unsigned Depth)
const override;
393 bool ExpandInlineAsm(
CallInst *CI)
const override;
402 std::pair<unsigned, const TargetRegisterClass *>
406 const char *LowerXConstraint(
EVT ConstraintVT)
const override;
412 void LowerAsmOperandForConstraint(
SDValue Op, std::string &Constraint,
413 std::vector<SDValue> &Ops,
418 if (ConstraintCode ==
"Q")
420 else if (ConstraintCode ==
"o")
422 else if (ConstraintCode.
size() == 2) {
423 if (ConstraintCode[0] ==
'U') {
424 switch(ConstraintCode[1]) {
461 bool shouldAlignPointerArgs(
CallInst *CI,
unsigned &MinSize,
462 unsigned &PrefAlign)
const override;
478 bool isFPImmLegal(
const APFloat &Imm,
EVT VT)
const override;
483 unsigned Intrinsic)
const override;
487 bool shouldConvertConstantLoadToIntImm(
const APInt &Imm,
488 Type *Ty)
const override;
492 bool isExtractSubvectorCheap(
EVT ResVT,
EVT SrcVT,
493 unsigned Index)
const override;
497 bool functionArgumentNeedsConsecutiveRegisters(
503 getExceptionPointerRegister(
const Constant *PersonalityFn)
const override;
508 getExceptionSelectorRegister(
const Constant *PersonalityFn)
const override;
516 void emitAtomicCmpXchgNoStoreLLBalance(
IRBuilder<> &Builder)
const override;
525 bool lowerInterleavedLoad(
LoadInst *LI,
528 unsigned Factor)
const override;
530 unsigned Factor)
const override;
532 bool shouldInsertFencesForAtomic(
const Instruction *I)
const override;
534 shouldExpandAtomicLoadInIR(
LoadInst *LI)
const override;
535 bool shouldExpandAtomicStoreInIR(
StoreInst *SI)
const override;
540 bool useLoadStackGuardNode()
const override;
542 bool canCombineStoreAndExtract(
Type *VectorTy,
Value *Idx,
543 unsigned &Cost)
const override;
551 bool isCheapToSpeculateCttz()
const override;
552 bool isCheapToSpeculateCtlz()
const override;
563 return HasStandaloneRem;
572 bool isLegalInterleavedAccessType(
VectorType *VecTy,
577 unsigned getNumInterleavedAccesses(
VectorType *VecTy,
583 unsigned getABIAlignmentForCallingConv(
Type *ArgTy,
587 std::pair<const TargetRegisterClass *, uint8_t>
589 MVT VT)
const override;
601 unsigned ARMPCLabelIndex;
605 bool InsertFencesForAtomic;
607 bool HasStandaloneRem =
true;
609 void addTypeForNEON(
MVT VT,
MVT PromotedLdStVT,
MVT PromotedBitwiseVT);
610 void addDRTypeForNEON(
MVT VT);
611 void addQRTypeForNEON(
MVT VT);
624 const SDLoc &dl)
const;
627 bool isVarArg)
const;
629 bool isVarArg)
const;
685 unsigned getRegisterByName(
const char* RegName,
EVT VT,
697 bool isFMAFasterThanFMulAndFAdd(
EVT VT)
const override {
return false; }
714 void insertCopiesSplitCSR(
726 unsigned InRegsParamRecordIdx,
int ArgOffset,
727 unsigned ArgSize)
const;
731 unsigned ArgOffset,
unsigned TotalArgRegsSaveSize,
732 bool ForceMutable =
false)
const;
738 void HandleByVal(
CCState *,
unsigned &,
unsigned)
const override;
746 bool isCalleeStructRet,
747 bool isCallerStructRet,
763 bool isUsedByReturnOnly(
SDNode *N,
SDValue &Chain)
const override;
765 bool mayBeEmittedAsTailCall(
const CallInst *CI)
const override;
773 const SDLoc &dl,
bool InvalidOnQNaN)
const;
809 #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. ...
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg If BaseGV is null...
Compute iterated dominance frontiers using a linear time algorithm.
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...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
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.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
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 ...
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
This contains information for each constraint that we are lowering.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
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
amdgpu Simplify well known AMD library false Value * Callee
static SDValue LowerFP_EXTEND(SDValue Op, SelectionDAG &DAG)
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)
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...
This structure contains all information that is necessary for lowering calls.
Fast - This calling convention attempts to make calls as fast as possible (e.g.
bool canMergeStoresTo(unsigned AddressSpace, EVT MemVT, const SelectionDAG &DAG) const override
Returns if it's reasonable to merge stores to MemVT size.
unsigned getMaxSupportedInterleaveFactor() const override
Get the maximum supported factor for interleaved memory accesses.
CCState - This class holds information needed while lowering arguments and return values...
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.
static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
amdgpu Simplify well known AMD library false Value Value * Arg
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.
static SDValue LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
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...
This file describes how to lower LLVM code to machine code.
MemIndexedMode
MemIndexedMode enum - This enum defines the load / store indexed addressing modes.