15 #ifndef ARMISELLOWERING_H
16 #define ARMISELLOWERING_H
28 class ARMConstantPoolValue;
281 unsigned DstAlign,
unsigned SrcAlign,
282 bool IsMemset,
bool ZeroMemset,
329 unsigned Depth)
const;
339 AsmOperandInfo &
info,
const char *constraint)
const;
341 std::pair<unsigned, const TargetRegisterClass*>
350 std::string &Constraint,
351 std::vector<SDValue> &Ops,
383 unsigned Intrinsic)
const;
385 std::pair<const TargetRegisterClass*, uint8_t>
399 unsigned ARMPCLabelIndex;
401 void addTypeForNEON(
MVT VT,
MVT PromotedLdStVT,
MVT PromotedBitwiseVT);
402 void addDRTypeForNEON(
MVT VT);
403 void addQRTypeForNEON(
MVT VT);
408 RegsToPassVector &RegsToPass,
418 bool isVarArg)
const;
463 virtual bool isFMAFasterThanFMulAndFAdd(
EVT VT)
const {
return false; }
465 SDValue ReconstructShuffle(SDValue Op, SelectionDAG &DAG)
const;
467 SDValue LowerCallResult(SDValue Chain, SDValue InFlag,
469 const SmallVectorImpl<ISD::InputArg> &
Ins,
470 SDLoc dl, SelectionDAG &DAG,
471 SmallVectorImpl<SDValue> &InVals,
472 bool isThisReturn, SDValue ThisVal)
const;
475 LowerFormalArguments(SDValue Chain,
477 const SmallVectorImpl<ISD::InputArg> &
Ins,
478 SDLoc dl, SelectionDAG &DAG,
479 SmallVectorImpl<SDValue> &InVals)
const;
481 int StoreByValRegs(CCState &CCInfo, SelectionDAG &DAG,
482 SDLoc dl, SDValue &Chain,
483 const Value *OrigArg,
484 unsigned InRegsParamRecordIdx,
485 unsigned OffsetFromOrigArg,
488 bool ForceMutable)
const;
490 void VarArgStyleRegisters(CCState &CCInfo, SelectionDAG &DAG,
491 SDLoc dl, SDValue &Chain,
493 bool ForceMutable =
false)
const;
495 void computeRegArea(CCState &CCInfo, MachineFunction &MF,
496 unsigned InRegsParamRecordIdx,
498 unsigned &ArgRegsSize,
499 unsigned &ArgRegsSaveSize)
const;
502 LowerCall(TargetLowering::CallLoweringInfo &CLI,
503 SmallVectorImpl<SDValue> &InVals)
const;
506 virtual void HandleByVal(CCState *,
unsigned &,
unsigned)
const;
511 bool IsEligibleForTailCallOptimization(SDValue Callee,
514 bool isCalleeStructRet,
515 bool isCallerStructRet,
516 const SmallVectorImpl<ISD::OutputArg> &Outs,
517 const SmallVectorImpl<SDValue> &OutVals,
518 const SmallVectorImpl<ISD::InputArg> &
Ins,
519 SelectionDAG& DAG)
const;
522 MachineFunction &MF,
bool isVarArg,
523 const SmallVectorImpl<ISD::OutputArg> &Outs,
524 LLVMContext &Context)
const;
527 LowerReturn(SDValue Chain,
529 const SmallVectorImpl<ISD::OutputArg> &Outs,
530 const SmallVectorImpl<SDValue> &OutVals,
531 SDLoc dl, SelectionDAG &DAG)
const;
533 virtual bool isUsedByReturnOnly(SDNode *N, SDValue &Chain)
const;
535 virtual bool mayBeEmittedAsTailCall(CallInst *CI)
const;
537 SDValue getARMCmp(SDValue LHS, SDValue RHS,
ISD::CondCode CC,
538 SDValue &ARMcc, SelectionDAG &DAG, SDLoc dl)
const;
539 SDValue getVFPCmp(SDValue LHS, SDValue RHS,
540 SelectionDAG &DAG, SDLoc dl)
const;
541 SDValue duplicateCmp(SDValue Cmp, SelectionDAG &DAG)
const;
543 SDValue OptimizeVFPBrcond(SDValue Op, SelectionDAG &DAG)
const;
545 MachineBasicBlock *EmitAtomicCmpSwap(MachineInstr *
MI,
546 MachineBasicBlock *BB,
547 unsigned Size)
const;
548 MachineBasicBlock *EmitAtomicBinary(MachineInstr *
MI,
549 MachineBasicBlock *BB,
551 unsigned BinOpcode)
const;
552 MachineBasicBlock *EmitAtomicBinary64(MachineInstr *
MI,
553 MachineBasicBlock *BB,
556 bool NeedsCarry =
false,
557 bool IsCmpxchg =
false,
558 bool IsMinMax =
false,
560 MachineBasicBlock * EmitAtomicBinaryMinMax(MachineInstr *
MI,
561 MachineBasicBlock *BB,
565 MachineBasicBlock *EmitAtomicLoad64(MachineInstr *
MI,
566 MachineBasicBlock *BB)
const;
568 void SetupEntryBlockForSjLj(MachineInstr *
MI,
569 MachineBasicBlock *MBB,
570 MachineBasicBlock *DispatchBB,
int FI)
const;
572 MachineBasicBlock *EmitSjLjDispatchBlock(MachineInstr *
MI,
573 MachineBasicBlock *MBB)
const;
575 bool RemapAddSubWithFlags(MachineInstr *
MI, MachineBasicBlock *BB)
const;
577 MachineBasicBlock *EmitStructByval(MachineInstr *
MI,
578 MachineBasicBlock *MBB)
const;
590 const TargetLibraryInfo *libInfo);
594 #endif // ARMISELLOWERING_H
std::pair< const TargetRegisterClass *, uint8_t > findRepresentativeClass(MVT VT) const
virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
virtual void AdjustInstrPostInstrSelection(MachineInstr *MI, SDNode *Node) const
virtual bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, unsigned Intrinsic) const
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
ARMTargetLowering(TargetMachine &TM)
virtual bool isZExtFree(Type *, Type *) const
ConstraintType getConstraintType(const std::string &Constraint) const
virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const
virtual EVT getSetCCResultType(LLVMContext &Context, EVT VT) const
getSetCCResultType - Return the value type to use for ISD::SETCC.
ID
LLVM Calling Convention Representation.
Sched::Preference getSchedulingPreference() const
Return target scheduling preference.
virtual FastISel * createFastISel(FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo) const
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
virtual bool allowsUnalignedMemoryAccesses(EVT VT, bool *Fast) const
virtual bool getPreIndexedAddressParts(SDNode *N, SDValue &Base, SDValue &Offset, ISD::MemIndexedMode &AM, SelectionDAG &DAG) const
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
virtual bool getPostIndexedAddressParts(SDNode *N, SDNode *Op, SDValue &Base, SDValue &Offset, ISD::MemIndexedMode &AM, SelectionDAG &DAG) const
virtual EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, bool IsMemset, bool ZeroMemset, bool MemcpyStrSrc, MachineFunction &MF) const
virtual bool ExpandInlineAsm(CallInst *CI) const
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const
ConstraintWeight getSingleConstraintMatchWeight(AsmOperandInfo &info, const char *constraint) const
virtual void computeMaskedBitsForTargetNode(const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth) const
virtual bool isZExtFree(SDValue Val, EVT VT2) const
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const
SDValue PerformCMOVCombine(SDNode *N, SelectionDAG &DAG) const
PerformCMOVCombine - Target-specific DAG combining for ARMISD::CMOV.
const ARMSubtarget * getSubtarget() const
virtual unsigned getJumpTableEncoding() const
virtual bool isSelectSupported(SelectSupportKind Kind) const
virtual unsigned getMaximalGlobalOffset() const
Instr is a return instruction.
CCValAssign - Represent assignment of one arg/retval to a location.
virtual bool isLegalICmpImmediate(int64_t Imm) const
virtual bool allowTruncateForTailCall(Type *Ty1, Type *Ty2) const
static const int FIRST_TARGET_MEMORY_OPCODE
Class for arbitrary precision integers.
AddrMode
ARM Addressing Modes.
bool isShuffleMaskLegal(const SmallVectorImpl< int > &M, EVT VT) const
virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const
SelectSupportKind
Enum that describes what type of support for selects the target has.
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const
virtual bool isLegalAddImmediate(int64_t Imm) const
virtual const char * getTargetNodeName(unsigned Opcode) const
This method returns the name of a target specific DAG node.
FastISel * createFastISel(FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo)
bool isDesirableToTransformToIntegerOp(unsigned Opc, EVT VT) const
bool isBitFieldInvertedMask(unsigned v)
bool isLegalT2ScaledAddressingMode(const AddrMode &AM, EVT VT) const
virtual const TargetRegisterClass * getRegClassFor(MVT VT) const