42 assert (ArgFlags.
isSRet());
55 static const uint16_t RegList[] = {
56 SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5
84 "Can't handle non-64 bits locations");
90 if (LocVT ==
MVT::i64 && Offset < 6*8)
92 Reg = SP::I0 + Offset/8;
93 else if (LocVT ==
MVT::f64 && Offset < 16*8)
95 Reg = SP::D0 + Offset/8;
96 else if (LocVT ==
MVT::f32 && Offset < 16*8)
98 Reg = SP::F1 + Offset/4;
122 assert(LocVT.
getSizeInBits() == 32 &&
"Can't handle non-32 bits locations");
125 if (LocVT ==
MVT::f32 && Offset < 16*8) {
132 if (LocVT ==
MVT::i32 && Offset < 6*8) {
134 unsigned Reg = SP::I0 + Offset/8;
151 #include "SparcGenCallingConv.inc"
157 assert(SP::I0 + 7 == SP::I7 && SP::O0 + 7 == SP::O7 &&
"Unexpected enum");
158 if (Reg >= SP::I0 && Reg <= SP::I7)
159 return Reg - SP::I0 + SP::O0;
170 return LowerReturn_64(Chain, CallConv, IsVarArg, Outs, OutVals, DL, DAG);
171 return LowerReturn_32(Chain, CallConv, IsVarArg, Outs, OutVals, DL, DAG);
198 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
200 assert(VA.
isRegLoc() &&
"Can only return in registers!");
210 unsigned RetAddrOffset = 8;
232 &RetOps[0], RetOps.
size());
261 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
263 assert(VA.
isRegLoc() &&
"Can only return in registers!");
288 if (i+1 < RVLocs.
size() && RVLocs[i+1].getLocReg() == VA.
getLocReg()) {
310 &RetOps[0], RetOps.
size());
349 const unsigned StackOffset = 92;
351 for (
unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
354 if (i == 0 && Ins[i].
Flags.isSRet()) {
360 false,
false,
false, 0);
382 false,
false,
false, 0);
385 &SP::IntRegsRegClass);
415 if (Offset % 8 == 0) {
422 false,
false,
false, 0);
433 false,
false,
false, 0);
441 false,
false,
false, 0);
458 false,
false,
false, 0);
487 static const uint16_t ArgRegs[] = {
488 SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5
490 unsigned NumAllocated = CCInfo.getFirstUnallocated(ArgRegs, 6);
491 const uint16_t *CurArgReg = ArgRegs+NumAllocated, *ArgRegEnd = ArgRegs+6;
492 unsigned ArgOffset = CCInfo.getNextStackOffset();
493 if (NumAllocated == 6)
494 ArgOffset += StackOffset;
497 ArgOffset = 68+4*NumAllocated;
503 std::vector<SDValue> OutChains;
505 for (; CurArgReg != ArgRegEnd; ++CurArgReg) {
520 if (!OutChains.empty()) {
521 OutChains.push_back(Chain);
523 &OutChains[0], OutChains.size());
548 const unsigned ArgArea = 128;
550 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
599 Offset += 8 - ValSize;
604 false,
false,
false, 0));
617 unsigned ArgOffset = CCInfo.getNextStackOffset();
627 for (; ArgOffset < 6*8; ArgOffset += 8) {
628 unsigned VReg = MF.
addLiveIn(SP::I0 + ArgOffset/8, &SP::I64RegsRegClass);
637 if (!OutChains.
empty())
639 &OutChains[0], OutChains.
size());
661 dyn_cast<ExternalSymbolSDNode>(Callee)) {
664 const char *CalleeName = E->getSymbol();
698 unsigned ArgsSize = CCInfo.getNextStackOffset();
701 ArgsSize = (ArgsSize+7) & ~7;
707 for (
unsigned i = 0, e = Outs.
size(); i != e; ++i) {
720 Chain = DAG.
getMemcpy(Chain, dl, FIPtr, Arg, SizeNode, Align,
733 const unsigned StackOffset = 92;
734 bool hasStructRetAttr =
false;
736 for (
unsigned i = 0, realArgIdx = 0, byvalArgIdx = 0, e = ArgLocs.
size();
740 SDValue Arg = OutVals[realArgIdx];
746 Arg = ByValArgs[byvalArgIdx++];
775 hasStructRetAttr =
true;
785 if (Offset % 8 == 0) {
804 StackPtr = DAG.
getNode(
ISD::ADD, dl, StackPtr.getValueType(), StackPtr,
870 if (!MemOpChains.
empty())
872 &MemOpChains[0], MemOpChains.
size());
879 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
881 Chain = DAG.
getCopyToReg(Chain, dl, Reg, RegsToPass[i].second, InFlag);
885 unsigned SRetArgSize = (hasStructRetAttr)?
getSRetArgSize(DAG, Callee):0;
901 if (hasStructRetAttr)
903 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i)
905 RegsToPass[i].second.getValueType()));
910 const uint32_t *Mask = ((hasReturnsTwice)
913 assert(Mask &&
"Missing call preserved mask for calling convention");
934 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
936 RVLocs[i].getValVT(), InFlag).
getValue(1);
948 static const char *
const ABICalls[] =
949 {
"_Q_add",
"_Q_sub",
"_Q_mul",
"_Q_div",
951 "_Q_itoq",
"_Q_stoq",
"_Q_dtoq",
"_Q_utoq",
952 "_Q_lltoq",
"_Q_ulltoq",
955 for (
const char *
const *
I = ABICalls; *
I != 0; ++
I)
956 if (
strcmp(CalleeName, *
I) == 0)
968 dyn_cast<ExternalSymbolSDNode>(Callee)) {
971 const char *CalleeName = E->getSymbol();
981 "Callee does not have the StructRet attribute.");
984 Type *ElementTy = Ty->getElementType();
999 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
1013 unsigned Offset = 8 * (VA.
getLocReg() - SP::D0);
1014 assert(Offset < 16*8 &&
"Offset out of range, bad register enum?");
1018 unsigned IReg = SP::I0 + Offset/8;
1052 unsigned ArgsSize = std::max(6*8u, CCInfo.getNextStackOffset());
1077 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
1110 if (i+1 < ArgLocs.
size() && ArgLocs[i+1].isRegLoc() &&
1111 ArgLocs[i+1].getLocReg() == VA.
getLocReg()) {
1139 if (!MemOpChains.
empty())
1141 &MemOpChains[0], MemOpChains.
size());
1148 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
1150 RegsToPass[i].first, RegsToPass[i].second, InGlue);
1168 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i)
1170 RegsToPass[i].second.getValueType()));
1175 const uint32_t *Mask = ((hasReturnsTwice)
1178 assert(Mask &&
"Missing call preserved mask for calling convention");
1206 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
1219 if (!RV.getNode()) {
1220 RV = DAG.
getCopyFromReg(Chain, DL, Reg, RVLocs[i].getLocVT(), InGlue);
1420 if (!Subtarget->
isV9()) {
1481 if (Subtarget->
isV9())
1500 if (Subtarget->
isV9()) {
1610 unsigned Depth)
const {
1611 APInt KnownZero2, KnownOne2;
1621 assert((KnownZero & KnownOne) == 0 &&
"Bits known to be one AND zero?");
1622 assert((KnownZero2 & KnownOne2) == 0 &&
"Bits known to be one AND zero?");
1625 KnownOne &= KnownOne2;
1626 KnownZero &= KnownZero2;
1635 if (isa<ConstantSDNode>(RHS) &&
1636 cast<ConstantSDNode>(RHS)->isNullValue() &&
1645 cast<ConstantSDNode>(LHS.
getOperand(0))->isOne() &&
1646 cast<ConstantSDNode>(LHS.
getOperand(1))->isNullValue()) {
1648 SPCC = cast<ConstantSDNode>(LHS.
getOperand(2))->getZExtValue();
1660 GA->getValueType(0),
1661 GA->getOffset(), TF);
1665 CP->getValueType(0),
1667 CP->getOffset(), TF);
1677 ES->getValueType(0), TF);
1685 unsigned HiTF,
unsigned LoTF,
1784 Chain = DAG.
getCopyToReg(Chain, DL, SP::O0, Argument, InFlag);
1797 assert(Mask &&
"Missing call preserved mask for calling convention");
1880 Args.push_back(Entry);
1886 const char *LibFuncName,
1887 unsigned numArgs)
const {
1895 Type *RetTyABI = RetTy;
1904 Entry.
Node = RetPtr;
1909 Args.push_back(Entry);
1913 assert(Op->
getNumOperands() >= numArgs &&
"Not enough operands!");
1914 for (
unsigned i = 0, e = numArgs; i != e; ++i) {
1920 false,
false,
false,
false,
1923 Callee, Args, DAG,
SDLoc(Op));
1924 std::pair<SDValue, SDValue> CallInfo =
LowerCallTo(CLI);
1927 if (RetTyABI == RetTy)
1928 return CallInfo.first;
1930 assert (RetTy->
isFP128Ty() &&
"Unexpected return type!");
1932 Chain = CallInfo.second;
1940 false,
false,
false, 8);
1949 const char *LibCall = 0;
1950 bool is64Bit = Subtarget->
is64Bit();
1953 case SPCC::FCC_E : LibCall = is64Bit?
"_Qp_feq" :
"_Q_feq";
break;
1954 case SPCC::FCC_NE : LibCall = is64Bit?
"_Qp_fne" :
"_Q_fne";
break;
1955 case SPCC::FCC_L : LibCall = is64Bit?
"_Qp_flt" :
"_Q_flt";
break;
1956 case SPCC::FCC_G : LibCall = is64Bit?
"_Qp_fgt" :
"_Q_fgt";
break;
1957 case SPCC::FCC_LE : LibCall = is64Bit?
"_Qp_fle" :
"_Q_fle";
break;
1958 case SPCC::FCC_GE : LibCall = is64Bit?
"_Qp_fge" :
"_Q_fge";
break;
1966 case SPCC::FCC_UE : LibCall = is64Bit?
"_Qp_cmp" :
"_Q_cmp";
break;
1979 false,
false,
false,
false,
1982 Callee, Args, DAG, DL);
1984 std::pair<SDValue, SDValue> CallInfo =
LowerCallTo(CLI);
1987 SDValue Result = CallInfo.first;
2185 unsigned Opc, SPCC = ~0U;
2222 unsigned Opc, SPCC = ~0U;
2275 const Value *SV = cast<SrcValueSDNode>(Node->
getOperand(2))->getValue();
2288 false,
false,
false,
2297 unsigned SPReg = SP::O6;
2306 SDValue Ops[2] = { NewVal, Chain };
2324 unsigned FrameReg = SP::I6;
2336 for (uint64_t i = 0; i != depth; ++i) {
2372 for (uint64_t i = 0; i != depth; ++i) {
2420 &&
"Unexpected node type");
2431 false,
false,
false, alignment);
2441 false,
false,
false, alignment);
2471 &&
"Unexpected node type");
2496 false,
false, alignment);
2506 false,
false, alignment);
2517 return TLI.
LowerF128Op(Op, DAG, ((is64Bit) ?
"_Qp_neg" :
"_Q_neg"), 1);
2569 bool hasChain =
false;
2595 SDValue Ops[2] = { Dst, Carry };
2603 bool is64Bit = Subtarget->
is64Bit();
2604 bool isV9 = Subtarget->
isV9();
2664 case SP::SELECT_CC_Int_ICC:
2665 case SP::SELECT_CC_FP_ICC:
2666 case SP::SELECT_CC_DFP_ICC:
2667 case SP::SELECT_CC_QFP_ICC:
2668 BROpcode = SP::BCOND;
2670 case SP::SELECT_CC_Int_FCC:
2671 case SP::SELECT_CC_FP_FCC:
2672 case SP::SELECT_CC_DFP_FCC:
2673 case SP::SELECT_CC_QFP_FCC:
2674 BROpcode = SP::FBCOND;
2740 if (Constraint.size() == 1) {
2741 switch (Constraint[0]) {
2750 std::pair<unsigned, const TargetRegisterClass*>
2753 if (Constraint.size() == 1) {
2754 switch (Constraint[0]) {
2756 return std::make_pair(0U, &SP::IntRegsRegClass);
2779 llvm_unreachable(
"Do not know how to custom type legalize this operation!");
void setFrameAddressIsTaken(bool T)
int strcmp(const char *s1, const char *s2);
static SDValue LowerFP_TO_SINT(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
void AnalyzeCallResult(const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
void push_back(const T &Elt)
const MachineFunction * getParent() const
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget=false)
SDValue getValue(unsigned R) const
SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const
static CCValAssign getCustomReg(unsigned ValNo, MVT ValVT, unsigned RegNo, MVT LocVT, LocInfo HTP)
LLVMContext * getContext() const
LLVM Argument representation.
SDValue getCopyToReg(SDValue Chain, SDLoc dl, unsigned Reg, SDValue N)
static SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG)
SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue InGlue, SDLoc DL)
static SPCC::CondCodes IntCondCCodeToICC(ISD::CondCode CC)
LocInfo getLocInfo() const
unsigned getSRetArgSize(SelectionDAG &DAG, SDValue Callee) const
static SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
SDValue makeHiLoPair(SDValue Op, unsigned HiTF, unsigned LoTF, SelectionDAG &DAG) const
The main container class for the LLVM Intermediate Representation.
const TargetMachine & getTargetMachine() const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass)
void addLiveIn(unsigned Reg, unsigned vreg=0)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const TargetMachine & getTarget() const
virtual const uint32_t * getCallPreservedMask(CallingConv::ID) const
unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC)
void AnalyzeFormalArguments(const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) const
virtual ConstraintType getConstraintType(const std::string &Constraint) const
Given a constraint, return the type of constraint it is for this target.
const GlobalValue * getGlobal() const
SDValue LowerCall_32(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const
unsigned getOpcode() const
ConstraintType getConstraintType(const std::string &Constraint) const
Type * getTypeForEVT(LLVMContext &Context) const
unsigned getSizeInBits() const
unsigned getByValSize() const
unsigned getNumOperands() const
static bool CC_Sparc64_Full(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB)
const SDValue & getOperand(unsigned Num) const
const Function * getFunction() const
SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned char TargetFlags=0)
void ComputeMaskedBits(SDValue Op, APInt &KnownZero, APInt &KnownOne, unsigned Depth=0) const
unsigned getValNo() const
const SDValue & getBasePtr() const
SDValue getExternalSymbol(const char *Sym, EVT VT)
virtual void computeMaskedBitsForTargetNode(const SDValue Op, APInt &KnownZero, APInt &KnownOne, const SelectionDAG &DAG, unsigned Depth=0) const
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
static MachinePointerInfo getFixedStack(int FI, int64_t offset=0)
static bool CC_Sparc_Assign_SRet(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
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)
SDValue LowerCall_64(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const
static SDValue LowerF128_FPROUND(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
const uint32_t * getRTCallPreservedMask(CallingConv::ID CC) const
static SDValue LowerF128_FPEXTEND(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
const HexagonInstrInfo * TII
static void fixupVariableFloatArgs(SmallVectorImpl< CCValAssign > &ArgLocs, ArrayRef< ISD::OutputArg > Outs)
#define llvm_unreachable(msg)
EVT getValueType(unsigned ResNo) const
MachineFunction & getMachineFunction() const
SDValue getTargetGlobalAddress(const GlobalValue *GV, SDLoc DL, EVT VT, int64_t offset=0, unsigned char TargetFlags=0)
void addLoc(const CCValAssign &V)
Abstract Stack Frame Information.
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
SDValue LowerF128_LibCallArg(SDValue Chain, ArgListTy &Args, SDValue Arg, SDLoc DL, SelectionDAG &DAG) const
SDVTList getVTList(EVT VT)
virtual MVT getPointerTy(uint32_t=0) const
ID
LLVM Calling Convention Representation.
const MachineInstrBuilder & addImm(int64_t Val) const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
SmallVector< ISD::InputArg, 32 > Ins
static void LookThroughSetCC(SDValue &LHS, SDValue &RHS, ISD::CondCode CC, unsigned &SPCC)
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc dl, SelectionDAG &DAG) const
SDValue getCALLSEQ_START(SDValue Chain, SDValue Op, SDLoc DL)
unsigned getLocReg() const
std::pair< SDValue, SDValue > LowerCallTo(CallLoweringInfo &CLI) const
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
SDValue getRegisterMask(const uint32_t *RegMask)
bool hasStructRetAttr() const
Determine if the function returns a structure through first pointer argument.
SparcTargetLowering(TargetMachine &TM)
SDValue withTargetFlags(SDValue Op, unsigned TF, SelectionDAG &DAG) const
void setSRetReturnReg(unsigned Reg)
Simple integer binary arithmetic operators.
SmallVector< ISD::OutputArg, 32 > Outs
const SDValue & getBasePtr() const
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *MBB) const
static SDValue LowerF64Op(SDValue Op, SelectionDAG &DAG, unsigned opcode)
SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
const BasicBlock * getBasicBlock() const
UNDEF - An undefined node.
static CCValAssign getReg(unsigned ValNo, MVT ValVT, unsigned RegNo, MVT LocVT, LocInfo HTP)
Function * getFunction(StringRef Name) const
const uint32_t * getCallPreservedMask(CallingConv::ID CC) const
SDNode * getNode() const
get the SDNode which holds the desired result
bundle_iterator< MachineInstr, instr_iterator > iterator
bool isTypeLegal(EVT VT) const
int getVarArgsFrameOffset() const
MachineBasicBlock * CreateMachineBasicBlock(const BasicBlock *bb=0)
CodeModel::Model getCodeModel() const
static bool CC_Sparc64_Half(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
LLVM Basic Block Representation.
const SDValue & getOperand(unsigned i) const
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
Simple binary floating point operators.
static bool CC_Sparc_Assign_f64(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
const MachineOperand & getOperand(unsigned i) const
static bool hasReturnsTwiceAttr(SelectionDAG &DAG, SDValue Callee, ImmutableCallSite *CS)
virtual SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const
static SDValue LowerF128Store(SDValue Op, SelectionDAG &DAG)
unsigned getSRetReturnReg() const
static Type * getVoidTy(LLVMContext &C)
ItTy next(ItTy it, Dist n)
SDValue getCopyFromReg(SDValue Chain, SDLoc dl, unsigned Reg, EVT VT)
const DataLayout * getDataLayout() const
unsigned getBitWidth() const
Return the number of bits in the APInt.
unsigned getOpcode() const
static SDValue LowerUINT_TO_FP(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
SDValue LowerFormalArguments_64(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const
const SDValue & getValue() const
Bit counting operators with an undefined result for zero inputs.
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type.
bool isFP128Ty() const
isFP128Ty - Return true if this is 'fp128'.
void setVarArgsFrameOffset(int Offset)
std::vector< ArgListEntry > ArgListTy
const SDValue & getRoot() const
const MCInstrDesc & get(unsigned Opcode) const
SDValue CreateStackTemporary(EVT VT, unsigned minAlign=1)
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const
const MachinePointerInfo & getPointerInfo() const
SDValue getMemcpy(SDValue Chain, SDLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)
unsigned getByValAlign() const
const SDValue & getOffset() const
void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action)
SDValue getTargetConstantPool(const Constant *C, EVT VT, unsigned Align=0, int Offset=0, unsigned char TargetFlags=0)
virtual const TargetInstrInfo * getInstrInfo() const
static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG)
static PointerType * getUnqual(Type *ElementType)
static bool isFP128ABICall(const char *CalleeName)
const STC & getSubtarget() const
const char * getLibcallName(RTLIB::Libcall Call) const
Get the libcall routine name for the specified libcall.
SDValue LowerFormalArguments_32(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const
uint64_t getTypeAllocSize(Type *Ty) const
void setExceptionPointerRegister(unsigned R)
SDValue getTargetInsertSubreg(int SRIdx, SDLoc DL, EVT VT, SDValue Operand, SDValue Subreg)
SDValue getExtLoad(ISD::LoadExtType ExtType, SDLoc dl, EVT VT, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, EVT MemVT, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
CCValAssign - Represent assignment of one arg/retval to a location.
SDValue getIntPtrConstant(uint64_t Val, bool isTarget=false)
const SDValue & getChain() const
Byte Swap and Counting operators.
MachineFrameInfo * getFrameInfo()
static SDValue getFLUSHW(SDValue Op, SelectionDAG &DAG)
SDValue makeAddress(SDValue Op, SelectionDAG &DAG) const
Class for arbitrary precision integers.
static SDValue LowerFABS(SDValue Op, SelectionDAG &DAG, bool isV9)
void computeRegisterProperties()
void setExceptionSelectorRegister(unsigned R)
static SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG)
virtual const char * getTargetNodeName(unsigned Opcode) const
This method returns the name of a target specific DAG node.
void setMinFunctionAlignment(unsigned Align)
Set the target's minimum function alignment (in log2(bytes))
virtual const TargetRegisterClass * getRegClassFor(MVT VT) const
static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
ZERO_EXTEND - Used for integer types, zeroing the new bits.
static SPCC::CondCodes FPCondCCodeToFCC(ISD::CondCode CC)
void AnalyzeCallOperands(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
ANY_EXTEND - Used for integer types. The high bits are undefined.
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))
uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align)
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const
static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
static MachinePointerInfo getGOT()
int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSS, bool MayNeedSP=false, const AllocaInst *Alloca=0)
SDValue getTargetBlockAddress(const BlockAddress *BA, EVT VT, int64_t Offset=0, unsigned char TargetFlags=0)
uint64_t getConstantOperandVal(unsigned i) const
SmallVector< SDValue, 32 > OutVals
Bitwise operators - logical and, logical or, logical xor.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
MachineRegisterInfo & getRegInfo()
static IntegerType * getInt32Ty(LLVMContext &C)
SDValue LowerReturn_64(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc DL, SelectionDAG &DAG) const
bool hasFnAttr(Attribute::AttrKind A) const
Return true if this function has the given attribute.
IMPLICIT_DEF - This is the MachineInstr-level equivalent of undef.
static CCValAssign getCustomMem(unsigned ValNo, MVT ValVT, unsigned Offset, MVT LocVT, LocInfo HTP)
ImmutableCallSite - establish a view to a call site for examination.
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
void AnalyzeReturn(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
void setStackPointerRegisterToSaveRestore(unsigned R)
SDValue LowerReturn_32(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc DL, SelectionDAG &DAG) const
const SDValue & getOffset() const
void setLibcallName(RTLIB::Libcall Call, const char *Name)
Rename the default libcall routine name for the specified libcall.
static SDValue LowerFP_TO_UINT(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
SDValue LowerF128Compare(SDValue LHS, SDValue RHS, unsigned &SPCC, SDLoc DL, SelectionDAG &DAG) const
MachineSDNode * getMachineNode(unsigned Opcode, SDLoc dl, EVT VT)
static CCValAssign getMem(unsigned ValNo, MVT ValVT, unsigned Offset, MVT LocVT, LocInfo HTP)
virtual const TargetRegisterInfo * getRegisterInfo() const
FSINCOS - Compute both fsin and fcos as a single operation.
TLSModel::Model getTLSModel(const GlobalValue *GV) const
unsigned getReg() const
getReg - Returns the register number.
Function can return twice.
void insert(iterator MBBI, MachineBasicBlock *MBB)
SDValue getFrameIndex(int FI, EVT VT, bool isTarget=false)
void setReturnAddressIsTaken(bool s)
SDValue getTargetExtractSubreg(int SRIdx, SDLoc DL, EVT VT, SDValue Operand)
LLVM Value Representation.
SDValue getRegister(unsigned Reg, EVT VT)
SDValue getValueType(EVT)
static SDValue LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool hasHardQuad)
BasicBlockListType::iterator iterator
SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const
SDValue getMergeValues(const SDValue *Ops, unsigned NumOps, SDLoc dl)
getMergeValues - Create a MERGE_VALUES node from the given operands.
SDValue getTargetConstant(uint64_t Val, EVT VT)
int64_t getStackPointerBias() const
unsigned getLocMemOffset() const
SDValue getEntryNode() const
int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool Immutable)
TRUNCATE - Completely drop the high bits.
unsigned getAlignment() const
unsigned AllocateReg(unsigned Reg)
static SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI)
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
SDValue LowerF128Op(SDValue Op, SelectionDAG &DAG, const char *LibFuncName, unsigned numArgs) const
unsigned AllocateStack(unsigned Size, unsigned Align)
void addSuccessor(MachineBasicBlock *succ, uint32_t weight=0)
static SDValue LowerFNEG(SDValue Op, SelectionDAG &DAG, const SparcTargetLowering &TLI, bool is64Bit)
static unsigned toCallerWindow(unsigned Reg)
static SDValue LowerF128Load(SDValue Op, SelectionDAG &DAG)
virtual SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const
DebugLoc getDebugLoc() const
static SDValue LowerADDC_ADDE_SUBC_SUBE(SDValue Op, SelectionDAG &DAG)