15 #ifndef LLVM_LIB_TARGET_MIPS_MIPSISELLOWERING_H
16 #define LLVM_LIB_TARGET_MIPS_MIPSISELLOWERING_H
212 class MipsFunctionInfo;
253 EVT VT)
const override;
263 return strcmp(S1, S2) < 0;
279 template <
class NodeTy>
281 bool IsN32OrN64)
const {
284 getTargetNode(N, Ty, DAG, GOTFlag));
290 getTargetNode(N, Ty, DAG, LoFlag));
298 template <
class NodeTy>
303 getTargetNode(N, Ty, DAG, Flag));
304 return DAG.
getLoad(Ty, DL, Chain, Tgt, PtrInfo,
false,
false,
false, 0);
311 template <
class NodeTy>
314 unsigned LoFlag,
SDValue Chain,
320 getTargetNode(N, Ty, DAG, LoFlag));
321 return DAG.
getLoad(Ty, DL, Chain, Wrapper, PtrInfo,
false,
false,
false,
329 template <
class NodeTy>
343 template <
class NodeTy>
358 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
359 bool IsPICCall,
bool GlobalOrExternal,
bool InternalLinkage,
360 bool IsCallReloc, CallLoweringInfo &CLI,
SDValue Callee,
375 unsigned Flag)
const;
379 unsigned Flag)
const;
383 unsigned Flag)
const;
387 unsigned Flag)
const;
391 unsigned Flag)
const;
428 isEligibleForTailCallOptimization(
const CCState &CCInfo,
429 unsigned NextStackOffset,
435 void copyByValRegs(
SDValue Chain,
SDLoc DL, std::vector<SDValue> &OutChains,
438 const Argument *FuncArg,
unsigned FirstReg,
444 std::deque<std::pair<unsigned, SDValue>> &RegsToPass,
447 unsigned FirstReg,
unsigned LastReg,
454 void writeVarArgRegs(std::vector<SDValue> &OutChains,
SDValue Chain,
458 LowerFormalArguments(
SDValue Chain,
482 bool shouldSignExtendTypeInLibCall(
EVT Type,
bool IsSigned)
const override;
494 std::pair<unsigned, const TargetRegisterClass *>
497 std::pair<unsigned, const TargetRegisterClass *>
505 void LowerAsmOperandForConstraint(
SDValue Op,
506 std::string &Constraint,
507 std::vector<SDValue> &Ops,
511 getInlineAsmMemConstraint(
StringRef ConstraintCode)
const override {
512 if (ConstraintCode ==
"R")
514 else if (ConstraintCode ==
"ZC")
520 Type *Ty,
unsigned AS)
const override;
524 EVT getOptimalMemOpType(uint64_t Size,
unsigned DstAlign,
526 bool IsMemset,
bool ZeroMemset,
533 bool isFPImmLegal(
const APFloat &Imm,
EVT VT)
const override;
535 unsigned getJumpTableEncoding()
const override;
536 bool useSoftFloat()
const override;
541 unsigned Size,
unsigned DstReg,
542 unsigned SrcRec)
const;
545 unsigned Size,
unsigned BinOpcode,
bool Nand =
false)
const;
548 bool Nand =
false)
const;
560 const MipsTargetLowering *
562 const MipsSubtarget &STI);
563 const MipsTargetLowering *
565 const MipsSubtarget &STI);
569 const TargetLibraryInfo *libInfo);
const MipsTargetLowering * createMipsSETargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI)
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. ...
FastISel * createFastISel(FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo)
LLVM Argument representation.
const MipsSubtarget & Subtarget
const MipsTargetLowering * createMips16TargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI)
Create MipsTargetLowering objects.
MipsTargetLowering(const MipsTargetMachine &TM, const MipsSubtarget &STI)
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, bool isInvariant, unsigned Alignment, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr)
Loads are not normal binary operators: their result type is not determined by their operands...
void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
ReplaceNodeResults - Replace the results of node with an illegal result type with new values built ou...
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context, EVT VT) const override
getSetCCResultType - get the ISD::SETCC result ValueType
void LowerOperationWrapper(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
This callback is invoked by the type legalizer to legalize nodes with an illegal operand type but leg...
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
SDValue getGlobalReg(SelectionDAG &DAG, EVT Ty) const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
SDVTList getVTList(EVT VT)
Return an SDVTList that represents the list of values specified.
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
MO_ABS_HI/LO - Represents the hi or low part of an absolute symbol address.
SDValue getAddrGlobalLargeGOT(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG, unsigned HiFlag, unsigned LoFlag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
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.
Simple integer binary arithmetic operators.
unsigned getRegisterByName(const char *RegName, EVT VT, SelectionDAG &DAG) const override
Return the register ID of the name passed in.
SDValue getAddrLocal(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG, bool IsN32OrN64) const
SDValue getAddrGlobal(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG, unsigned Flag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
MO_GPREL - Represents the offset from the current gp value to be used for the relocatable object file...
Flag
These should be considered private to the implementation of the MCInstrDesc class.
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
MVT - Machine Value Type.
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.
bool operator()(const char *S1, const char *S2) const
SDValue getAddrNonPIC(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG) const
void HandleByVal(CCState *, unsigned &, unsigned) const override
Target-specific cleanup for formal ByVal parameters.
static const MipsTargetLowering * create(const MipsTargetMachine &TM, const MipsSubtarget &STI)
EVT - Extended Value Type.
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.
MachinePointerInfo - This class contains a discriminated union of information about pointers in memor...
CCState - This class holds information needed while lowering arguments and return values...
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
SDValue lowerSTORE(SDValue Op, SelectionDAG &DAG) const
virtual unsigned getInlineAsmMemConstraint(StringRef ConstraintCode) const
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...
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.
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
LowerOperation - Provide custom lowering hooks for some operations.
FastISel * createFastISel(FunctionLoweringInfo &funcInfo, const TargetLibraryInfo *libInfo) const override
createFastISel - This method returns a target specific FastISel object, or null if the target does no...
AddrMode
ARM Addressing Modes.
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT, ArrayRef< SDUse > Ops)
Gets or creates the specified node.
static MachinePointerInfo getGOT()
getGOT - Return a MachinePointerInfo record that refers to a GOT entry.
Representation of each machine instruction.
SDValue lowerLOAD(SDValue Op, SelectionDAG &DAG) const
MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const override
This method should be implemented by targets that mark instructions with the 'usesCustomInserter' fla...
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
MipsFunctionInfo - This class is derived from MachineFunction private Mips target-specific informatio...
virtual void getOpndList(SmallVectorImpl< SDValue > &Ops, std::deque< std::pair< unsigned, SDValue > > &RegsToPass, bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage, bool IsCallReloc, CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const
This function fills Ops, which is the list of operands that will later be used when a function call n...
SDValue getRegister(unsigned Reg, EVT VT)
StringRef - Represent a constant reference to a string, i.e.
SDValue getEntryNode() const
Return the token chain corresponding to the entry of the function.
const char * getTargetNodeName(unsigned Opcode) const override
getTargetNodeName - This method returns the name of a target specific
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
SDValue getAddrGPRel(NodeTy *N, SDLoc DL, EVT Ty, SelectionDAG &DAG) const
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...
MVT getScalarShiftAmountTy(const DataLayout &, EVT) const override
EVT is not used in-tree, but is used by out-of-tree target.
This file describes how to lower LLVM code to machine code.