15 #ifndef MipsISELLOWERING_H
16 #define MipsISELLOWERING_H
209 class MipsFunctionInfo;
246 return strcmp(S1, S2) < 0;
257 template<
class NodeTy>
263 getTargetNode(N, Ty, DAG, GOTFlag));
269 getTargetNode(N, Ty, DAG, LoFlag));
277 template<
class NodeTy>
283 getTargetNode(N, Ty, DAG, Flag));
284 return DAG.
getLoad(Ty, DL, Chain, Tgt, PtrInfo,
false,
false,
false, 0);
291 template<
class NodeTy>
293 unsigned HiFlag,
unsigned LoFlag,
298 getTargetNode(N, Ty, DAG, HiFlag));
301 getTargetNode(N, Ty, DAG, LoFlag));
302 return DAG.
getLoad(Ty, DL, Chain, Wrapper, PtrInfo,
false,
false,
false,
310 template<
class NodeTy>
325 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
326 bool IsPICCall,
bool GlobalOrExternal,
bool InternalLinkage,
351 bool IsVarArg,
bool IsSoftFloat,
353 std::vector<ArgListEntry> &FuncArgs);
359 bool IsSoftFloat,
const SDNode *CallNode,
360 const Type *RetTy)
const;
363 bool IsSoftFloat,
const Type *RetTy)
const;
371 unsigned regSize()
const {
return IsO32 ? 4 : 8; }
388 void handleByValArg(
unsigned ValNo,
MVT ValVT,
MVT LocVT,
402 const uint16_t *shadowRegs()
const;
404 void allocateRegs(ByValArgInfo &ByVal,
unsigned ByValSize,
412 bool IsSoftFloat)
const;
414 template<
typename Ty>
416 const SDNode *CallNode,
const Type *RetTy)
const;
425 SDValue
lowerLOAD(SDValue Op, SelectionDAG &DAG)
const;
426 SDValue
lowerSTORE(SDValue Op, SelectionDAG &DAG)
const;
436 unsigned Flag)
const;
440 unsigned Flag)
const;
444 unsigned Flag)
const;
448 unsigned Flag)
const;
452 unsigned Flag)
const;
461 const SDNode *CallNode,
const Type *RetTy)
const;
490 isEligibleForTailCallOptimization(
const MipsCC &MipsCCInfo,
491 unsigned NextStackOffset,
506 std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
515 void writeVarArgRegs(std::vector<SDValue> &OutChains,
const MipsCC &CC,
519 LowerFormalArguments(
SDValue Chain,
547 ConstraintType getConstraintType(
const std::string &Constraint)
const;
556 std::pair<unsigned, const TargetRegisterClass *>
557 parseRegForInlineAsmConstraint(
const StringRef &
C,
MVT VT)
const;
559 std::pair<unsigned, const TargetRegisterClass*>
560 getRegForInlineAsmConstraint(
const std::string &Constraint,
567 virtual void LowerAsmOperandForConstraint(
SDValue Op,
568 std::string &Constraint,
569 std::vector<SDValue> &Ops,
572 virtual bool isLegalAddressingMode(
const AddrMode &AM,
Type *Ty)
const;
576 virtual EVT getOptimalMemOpType(uint64_t Size,
unsigned DstAlign,
578 bool IsMemset,
bool ZeroMemset,
585 virtual bool isFPImmLegal(
const APFloat &Imm,
EVT VT)
const;
587 virtual unsigned getJumpTableEncoding()
const;
590 unsigned Size,
unsigned BinOpcode,
bool Nand =
false)
const;
593 bool Nand =
false)
const;
605 #endif // MipsISELLOWERING_H
int strcmp(const char *s1, const char *s2);
SDValue getAddrGlobal(NodeTy *N, EVT Ty, SelectionDAG &DAG, unsigned Flag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
virtual void getOpndList(SmallVectorImpl< SDValue > &Ops, std::deque< std::pair< unsigned, SDValue > > &RegsToPass, bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage, CallLoweringInfo &CLI, SDValue Callee, SDValue Chain) const
byval_iterator byval_begin() const
LLVM Argument representation.
const uint16_t * intArgRegs() const
Return pointer to array of integer argument registers.
MipsTargetLowering(MipsTargetMachine &TM)
bool hasByValArg() const
hasByValArg - Returns true if function has byval arguments.
bool CCAssignFn(unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, ISD::ArgFlagsTy ArgFlags, CCState &State)
ByValArgInfo - Byval argument information.
EVT getSetCCResultType(LLVMContext &Context, EVT VT) const
getSetCCResultType - get the ISD::SETCC result ValueType
void analyzeCallResult(const SmallVectorImpl< ISD::InputArg > &Ins, bool IsSoftFloat, const SDNode *CallNode, const Type *RetTy) const
virtual void LowerOperationWrapper(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, bool isInvariant, unsigned Alignment, const MDNode *TBAAInfo=0, const MDNode *Ranges=0)
unsigned regSize() const
regSize - Size (in number of bits) of integer registers.
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
SDValue getGlobalReg(SelectionDAG &DAG, EVT Ty) const
Abstract Stack Frame Information.
const CCState & getCCInfo() const
ID
LLVM Calling Convention Representation.
unsigned numIntArgRegs() const
numIntArgRegs - Number of integer registers available for calls.
This contains information for each constraint that we are lowering.
Simple integer binary arithmetic operators.
SDValue getAddrGlobalLargeGOT(NodeTy *N, EVT Ty, SelectionDAG &DAG, unsigned HiFlag, unsigned LoFlag, SDValue Chain, const MachinePointerInfo &PtrInfo) const
virtual const char * getTargetNodeName(unsigned Opcode) const
getTargetNodeName - This method returns the name of a target specific
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
void analyzeReturn(const SmallVectorImpl< ISD::OutputArg > &Outs, bool IsSoftFloat, const Type *RetTy) const
bool operator()(const char *S1, const char *S2) const
byval_iterator byval_end() const
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
LowerOperation - Provide custom lowering hooks for some operations.
virtual MVT getScalarShiftAmountTy(EVT LHSTy) const
const MipsSubtarget * Subtarget
SDValue getAddrNonPIC(NodeTy *N, EVT Ty, SelectionDAG &DAG) const
virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
const MipsTargetLowering * createMipsSETargetLowering(MipsTargetMachine &TM)
MipsCC(CallingConv::ID CallConv, bool IsO32, bool IsFP64, CCState &Info, SpecialCallingConvType SpecialCallingConv=NoSpecialCallingConv)
SDValue lowerSTORE(SDValue Op, SelectionDAG &DAG) const
void analyzeFormalArguments(const SmallVectorImpl< ISD::InputArg > &Ins, bool IsSoftFloat, Function::const_arg_iterator FuncArg)
static const int FIRST_TARGET_MEMORY_OPCODE
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(DefaultAlign), cl::values(clEnumValN(DefaultAlign,"arm-default-align","Generate unaligned accesses only on hardware/OS ""combinations that are known to support them"), clEnumValN(StrictAlign,"arm-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"arm-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
unsigned reservedArgArea() const
static MachinePointerInfo getGOT()
SDValue lowerLOAD(SDValue Op, SelectionDAG &DAG) const
SmallVectorImpl< ByValArgInfo >::const_iterator byval_iterator
static const MipsTargetLowering * create(MipsTargetMachine &TM)
void analyzeCallOperands(const SmallVectorImpl< ISD::OutputArg > &Outs, bool IsVarArg, bool IsSoftFloat, const SDNode *CallNode, std::vector< ArgListEntry > &FuncArgs)
const MipsTargetLowering * createMips16TargetLowering(MipsTargetMachine &TM)
Create MipsTargetLowering objects.
virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const
SDValue getEntryNode() const
SDValue getAddrLocal(NodeTy *N, EVT Ty, SelectionDAG &DAG, bool HasMips64) const