66 #define DEBUG_TYPE "hexagon-lowering" 70 cl::desc(
"Control jump table emission on Hexagon target"));
74 cl::desc(
"Enable Hexagon SDNode scheduling"));
78 cl::desc(
"Enable Fast Math processing"));
82 cl::desc(
"Set minimum jump tables"));
86 cl::desc(
"Max #stores to inline memcpy"));
90 cl::desc(
"Max #stores to inline memcpy"));
94 cl::desc(
"Max #stores to inline memmove"));
98 cl::desc(
"Max #stores to inline memmove"));
102 cl::desc(
"Max #stores to inline memset"));
106 cl::desc(
"Max #stores to inline memset"));
110 cl::desc(
"Rewrite unaligned loads as a pair of aligned loads"));
115 class HexagonCCState :
public CCState {
116 unsigned NumNamedVarArgParams = 0;
121 unsigned NumNamedArgs)
122 :
CCState(CC, IsVarArg, MF, locs, C),
123 NumNamedVarArgParams(NumNamedArgs) {}
124 unsigned getNumNamedVarArgParams()
const {
return NumNamedVarArgParams; }
143 if (RegNum != NumArgRegs && RegNum % 2 == 1)
152 #include "HexagonGenCallingConv.inc" 182 CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context);
185 return CCInfo.
CheckReturn(Outs, RetCC_Hexagon_HVX);
206 if (Subtarget.useHVXOps())
209 CCInfo.AnalyzeReturn(Outs, RetCC_Hexagon);
215 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
238 if (!CI->
isTailCall() || Attr.getValueAsString() ==
"true")
248 .Case(
"r19", Hexagon::R19)
272 if (Subtarget.useHVXOps())
275 CCInfo.AnalyzeCallResult(Ins, RetCC_Hexagon);
278 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
280 if (RVLocs[i].getValVT() ==
MVT::i1) {
290 unsigned PredR =
MRI.createVirtualRegister(&Hexagon::PredRegsRegClass);
302 RVLocs[i].getValVT(), Glue);
328 bool IsStructRet = Outs.
empty() ?
false : Outs[0].Flags.isSRet();
341 HexagonCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.
getContext(),
344 if (Subtarget.useHVXOps())
345 CCInfo.AnalyzeCallOperands(Outs, CC_Hexagon_HVX);
347 CCInfo.AnalyzeCallOperands(Outs, CC_Hexagon);
350 if (Attr.getValueAsString() ==
"true")
355 CLI.
IsTailCall = IsEligibleForTailCallOptimization(Callee, CallConv,
356 IsVarArg, IsStructRet, StructAttrFlag, Outs,
358 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
366 :
"Argument must be passed on stack. " 367 "Not eligible for Tail Call\n"));
370 unsigned NumBytes = CCInfo.getNextStackOffset();
378 bool NeedsArgAlign =
false;
379 unsigned LargestAlignSeen = 0;
381 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
386 bool ArgAlign = Subtarget.isHVXVectorType(VA.
getValVT());
387 NeedsArgAlign |= ArgAlign;
416 LargestAlignSeen =
std::max(LargestAlignSeen,
438 if (NeedsArgAlign && Subtarget.hasV60Ops()) {
439 LLVM_DEBUG(
dbgs() <<
"Function needs byte stack align due to call args\n");
440 unsigned VecAlign = HRI.getSpillAlignment(Hexagon::HvxVRRegClass);
441 LargestAlignSeen =
std::max(LargestAlignSeen, VecAlign);
446 if (!MemOpChains.
empty())
460 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
462 RegsToPass[i].
second, Glue);
477 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
479 RegsToPass[i].
second, Glue);
494 dyn_cast<ExternalSymbolSDNode>(Callee)) {
506 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
508 RegsToPass[i].second.getValueType()));
512 assert(Mask &&
"Missing call preserved mask for calling convention");
529 Chain = DAG.
getNode(OpCode, dl, NodeTys, Ops);
540 InVals, OutVals, Callee);
567 if (!isa<ConstantSDNode>(Offset.
getNode()))
571 int32_t V = cast<ConstantSDNode>(Offset.
getNode())->getSExtValue();
572 return Subtarget.getInstrInfo()->isValidAutoIncImm(VT, V);
590 unsigned Flags = cast<ConstantSDNode>(Op.
getOperand(i))->getZExtValue();
605 for (; NumVals; --NumVals, ++i) {
609 HMFI.setHasClobberLR(
true);
649 unsigned IntNo = cast<ConstantSDNode>(Op.
getOperand(1))->getZExtValue();
669 assert(AlignConst &&
"Non-constant Align in LowerDYNAMIC_STACKALLOC");
672 auto &HFI = *Subtarget.getFrameLowering();
675 A = HFI.getStackAlignment();
678 dbgs () << __func__ <<
" Align: " << A <<
" Size: ";
701 HexagonCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.
getContext(),
704 if (Subtarget.useHVXOps())
705 CCInfo.AnalyzeFormalArguments(Ins, CC_Hexagon_HVX);
707 CCInfo.AnalyzeFormalArguments(Ins, CC_Hexagon);
718 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
754 assert(RegSize == 32 || RegSize == 64 ||
755 Subtarget.isHVXVectorType(RegVT));
765 unsigned ObjSize = Flags.
isByVal()
792 HMFI.setVarArgsFrameIndex(FI);
835 auto isSExtFree = [
this](
SDValue N) {
836 switch (
N.getOpcode()) {
843 unsigned ThisBW = ty(
N).getSizeInBits();
848 return ThisBW >= OrigBW;
860 if (IsNegative || isSExtFree(LHS) || isSExtFree(RHS))
897 "conversion only supported for pow2 VectorSize!");
899 for (
unsigned i = 0; i < NumVectorElements / 8; ++i) {
901 for (
unsigned j = 0; j < 8; ++j) {
902 uint8_t y = CV->
getOperand(i * 8 + j)->getUniqueInteger().getZExtValue();
905 assert((x == 0 || x == 255) &&
"Either all 0's or all 1's expected!");
916 bool isVTi1Type =
false;
918 Type *CValTy = ConstVal->getType();
922 isVTi1Type = (CVal !=
nullptr);
926 bool IsPositionIndependent = isPositionIndependent();
939 assert(cast<ConstantPoolSDNode>(T)->getTargetFlags() == TF &&
940 "Inconsistent target flag encountered");
942 if (IsPositionIndependent)
950 int Idx = cast<JumpTableSDNode>(
Op)->getIndex();
951 if (isPositionIndependent()) {
967 if (verifyReturnAddressArgumentIsConstant(Op, DAG))
972 unsigned Depth = cast<ConstantSDNode>(Op.
getOperand(0))->getZExtValue();
994 unsigned Depth = cast<ConstantSDNode>(Op.
getOperand(0))->getZExtValue();
1012 auto *GAN = cast<GlobalAddressSDNode>(
Op);
1014 auto *GV = GAN->getGlobal();
1015 int64_t
Offset = GAN->getOffset();
1017 auto &HLOF = *HTM.getObjFileLowering();
1023 if (GO && Subtarget.useSmallData() && HLOF.isGlobalInSmallSection(GO, HTM))
1028 bool UsePCRel = getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV);
1045 const BlockAddress *BA = cast<BlockAddressSDNode>(
Op)->getBlockAddress();
1088 const auto &HRI = *Subtarget.getRegisterInfo();
1090 assert(Mask &&
"Missing call preserved mask for calling convention");
1115 bool IsPositionIndependent = isPositionIndependent();
1125 if (IsPositionIndependent) {
1127 SDValue GOT = LowerGLOBAL_OFFSET_TABLE(Sym, DAG);
1181 SDValue GOT = LowerGLOBAL_OFFSET_TABLE(TGA, DAG);
1197 return GetDynamicTLSAddr(DAG, Chain, GA, InFlag, PtrVT,
1198 Hexagon::R0, Flags);
1211 switch (HTM.getTLSModel(GA->
getGlobal())) {
1214 return LowerToTLSGeneralDynamicModel(GA, DAG);
1216 return LowerToTLSInitialExecModel(GA, DAG);
1218 return LowerToTLSLocalExecModel(GA, DAG);
1367 for (
unsigned IntExpOp :
1376 for (
unsigned FPExpOp :
1412 static const unsigned VectExpOps[] = {
1437 for (
unsigned VectExpOp : VectExpOps)
1451 if (VT.getVectorElementType() !=
MVT::i32) {
1557 initializeHVXLowering();
1577 setLibcallName(RTLIB::FPTOUINT_F32_I128,
"__hexagon_fixunssfti");
1578 setLibcallName(RTLIB::FPTOUINT_F64_I128,
"__hexagon_fixunsdfti");
1663 HexagonTargetLowering::validateConstPtrAlignment(
SDValue Ptr,
const SDLoc &dl,
1664 unsigned NeedAlign)
const {
1670 if (HaveAlign < NeedAlign) {
1673 O <<
"Misaligned constant address: " <<
format_hex(Addr, 10)
1674 <<
" has alignment " << HaveAlign
1675 <<
", but the memory access requires " << NeedAlign;
1677 DL.print(O <<
", at ");
1700 V = cast<Operator>(V)->getOperand(0);
1702 V = cast<Instruction>(V)->getOperand(0);
1715 if (Blk == Parent) {
1720 BaseVal = BackEdgeVal;
1722 }
while ((BaseVal != BackEdgeVal) && (IntrBaseVal != BackEdgeVal));
1725 if (IntrBaseVal == BackEdgeVal)
1732 assert(Idx >= 0 &&
"Unexpected index to incoming argument in PHI");
1740 Value *IntrBaseVal = V;
1747 }
while (BaseVal != V);
1750 if (
const PHINode *PN = dyn_cast<PHINode>(V))
1764 unsigned Intrinsic)
const {
1765 switch (Intrinsic) {
1835 unsigned DefinedValues)
const {
1862 if (VecWidth >= HwWidth/2 && VecWidth < HwWidth)
1869 std::pair<SDValue, int>
1870 HexagonTargetLowering::getBaseAndOffset(
SDValue Addr)
const {
1873 if (
auto *CN = dyn_cast<const ConstantSDNode>(Op1.
getNode()))
1874 return { Addr.
getOperand(0), CN->getSExtValue() };
1884 const auto *SVN = cast<ShuffleVectorSDNode>(
Op);
1886 assert(AM.size() <= 8 &&
"Unexpected shuffle mask");
1887 unsigned VecLen = AM.size();
1891 "HVX shuffles should be legal");
1896 const SDLoc &dl(Op);
1901 if (ty(Op0) != VecTy || ty(Op1) != VecTy)
1907 unsigned F =
llvm::find_if(AM, [](
int M) {
return M >= 0; }) - AM.data();
1910 if (AM[F] >=
int(VecLen)) {
1918 for (
unsigned i = 0, e =
Mask.size(); i != e; ++i) {
1921 for (
unsigned j = 0; j != ElemBytes; ++j)
1924 for (
unsigned j = 0; j != ElemBytes; ++j)
1935 uint64_t MaskIdx = 0;
1936 uint64_t MaskUnd = 0;
1937 for (
unsigned i = 0, e = ByteMask.
size(); i != e; ++i) {
1939 uint64_t M = ByteMask[i] & 0xFF;
1945 if (ByteMask.
size() == 4) {
1947 if (MaskIdx == (0x03020100 | MaskUnd))
1950 if (MaskIdx == (0x00010203 | MaskUnd)) {
1958 typeJoin({ty(Op1), ty(Op0)}), {Op1, Op0});
1959 if (MaskIdx == (0x06040200 | MaskUnd))
1960 return getInstr(Hexagon::S2_vtrunehb, dl, VecTy, {Concat10}, DAG);
1961 if (MaskIdx == (0x07050301 | MaskUnd))
1962 return getInstr(Hexagon::S2_vtrunohb, dl, VecTy, {Concat10}, DAG);
1965 typeJoin({ty(Op0), ty(Op1)}), {Op0, Op1});
1966 if (MaskIdx == (0x02000604 | MaskUnd))
1967 return getInstr(Hexagon::S2_vtrunehb, dl, VecTy, {Concat01}, DAG);
1968 if (MaskIdx == (0x03010705 | MaskUnd))
1969 return getInstr(Hexagon::S2_vtrunohb, dl, VecTy, {Concat01}, DAG);
1972 if (ByteMask.
size() == 8) {
1974 if (MaskIdx == (0x0706050403020100ull | MaskUnd))
1977 if (MaskIdx == (0x0001020304050607ull | MaskUnd)) {
1984 if (MaskIdx == (0x0d0c050409080100ull | MaskUnd))
1985 return getInstr(Hexagon::S2_shuffeh, dl, VecTy, {Op1, Op0}, DAG);
1986 if (MaskIdx == (0x0f0e07060b0a0302ull | MaskUnd))
1987 return getInstr(Hexagon::S2_shuffoh, dl, VecTy, {Op1, Op0}, DAG);
1988 if (MaskIdx == (0x0d0c090805040100ull | MaskUnd))
1989 return getInstr(Hexagon::S2_vtrunewh, dl, VecTy, {Op1, Op0}, DAG);
1990 if (MaskIdx == (0x0f0e0b0a07060302ull | MaskUnd))
1991 return getInstr(Hexagon::S2_vtrunowh, dl, VecTy, {Op1, Op0}, DAG);
1992 if (MaskIdx == (0x0706030205040100ull | MaskUnd)) {
1993 VectorPair
P = opSplit(Op0, dl, DAG);
1994 return getInstr(Hexagon::S2_packhl, dl, VecTy, {P.second, P.first}, DAG);
1998 if (MaskIdx == (0x0e060c040a020800ull | MaskUnd))
1999 return getInstr(Hexagon::S2_shuffeb, dl, VecTy, {Op1, Op0}, DAG);
2000 if (MaskIdx == (0x0f070d050b030901ull | MaskUnd))
2001 return getInstr(Hexagon::S2_shuffob, dl, VecTy, {Op1, Op0}, DAG);
2012 if (
SDValue S = BVN->getSplatValue()) {
2036 return getVectorShiftByInt(Op, DAG);
2050 MVT InpTy = ty(InpV);
2052 const SDLoc &dl(Op);
2058 return getInstr(Hexagon::C2_tfrrp, dl, ResTy, Ext, DAG);
2071 bool AllConst =
true;
2073 for (
unsigned i = 0, e = Values.
size(); i != e; ++i) {
2080 if (
auto *CN = dyn_cast<ConstantSDNode>(V.
getNode())) {
2081 const ConstantInt *CI = CN->getConstantIntValue();
2083 }
else if (
auto *CN = dyn_cast<ConstantFPSDNode>(V.
getNode())) {
2084 const ConstantFP *CF = CN->getConstantFPValue();
2101 bool AllConst = getBuildVectorConstInts(Elem, VecTy, DAG, Consts);
2103 unsigned First, Num = Elem.
size();
2104 for (First = 0; First != Num; ++First)
2105 if (!isUndef(Elem[First]))
2112 return getZero(dl, VecTy, DAG);
2117 uint32_t V = (Consts[0]->getZExtValue() & 0xFFFF) |
2118 Consts[1]->getZExtValue() << 16;
2122 {Elem[1], Elem[0]}, DAG);
2129 int32_t V = (Consts[0]->getZExtValue() & 0xFF) |
2130 (Consts[1]->getZExtValue() & 0xFF) << 8 |
2131 (Consts[1]->getZExtValue() & 0xFF) << 16 |
2132 Consts[2]->getZExtValue() << 24;
2137 bool IsSplat =
true;
2138 for (
unsigned i = 0; i != Num; ++i) {
2141 if (Elem[i] == Elem[First] || isUndef(Elem[i]))
2157 for (
unsigned i = 0; i != 4; ++i) {
2167 SDValue R = getInstr(Hexagon::A2_combine_ll, dl,
MVT::i32, {B1, B0}, DAG);
2184 bool AllConst = getBuildVectorConstInts(Elem, VecTy, DAG, Consts);
2186 unsigned First, Num = Elem.
size();
2187 for (First = 0; First != Num; ++First)
2188 if (!isUndef(Elem[First]))
2195 return getZero(dl, VecTy, DAG);
2199 bool IsSplat =
true;
2200 for (
unsigned i = 0; i != Num; ++i) {
2203 if (Elem[i] == Elem[First] || isUndef(Elem[i]))
2220 : (ElemTy ==
MVT::i16) ? 0xFFFFull : 0xFFFFFFFFull;
2221 for (
unsigned i = 0; i != Num; ++i)
2222 Val = (Val << W) | (Consts[Num-1-i]->getZExtValue() &
Mask);
2231 : buildVector32(Elem.
take_front(Num/2), dl, HalfTy, DAG);
2234 : buildVector32(Elem.
drop_front(Num/2), dl, HalfTy, DAG);
2242 MVT VecTy = ty(VecV);
2248 assert((VecWidth % ElemWidth) == 0);
2253 if (ElemWidth == 1) {
2255 assert(VecWidth == 8 || VecWidth == 4 || VecWidth == 2);
2266 if (ValWidth == 1) {
2277 unsigned Scale = VecWidth / ValWidth;
2282 unsigned VecRep = 8 / VecWidth;
2291 T1 = expandPredicate(T1, dl, DAG);
2298 assert(VecWidth == 32 || VecWidth == 64);
2301 MVT ScalarTy = tyScalar(VecTy);
2308 unsigned Off = IdxN->getZExtValue() * ElemWidth;
2309 if (VecWidth == 64 && ValWidth == 32) {
2310 assert(Off == 0 || Off == 32);
2311 unsigned SubIdx = Off == 0 ? Hexagon::isub_lo : Hexagon::isub_hi;
2313 }
else if (Off == 0 && (ValWidth % 8) == 0) {
2320 {VecV, WidthV, OffV});
2328 {VecV, WidthV, OffV});
2341 MVT VecTy = ty(VecV);
2343 MVT ValTy = ty(ValV);
2350 for (
unsigned R = Scale; R > 1; R /= 2) {
2351 ValR = contractPredicate(ValR, dl, DAG);
2359 unsigned ValBytes = 64 / Scale;
2365 {VecR, ValR, Width, Idx});
2371 assert(VecWidth == 32 || VecWidth == 64);
2372 assert((VecWidth % ValWidth) == 0);
2388 unsigned W =
C->getZExtValue() * ValWidth;
2391 {VecV, ValV, WidthV, OffV});
2397 {VecV, ValV, WidthV, OffV});
2404 HexagonTargetLowering::expandPredicate(
SDValue Vec32,
const SDLoc &dl,
2409 return getInstr(Hexagon::S2_vsxtbh, dl,
MVT::i64, {Vec32}, DAG);
2413 HexagonTargetLowering::contractPredicate(
SDValue Vec64,
const SDLoc &dl,
2418 return getInstr(Hexagon::S2_vtrunehb, dl,
MVT::i32, {Vec64}, DAG);
2443 const SDLoc &dl(Op);
2449 return buildVector32(Ops, dl, VecTy, DAG);
2451 return buildVector64(Ops, dl, VecTy, DAG);
2461 for (
unsigned i = 0; i != 8; ++i) {
2466 for (
unsigned i = 0, e = A.size()/2; i != e; ++i)
2470 return getInstr(Hexagon::C2_tfrrp, dl, VecTy, {Rs[0]}, DAG);
2480 const SDLoc &dl(Op);
2505 for (
unsigned R = Scale; R > 1; R /= 2) {
2506 W = contractPredicate(W, dl, DAG);
2511 Words[IdxW].push_back(W);
2516 Words[IdxW ^ 1].clear();
2518 for (
unsigned i = 0, e = Words[IdxW].
size(); i != e; i += 2) {
2519 SDValue W0 = Words[IdxW][i], W1 = Words[IdxW][i+1];
2522 {W0, W1, WidthV, WidthV});
2523 Words[IdxW ^ 1].push_back(T);
2531 assert(Scale == 2 && Words[IdxW].
size() == 2);
2534 Words[IdxW][1], Words[IdxW][0]);
2546 return extractVector(Vec, Op.
getOperand(1),
SDLoc(Op), ElemTy, ty(Op), DAG);
2553 ty(Op), ty(Op), DAG);
2568 SDLoc(Op), ty(ValV), DAG);
2599 const SDLoc &dl(Op);
2600 validateConstPtrAlignment(Ptr, dl, ClaimAlign);
2604 if (ClaimAlign < NeedAlign)
2613 MVT LoadTy = ty(Op);
2616 if (HaveAlign >= NeedAlign)
2619 const SDLoc &dl(Op);
2626 bool DoDefault =
false;
2636 if (!DoDefault && 2*HaveAlign == NeedAlign) {
2652 assert(LoadTy.getSizeInBits() == 8*NeedAlign);
2654 unsigned LoadLen = NeedAlign;
2657 auto BO = getBaseAndOffset(Base);
2658 unsigned BaseOpc = BO.first.getOpcode();
2662 if (BO.second % LoadLen != 0) {
2665 BO.second -= BO.second % LoadLen;
2678 2*LoadLen, LoadLen, MMO->getAAInfo(), MMO->getRanges(),
2679 MMO->getSyncScopeID(), MMO->getOrdering(),
2680 MMO->getFailureOrdering());
2696 const SDLoc &dl(Op);
2704 EVT CarryTy =
C.getValueType();
2725 unsigned OffsetReg = Hexagon::R28;
2731 Chain = DAG.
getCopyToReg(Chain, dl, OffsetReg, Offset);
2747 if (isHvxOperation(Op)) {
2749 if (
SDValue V = LowerHvxOperation(Op, DAG))
2758 errs() <<
"Error: check for a non-legal type in this operation\n";
2839 int Idx = cast<JumpTableSDNode>(Table)->getIndex();
2851 if (Constraint.
size() == 1) {
2852 switch (Constraint[0]) {
2867 std::pair<unsigned, const TargetRegisterClass*>
2871 if (Constraint.
size() == 1) {
2872 switch (Constraint[0]) {
2876 return {0u,
nullptr};
2882 return {0u, &Hexagon::IntRegsRegClass};
2885 return {0u, &Hexagon::DoubleRegsRegClass};
2890 return {0u,
nullptr};
2891 return {0u, &Hexagon::ModRegsRegClass};
2895 return {0u,
nullptr};
2898 return {0u, &Hexagon::HvxQRRegClass};
2904 return {0u,
nullptr};
2906 return {0u, &Hexagon::HvxVRRegClass};
2909 return {0u, &Hexagon::HvxVRRegClass};
2910 return {0u, &Hexagon::HvxWRRegClass};
2912 return {0u, &Hexagon::HvxWRRegClass};
2916 return {0u,
nullptr};
2956 int Scale = AM.
Scale;
2980 return Imm >= -512 && Imm <= 511;
2990 bool IsCalleeStructRet,
2991 bool IsCallerStructRet,
2998 bool CCMatch = CallerCC == CalleeCC;
3006 if (!isa<GlobalAddressSDNode>(Callee) &&
3007 !isa<ExternalSymbolSDNode>(Callee)) {
3027 if (IsCalleeStructRet || IsCallerStructRet)
3049 unsigned DstAlign,
unsigned SrcAlign,
bool IsMemset,
bool ZeroMemset,
3052 auto Aligned = [](
unsigned GivenA,
unsigned MinA) ->
bool {
3053 return (GivenA % MinA) == 0;
3056 if (Size >= 8 && Aligned(DstAlign, 8) && (IsMemset || Aligned(SrcAlign, 8)))
3058 if (Size >= 4 && Aligned(DstAlign, 4) && (IsMemset || Aligned(SrcAlign, 4)))
3060 if (Size >= 2 && Aligned(DstAlign, 2) && (IsMemset || Aligned(SrcAlign, 2)))
3067 unsigned AS,
unsigned Align,
bool *
Fast)
const {
3073 std::pair<const TargetRegisterClass*, uint8_t>
3081 return std::make_pair(&Hexagon::HvxQRRegClass, 1);
3082 if (BitWidth == VecWidth)
3083 return std::make_pair(&Hexagon::HvxVRRegClass, 1);
3084 assert(BitWidth == 2 * VecWidth);
3085 return std::make_pair(&Hexagon::HvxWRRegClass, 1);
3097 auto *L = cast<LoadSDNode>(
Load);
3098 std::pair<SDValue,int> BO = getBaseAndOffset(L->getBasePtr());
3104 const auto *GO = dyn_cast_or_null<const GlobalObject>(GA->getGlobal());
3114 Type *Ty = cast<PointerType>(Addr->
getType())->getElementType();
3116 assert((SZ == 32 || SZ == 64) &&
"Only 32/64-bit atomic loads supported");
3131 assert((SZ == 32 || SZ == 64) &&
"Only 32/64-bit atomic stores supported");
3159 if (Size >= 4 && Size <= 8)
virtual std::pair< const TargetRegisterClass *, uint8_t > findRepresentativeClass(const TargetRegisterInfo *TRI, MVT VT) const
Return the largest legal super-reg register class of the register class for the specified type and it...
SDValue getStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, unsigned Alignment=0, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())
Helper function to build ISD::STORE nodes.
unsigned getRegisterByName(const char *RegName, EVT VT, SelectionDAG &DAG) const override
Return the register ID of the name passed in.
bool isMachineConstantPoolEntry() const
bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global value should be placed into small data/bss section.
Type * getVectorElementType() const
void setFrameAddressIsTaken(bool T)
SDValue LowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const
BITCAST - This operator converts between integer, vector and FP values, as if the value was stored to...
bool isFPImmLegal(const APFloat &Imm, EVT VT) const override
isFPImmLegal - Returns true if the target can instruction select the specified FP immediate natively...
Value * getValueOperand()
unsigned getFirstUnallocated(ArrayRef< MCPhysReg > Regs) const
getFirstUnallocated - Return the index of the first unallocated register in the set, or Regs.size() if they are all allocated.
static MVT getIntegerVT(unsigned BitWidth)
void AnalyzeCallResult(const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
AnalyzeCallResult - Analyze the return values of a call, incorporating info about the passed values i...
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...
A parsed version of the target data layout string in and methods for querying it. ...
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
bool useHVX128BOps() const
FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two values.
EVT getValueType() const
Return the ValueType of the referenced return value.
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg If BaseGV is null...
bool isInteger() const
Return true if this is an integer or a vector integer type.
SDValue LowerAddSubCarry(SDValue Op, SelectionDAG &DAG) const
static void commuteMask(MutableArrayRef< int > Mask)
Change values in a shuffle permute mask assuming the two vector operands have swapped position...
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const override
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (tou...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
void setLoadExtAction(unsigned ExtType, MVT ValVT, MVT MemVT, LegalizeAction Action)
Indicate that the specified load with extension does not work with the specified type and indicate wh...
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
C - The default llvm calling convention, compatible with C.
SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const
const GlobalValue * getGlobal() const
uint64_t getZExtValue() const
Get zero extended value.
ArrayRef< T > take_front(size_t N=1) const
Return a copy of *this with only the first N elements.
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override
Given a physical register constraint (e.g.
GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
SDValue getSetCC(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
Helper function to make it easier to build SetCC's if you just have an ISD::CondCode instead of an SD...
void setMinimumJumpTableEntries(unsigned Val)
Indicate the minimum number of blocks to generate jump tables.
static bool CC_SkipOdd(unsigned &ValNo, MVT &ValVT, MVT &LocVT, CCValAssign::LocInfo &LocInfo, ISD::ArgFlagsTy &ArgFlags, CCState &State)
SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue InGlue, const SDLoc &DL)
Return a new CALLSEQ_END node, which always must have a glue result (to ensure it's not CSE'd)...
unsigned getFrameRegister(const MachineFunction &MF) const override
bool isLegalICmpImmediate(int64_t Imm) const override
isLegalICmpImmediate - Return true if the specified immediate is legal icmp immediate, that is the target has icmp instructions which can compare a register against the immediate without having to materialize the immediate into a register.
ConstraintType getConstraintType(StringRef Constraint) const override
Given a constraint, return the type of constraint it is for this target.
EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an vector value) starting with the ...
BR_CC - Conditional branch.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
static MVT getVectorVT(MVT VT, unsigned NumElements)
VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as VEC1/VEC2.
void setHasEHReturn(bool H=true)
A Module instance is used to store all the information related to an LLVM module. ...
bool isSized(SmallPtrSetImpl< Type *> *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.
HexagonTargetObjectFile * getObjFileLowering() const override
FormattedNumber format_hex(uint64_t N, unsigned Width, bool Upper=false)
format_hex - Output N as a fixed width hexadecimal.
bool isVector() const
Return true if this is a vector value type.
bool getPostIndexedAddressParts(SDNode *N, SDNode *Op, SDValue &Base, SDValue &Offset, ISD::MemIndexedMode &AM, SelectionDAG &DAG) const override
Returns true by value, base pointer and offset pointer and addressing mode by reference if this node ...
void addLiveIn(unsigned Reg, unsigned vreg=0)
addLiveIn - Add the specified register as a live-in.
const SDValue & getBasePtr() const
static cl::opt< bool > EmitJumpTables("hexagon-emit-jump-tables", cl::init(true), cl::Hidden, cl::desc("Control jump table emission on Hexagon target"))
EVT getValueType(unsigned ResNo) const
Return the type of a specified result.
void push_back(const T &Elt)
bool isFMAFasterThanFMulAndFAdd(EVT) const override
Return true if an FMA operation is faster than a pair of mul and add instructions.
unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC)
addLiveIn - Add the specified physical register as a live-in value and create a corresponding virtual...
SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
MachineMemOperand::Flags flags
STACKRESTORE has two operands, an input chain and a pointer to restore to it returns an output chain...
SDVTList getVTList() const
This class represents a function call, abstracting a target machine's calling convention.
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for addition.
unsigned getVectorNumElements() const
ArrayRef< MVT > getHVXElementTypes() const
unsigned getStoreSizeInBits() const
Return the number of bits overwritten by a store of the specified value type.
const SDValue & getChain() const
Function Alias Analysis Results
LLVMContext & getContext() const
All values hold a context through their type.
unsigned getAlignment() const
SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const
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...
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const
Given a physical register constraint (e.g.
Hexagon target-specific information for each MachineFunction.
SDValue LowerVSELECT(SDValue Op, SelectionDAG &DAG) const
void setBooleanVectorContents(BooleanContent Ty)
Specify how the target extends the result of a vector boolean value from a vector of i1 to a wider ty...
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly...
void ReplaceNodeResults(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const override
This callback is invoked when a node result type is illegal for the target, and the operation was reg...
unsigned const TargetRegisterInfo * TRI
SDValue LowerATOMIC_FENCE(SDValue Op, SelectionDAG &DAG) const
Type * getStructElementType(unsigned N) const
SDValue getSelect(const SDLoc &DL, EVT VT, SDValue Cond, SDValue LHS, SDValue RHS)
Helper function to make it easier to build Select's if you just have operands and don't want to check...
SDValue LowerEXTRACT_SUBVECTOR(SDValue Op, SelectionDAG &DAG) const
An instruction for reading from memory.
SDNode * getNode() const
get the SDNode which holds the desired result
SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned char TargetFlags=0)
SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDUse > Ops)
Gets or creates the specified node.
bool isVectorTy() const
True if this is an instance of VectorType.
AtomicExpansionKind shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const override
Returns how the given atomic cmpxchg should be expanded by the IR-level AtomicExpand pass...
AtomicExpansionKind
Enum that specifies what an atomic load/AtomicRMWInst is expanded to, if at all.
bool isOperationLegalOrCustom(unsigned Op, EVT VT) const
Return true if the specified operation is legal on this target or can be made legal with custom lower...
MachineMemOperand * getMemOperand() const
Return a MachineMemOperand object describing the memory reference performed by operation.
INSERT_SUBVECTOR(VECTOR1, VECTOR2, IDX) - Returns a vector with VECTOR2 inserted into VECTOR1 at the ...
unsigned getStackRegister() const
OUTCHAIN = ATOMIC_FENCE(INCHAIN, ordering, scope) This corresponds to the fence instruction.
#define HEXAGON_LRFP_SIZE
SDValue LowerToTLSLocalExecModel(GlobalAddressSDNode *GA, SelectionDAG &DAG) const
Select with condition operator - This selects between a true value and a false value (ops #2 and #3) ...
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
Indicate that the specified truncating store does not work with the specified type and indicate what ...
RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) This node represents a target in...
unsigned getAddressSpace() const
Return the address space for the associated pointer.
SDValue getMemBasePlusOffset(SDValue Base, unsigned Offset, const SDLoc &DL)
Returns sum of the base pointer and offset.
bool hasStructRetAttr() const
Determine if the function returns a structure through first or second pointer argument.
SDIVREM/UDIVREM - Divide two integers and produce both a quotient and remainder result.
Value * getArgOperand(unsigned i) const
SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded integer shift operations...
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
SDValue getIntPtrConstant(uint64_t Val, const SDLoc &DL, bool isTarget=false)
The address of a basic block.
A description of a memory reference used in the backend.
void setMaxAtomicSizeInBitsSupported(unsigned SizeInBits)
Set the maximum atomic operation size supported by the backend.
static Value * returnEdge(const PHINode *PN, Value *IntrBaseVal)
Value * emitStoreConditional(IRBuilder<> &Builder, Value *Val, Value *Addr, AtomicOrdering Ord) const override
Perform a store-conditional operation to Addr.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const
Shift and rotation operations.
Type * getTypeForEVT(LLVMContext &Context) const
This method returns an LLVM type corresponding to the specified EVT.
LLVMContext & getContext() const
Get the global data context.
Base class for LoadSDNode and StoreSDNode.
bool shouldExpandBuildVectorWithShuffles(EVT VT, unsigned DefinedValues) const override
ABS - Determine the unsigned absolute value of a signed integer value of the same bitwidth...
SDValue getTargetExtractSubreg(int SRIdx, const SDLoc &DL, EVT VT, SDValue Operand)
A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.
const HexagonRegisterInfo * getRegisterInfo() const override
BUILD_PAIR - This is the opposite of EXTRACT_ELEMENT in some ways.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool isIntegerTy() const
True if this is an instance of IntegerType.
SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) const
static Value * getUnderLyingObjectForBrevLdIntr(Value *V)
This provides a uniform API for creating instructions and inserting them into a basic block: either a...
SDValue LowerEH_RETURN(SDValue Op, SelectionDAG &DAG) const
void setCondCodeAction(ISD::CondCode CC, MVT VT, LegalizeAction Action)
Indicate that the specified condition code is or isn't supported on the target and indicate what to d...
InstrTy * getInstruction() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted...
SDValue getEntryNode() const
Return the token chain corresponding to the entry of the function.
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
Indicate that the specified operation does not work with the specified type and indicate what to do a...
const DataLayout & getDataLayout() const
SDVTList getVTList(EVT VT)
Return an SDVTList that represents the list of values specified.
FRAMEADDR, RETURNADDR - These nodes represent llvm.frameaddress and llvm.returnaddress on the DAG...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE R Default(T Value)
MachineMemOperand * getMachineMemOperand(MachinePointerInfo PtrInfo, MachineMemOperand::Flags f, uint64_t s, unsigned base_alignment, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr, SyncScope::ID SSID=SyncScope::System, AtomicOrdering Ordering=AtomicOrdering::NotAtomic, AtomicOrdering FailureOrdering=AtomicOrdering::NotAtomic)
getMachineMemOperand - Allocate a new MachineMemOperand.
LocInfo getLocInfo() const
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
zlib-gnu style compression
This file implements a class to represent arbitrary precision integral constant values and operations...
INLINEASM - Represents an inline asm block.
This represents a list of ValueType's that has been intern'd by a SelectionDAG.
bool isShuffleMaskLegal(ArrayRef< int > Mask, EVT VT) const override
Targets can use this to indicate that they only support some VECTOR_SHUFFLE operations, those with specific masks.
SmallVector< ISD::InputArg, 32 > Ins
AtomicOrdering
Atomic ordering for LLVM's memory model.
STACKSAVE - STACKSAVE has one operand, an input chain.
SDValue getMergeValues(ArrayRef< SDValue > Ops, const SDLoc &dl)
Create a MERGE_VALUES node from the given operands.
unsigned getSizeInBits() const
int64_t getSExtValue() const
SDValue getSExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)
Convert Op, which must be of integer type, to the integer type VT, by either sign-extending or trunca...
static Value * getBrevLdObject(Value *V)
Fast - This calling convention attempts to make calls as fast as possible (e.g.
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
int64_t getSExtValue() const
Get sign extended value.
Type * getType() const
All values are typed, get the type of this value.
MachineFunction & getMachineFunction() const
void computeRegisterProperties(const TargetRegisterInfo *TRI)
Once all of the register classes are added, this allows us to compute derived properties we expose...
[SU]INT_TO_FP - These operators convert integers (whose interpreted sign depends on the first letter)...
SDValue getRegisterMask(const uint32_t *RegMask)
SDValue LowerVECTOR_SHIFT(SDValue Op, SelectionDAG &DAG) const
BasicBlock * GetInsertBlock() const
Select with a vector condition (op #0) and two vector operands (ops #1 and #2), returning a vector re...
Simple integer binary arithmetic operators.
TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(MVT VT) const override
Return the preferred vector type legalization action.
SmallVector< ISD::OutputArg, 32 > Outs
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
const APInt & getValue() const
Return the constant as an APInt value reference.
SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const
SDValue getUNDEF(EVT VT)
Return an UNDEF node. UNDEF does not have a useful SDLoc.
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
An instruction for storing to memory.
bool mayBeEmittedAsTailCall(const CallInst *CI) const override
Return true if the target may be able emit the call instruction as a tail call.
CondCode
ISD::CondCode enum - These are ordered carefully to make the bitfields below work out...
std::pair< SDValue, SDValue > expandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG) const
Expands an unaligned load to 2 half-size loads for an integer, and possibly more for vectors...
Value * CreateZExt(Value *V, Type *DestTy, const Twine &Name="")
READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic.
void setMinCmpXchgSizeInBits(unsigned SizeInBits)
Sets the minimum cmpxchg or ll/sc size supported by the backend.
bool allowTruncateForTailCall(Type *Ty1, Type *Ty2) const override
Return true if a truncation from FromTy to ToTy is permitted when deciding whether a call is in tail ...
static cl::opt< int > MinimumJumpTables("minimum-jump-tables", cl::Hidden, cl::ZeroOrMore, cl::init(5), cl::desc("Set minimum jump tables"))
RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) This node represents a target intrinsic fun...
amdgpu Simplify well known AMD library false Value * Callee
Function * getDeclaration(Module *M, ID id, ArrayRef< Type *> Tys=None)
Create or insert an LLVM Function declaration for an intrinsic, and return it.
MVT getVectorElementType() const
SDValue LowerToTLSInitialExecModel(GlobalAddressSDNode *GA, SelectionDAG &DAG) const
Value * getOperand(unsigned i) const
Analysis containing CSE Info
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
unsigned getByValSize() const
This class is used to represent ISD::STORE nodes.
bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I=nullptr) const override
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target...
FP_TO_[US]INT - Convert a floating point value to a signed or unsigned integer.
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
Flag
These should be considered private to the implementation of the MCInstrDesc class.
BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the specified, possibly variable...
The memory access is volatile.
SDValue LowerINTRINSIC_VOID(SDValue Op, SelectionDAG &DAG) const
bool isNegative() const
Determine sign of this APInt.
const SDValue & getBasePtr() const
A switch()-like statement whose cases are string literals.
initializer< Ty > init(const Ty &Val)
Type * getReturnType() const
Returns the type of the ret val.
int64_t getOffset() const
OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) This node represents a target intrin...
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
unsigned const MachineRegisterInfo * MRI
std::size_t countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1...
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
MVT getPointerTy(const DataLayout &DL, uint32_t AS=0) const
Return the pointer type for the given address space, defaults to the pointer type from the data layou...
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
This is an important class for using LLVM in a threaded context.
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
Add the specified register class as an available regclass for the specified value type...
virtual ConstraintType getConstraintType(StringRef Constraint) const
Given a constraint, return the type of constraint it is for this target.
Simple binary floating point operators.
static bool isBrevLdIntrinsic(const Value *Inst)
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This is an important base class in LLVM.
VAEND, VASTART - VAEND and VASTART have three operands: an input chain, pointer, and a SRCVALUE...
iterator_range< value_op_iterator > op_values() const
Value * getCompareOperand()
const SDValue & getOperand(unsigned Num) const
LoadExtType
LoadExtType enum - This enum defines the three variants of LOADEXT (load with extension).
static cl::opt< int > MaxStoresPerMemmoveOptSizeCL("max-store-memmove-Os", cl::Hidden, cl::ZeroOrMore, cl::init(4), cl::desc("Max #stores to inline memmove"))
INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element at IDX replaced with VAL...
bool shouldExpandAtomicStoreInIR(StoreInst *SI) const override
Returns true if the given (atomic) store should be expanded by the IR-level AtomicExpand pass into an...
SDValue LowerToTLSGeneralDynamicModel(GlobalAddressSDNode *GA, SelectionDAG &DAG) const
OperandFlags
These are flags set on operands, but should be considered private, all access should go through the M...
unsigned getNumParams() const
Return the number of fixed parameters this function type requires.
ConstantFP - Floating Point Values [float, double].
SDValue getCALLSEQ_START(SDValue Chain, uint64_t InSize, uint64_t OutSize, const SDLoc &DL)
Return a new CALLSEQ_START node, that starts new call frame, in which InSize bytes are set up inside ...
void setBooleanContents(BooleanContent Ty)
Specify how the target extends the result of integer and floating point boolean values from i1 to a w...
bool isScalarInteger() const
Return true if this is an integer, not including vectors.
bool isTruncateFree(Type *Ty1, Type *Ty2) const override
Return true if it's free to truncate a value of type FromTy to type ToTy.
#define HEXAGON_GOT_SYM_NAME
static mvt_range fp_valuetypes()
static unsigned getNumOperandRegisters(unsigned Flag)
getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag...
SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const
static SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG, const SparcSubtarget *Subtarget)
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
static cl::opt< bool > AlignLoads("hexagon-align-loads", cl::Hidden, cl::init(false), cl::desc("Rewrite unaligned loads as a pair of aligned loads"))
TRAP - Trapping instruction.
const APInt & getAPIntValue() const
static unsigned getKind(unsigned Flags)
std::string getEVTString() const
This function returns value type as a string, e.g. "i32".
void setPrefFunctionAlignment(unsigned Align)
Set the target's preferred function alignment.
AssertSext, AssertZext - These nodes record if a register contains a value that has already been zero...
static mvt_range vector_valuetypes()
Value * CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name="")
Class to represent integer types.
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
Constant Vector Declarations.
VAARG - VAARG has four operands: an input chain, a pointer, a SRCVALUE, and the alignment.
auto find_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly...
void AddPromotedToType(unsigned Opc, MVT OrigVT, MVT DestVT)
If Opc/OrigVT is specified as being promoted, the promotion code defaults to trying a larger integer/...
unsigned MaxStoresPerMemmove
Specify maximum bytes of store instructions per memmove call.
unsigned getAlignment() const
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.
Value * getIncomingValue(unsigned i) const
Return incoming value number x.
static SDValue CreateCopyOfByValArgument(SDValue Src, SDValue Dst, SDValue Chain, ISD::ArgFlagsTy Flags, SelectionDAG &DAG, const SDLoc &dl)
CreateCopyOfByValArgument - Make a copy of an aggregate at address specified by "Src" to address "Dst...
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
const TargetMachine & getTargetMachine() const
This class contains a discriminated union of information about pointers in memory operands...
std::string & str()
Flushes the stream contents to the target string and returns the string's reference.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
SDValue LowerCallResult(SDValue Chain, SDValue InFlag, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals, const SmallVectorImpl< SDValue > &OutVals, SDValue Callee) const
LowerCallResult - Lower the result values of an ISD::CALL into the appropriate copies out of appropri...
SDValue getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG) const override
Returns relocation base for the given PIC jumptable.
bool shouldReduceLoadWidth(SDNode *Load, ISD::LoadExtType ExtTy, EVT NewVT) const override
Return true if it is profitable to reduce a load to a smaller type.
SDValue getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT)
Return the expression required to zero extend the Op value assuming it was the smaller SrcTy value...
SDValue getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, unsigned Alignment=0, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr)
Loads are not normal binary operators: their result type is not determined by their operands...
bool isUnindexed() const
Return true if this is NOT a pre/post inc/dec load/store.
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
This callback is invoked for operations that are unsupported by the target, which are registered to u...
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, const SDLoc &dl, SelectionDAG &DAG) const override
This hook must be implemented to lower outgoing return values, described by the Outs array...
The memory access writes data.
const APFloat & getValueAPF() const
virtual void LowerOperationWrapper(SDNode *N, SmallVectorImpl< SDValue > &Results, SelectionDAG &DAG) const
This callback is invoked by the type legalizer to legalize nodes with an illegal operand type but leg...
SDValue getBitcast(EVT VT, SDValue V)
Return a bitcast using the SDLoc of the value operand, and casting to the provided type...
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
SDValue getTargetConstantPool(const Constant *C, EVT VT, unsigned Align=0, int Offset=0, unsigned char TargetFlags=0)
SDValue LowerStore(SDValue Op, SelectionDAG &DAG) const
SDValue getTargetJumpTable(int JTI, EVT VT, unsigned char TargetFlags=0)
TokenFactor - This node takes multiple tokens as input and produces a single token result...
const char * getTargetNodeName(unsigned Opcode) const override
This method returns the name of a target specific DAG node.
void dump() const
Dump this node, for debugging.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
bool isHVXVectorType(MVT VecTy, bool IncludeBool=false) const
unsigned getNumOperands() const
CCState - This class holds information needed while lowering arguments and return values...
virtual bool shouldReduceLoadWidth(SDNode *Load, ISD::LoadExtType ExtTy, EVT NewVT) const
Return true if it is profitable to reduce a load to a smaller type.
static unsigned getIntrinsicID(const SDNode *N)
This is the shared class of boolean and integer constants.
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
SDValue LowerCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) const
EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR identified by the (potentially...
SDValue LowerGLOBAL_OFFSET_TABLE(SDValue Op, SelectionDAG &DAG) const
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...
SDValue getZExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)
Convert Op, which must be of integer type, to the integer type VT, by either zero-extending or trunca...
SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
const DebugLoc & getDebugLoc() const
CCValAssign - Represent assignment of one arg/retval to a location.
SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array...
SDValue getMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, bool isTailCall, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
unsigned getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
Byte Swap and Counting operators.
MO_PCREL - On a symbol operand, indicates a PC-relative relocation Used for computing a global addres...
ConstantInt * getInt32(uint32_t C)
Get a constant 32-bit value.
int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool IsImmutable, bool isAliased=false)
Create a new object at a fixed location on the stack.
SDValue LowerGLOBALADDRESS(SDValue Op, SelectionDAG &DAG) const
const Constant * getConstVal() const
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
static Constant * get(Type *Ty, uint64_t V, bool isSigned=false)
If Ty is a vector type, return a Constant with a splat of the given value.
Represents one node in the SelectionDAG.
void setAdjustsStack(bool V)
unsigned getNumIncomingValues() const
Return the number of incoming edges.
SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, unsigned Reg, SDValue N)
const Function & getFunction() const
Return the LLVM function that this machine code represents.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static mvt_range integer_valuetypes()
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
FunctionType * getFunctionType() const
Returns the FunctionType for me.
SDValue LowerINLINEASM(SDValue Op, SelectionDAG &DAG) const
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
void setIndexedLoadAction(unsigned IdxMode, MVT VT, LegalizeAction Action)
Indicate that the specified indexed load does or does not work with the specified type and indicate w...
EVT getMemoryVT() const
Return the type of the in-memory value.
Class for arbitrary precision integers.
unsigned getByValAlign() const
SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
SDValue getConstantFP(double Val, const SDLoc &DL, EVT VT, bool isTarget=false)
Create a ConstantFPSDNode wrapping a constant value.
static unsigned getReg(const void *D, unsigned RC, unsigned RegNo)
Select(COND, TRUEVAL, FALSEVAL).
void setMinFunctionAlignment(unsigned Align)
Set the target's minimum function alignment (in log2(bytes))
void setPrefLoopAlignment(unsigned Align)
Set the target's preferred loop alignment.
ZERO_EXTEND - Used for integer types, zeroing the new bits.
ANY_EXTEND - Used for integer types. The high bits are undefined.
AtomicExpansionKind shouldExpandAtomicLoadInIR(LoadInst *LI) const override
Returns how the given (atomic) load should be expanded by the IR-level AtomicExpand pass...
SDValue GetDynamicTLSAddr(SelectionDAG &DAG, SDValue Chain, GlobalAddressSDNode *GA, SDValue InFlag, EVT PtrVT, unsigned ReturnReg, unsigned char OperandFlags) const
SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG) const
SDValue expandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG) const
Expands an unaligned store to 2 half-size stores for integer values, and possibly more for vectors...
FCOPYSIGN(X, Y) - Return the value of X with the sign of Y.
static cl::opt< int > MaxStoresPerMemsetCL("max-store-memset", cl::Hidden, cl::ZeroOrMore, cl::init(8), cl::desc("Max #stores to inline memset"))
SDValue LowerINSERT_SUBVECTOR(SDValue Op, SelectionDAG &DAG) const
amdgpu Simplify well known AMD library false Value Value * Arg
MachineRegisterInfo - Keep track of information for virtual and physical registers, including vreg register classes, use/def chains for registers, etc.
The memory access reads data.
static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI, int64_t Offset=0)
Return a MachinePointerInfo record that refers to the specified FrameIndex.
BR_JT - Jumptable branch.
VACOPY - VACOPY has 5 operands: an input chain, a destination pointer, a source pointer, a SRCVALUE for the destination, and a SRCVALUE for the source.
SDValue getTargetBlockAddress(const BlockAddress *BA, EVT VT, int64_t Offset=0, unsigned char TargetFlags=0)
SmallVector< SDValue, 32 > OutVals
static cl::opt< bool > EnableHexSDNodeSched("enable-hexagon-sdnode-sched", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enable Hexagon SDNode scheduling"))
bool CheckReturn(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
CheckReturn - Analyze the return values of a function, returning true if the return can be performed ...
unsigned getVectorLength() const
void ensureMaxAlignment(unsigned Align)
Make sure the function is at least Align bytes aligned.
Bitwise operators - logical and, logical or, logical xor.
MO_GOT - Indicates a GOT-relative relocation.
SDValue LowerREADCYCLECOUNTER(SDValue Op, SelectionDAG &DAG) const
unsigned getTypeAlignment(MVT Ty) const
SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, unsigned Reg, EVT VT)
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
static IntegerType * getInt32Ty(LLVMContext &C)
unsigned getLocMemOffset() const
SMUL_LOHI/UMUL_LOHI - Multiply two integers of type iN, producing a signed/unsigned value of type i[2...
LLVM_NODISCARD bool empty() const
int getVarArgsFrameIndex()
SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to sign extend a small value in ...
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
LOAD and STORE have token chains as their first operand, then the same operands as an LLVM load/store...
PointerUnion< const Value *, const PseudoSourceValue * > ptrVal
SDValue LowerUnalignedLoad(SDValue Op, SelectionDAG &DAG) const
BasicBlock * getIncomingBlock(unsigned i) const
Return incoming basic block number i.
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation.
const Function * getParent() const
Return the enclosing method, or null if none.
SDValue LowerBITCAST(SDValue Op, SelectionDAG &DAG) const
bool allowsMisalignedMemoryAccesses(EVT VT, unsigned AddrSpace, unsigned Align, bool *Fast) const override
Determine if the target supports unaligned memory accesses.
void AnalyzeReturn(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
AnalyzeReturn - Analyze the returned values of a return, incorporating info about the result values i...
const TargetSubtargetInfo & getSubtarget() const
static cl::opt< int > MaxStoresPerMemcpyOptSizeCL("max-store-memcpy-Os", cl::Hidden, cl::ZeroOrMore, cl::init(4), cl::desc("Max #stores to inline memcpy"))
unsigned getRARegister() const
const uint32_t * getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override
unsigned MaxStoresPerMemmoveOptSize
Maximum number of store instructions that may be substituted for a call to memmove, used for functions with OptSize attribute.
bool isZero() const
This is just a convenience method to make client code smaller for a common code.
Value * emitLoadLinked(IRBuilder<> &Builder, Value *Addr, AtomicOrdering Ord) const override
Perform a load-linked operation on Addr, returning a "Value *" with the corresponding pointee type...
unsigned MaxStoresPerMemcpyOptSize
Maximum number of store operations that may be substituted for a call to memcpy, used for functions w...
void setStackPointerRegisterToSaveRestore(unsigned R)
If set to a physical register, this specifies the register that llvm.savestack/llvm.restorestack should save and restore.
void setLibcallName(RTLIB::Libcall Call, const char *Name)
Rename the default libcall routine name for the specified libcall.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
CallInst * CreateCall(FunctionType *FTy, Value *Callee, ArrayRef< Value *> Args=None, const Twine &Name="", MDNode *FPMathTag=nullptr)
unsigned getOpcode() const
FSINCOS - Compute both fsin and fcos as a single operation.
SDValue getValue(unsigned R) const
unsigned MaxStoresPerMemcpy
Specify maximum bytes of store instructions per memcpy call.
bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const override
Return true if folding a constant offset with the given GlobalAddress is legal.
static EVT getEVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
SDValue LowerLoad(SDValue Op, SelectionDAG &DAG) const
SDValue getConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isTarget=false, bool isOpaque=false)
Create a ConstantSDNode wrapping a constant value.
OUTCHAIN = EH_RETURN(INCHAIN, OFFSET, HANDLER) - This node represents 'eh_return' gcc dwarf builtin...
const GlobalObject * getBaseObject() const
SDValue getGLOBAL_OFFSET_TABLE(EVT VT)
Return a GLOBAL_OFFSET_TABLE node. This does not have a useful SDLoc.
CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of vector type with the same length ...
MachineConstantPoolValue * getMachineCPVal() const
SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const
bool allowsMemoryAccess(LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace=0, unsigned Alignment=1, bool *Fast=nullptr) const
Return true if the target supports a memory access of this type for the given address space and align...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SDValue getFrameIndex(int FI, EVT VT, bool isTarget=false)
void dumpr() const
Dump (recursively) this node and its use-def subgraph.
LegalizeTypeAction
This enum indicates whether a types are legal for a target, and if not, what action should be used to...
#define Hexagon_PointerSize
void setReturnAddressIsTaken(bool s)
static cl::opt< int > MaxStoresPerMemcpyCL("max-store-memcpy", cl::Hidden, cl::ZeroOrMore, cl::init(6), cl::desc("Max #stores to inline memcpy"))
A raw_ostream that writes to an std::string.
void setSchedulingPreference(Sched::Preference Pref)
Specify the target scheduling preference.
unsigned getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
FMA - Perform a * b + c with no intermediate rounding step.
SDValue getLogicalNOT(const SDLoc &DL, SDValue Val, EVT VT)
Create a logical NOT operation as (XOR Val, BooleanOne).
SDValue getRegister(unsigned Reg, EVT VT)
SDValue getAnyExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)
Convert Op, which must be of integer type, to the integer type VT, by either any-extending or truncat...
unsigned getSizeInBits(unsigned Reg, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI) const
Get the size in bits of Reg.
uint64_t getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type...
FunctionType * getFunctionType() const
unsigned getOpcode() const
Return the opcode for this Instruction or ConstantExpr.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
PREFETCH - This corresponds to a prefetch intrinsic.
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
SDValue LowerJumpTable(SDValue Op, SelectionDAG &DAG) const
void ReplaceAllUsesOfValueWith(SDValue From, SDValue To)
Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone...
Primary interface to the complete machine description for the target machine.
uint64_t getTypeAllocSizeInBits(Type *Ty) const
Returns the offset in bits between successive objects of the specified type, including alignment padd...
ConstantInt * getInt8(uint8_t C)
Get a constant 8-bit value.
static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset, uint8_t ID=0)
Stack pointer relative access.
StringRef - Represent a constant reference to a string, i.e.
SDValue LowerCall(TargetLowering::CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
LowerCall - Functions arguments are copied from virtual regs to (physical regs)/(stack frame)...
SetCC operator - This evaluates to a true value iff the condition is true.
APInt bitcastToAPInt() const
unsigned MaxStoresPerMemset
Specify maximum number of store instructions per memset call.
unsigned MaxStoresPerMemsetOptSize
Maximum number of stores operations that may be substituted for the call to memset, used for functions with OptSize attribute.
bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, LLVMContext &Context) const override
This hook should be implemented to check whether the return values described by the Outs array can fi...
unsigned getNumOperands() const
const SDValue & getOperand(unsigned i) const
unsigned getLocReg() const
uint64_t getZExtValue() const
TRUNCATE - Completely drop the high bits.
bool isSimple() const
Test if the given EVT is simple (as opposed to being extended).
bool IsEligibleForTailCallOptimization(SDValue Callee, CallingConv::ID CalleeCC, bool isVarArg, bool isCalleeStructRet, bool isCallerStructRet, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, const SmallVectorImpl< ISD::InputArg > &Ins, SelectionDAG &DAG) const
IsEligibleForTailCallOptimization - Check whether the call is eligible for tail call optimization...
static cl::opt< int > MaxStoresPerMemmoveCL("max-store-memmove", cl::Hidden, cl::ZeroOrMore, cl::init(6), cl::desc("Max #stores to inline memmove"))
static cl::opt< int > MaxStoresPerMemsetOptSizeCL("max-store-memset-Os", cl::Hidden, cl::ZeroOrMore, cl::init(4), cl::desc("Max #stores to inline memset"))
unsigned AllocateReg(unsigned Reg)
AllocateReg - Attempt to allocate one register.
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
Perform various unary floating-point operations inspired by libm.
static cl::opt< bool > EnableFastMath("ffast-math", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enable Fast Math processing"))
EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, unsigned SrcAlign, bool IsMemset, bool ZeroMemset, bool MemcpyStrSrc, MachineFunction &MF) const override
Returns the target specific optimal type for load and store operations as a result of memset...
Function Alias Analysis false
static Constant * convert_i1_to_i8(const Constant *ConstVal)
SDValue LowerROTL(SDValue Op, SelectionDAG &DAG) const
LLVMContext * getContext() const
SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a scalar value into element 0 of the...
static Constant * get(ArrayRef< Constant *> V)
SDValue LowerPREFETCH(SDValue Op, SelectionDAG &DAG) const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass, StringRef Name="")
createVirtualRegister - Create and return a new virtual register in the function with the specified r...
Carry-using nodes for multiple precision addition and subtraction.
const BasicBlock * getParent() const
HexagonTargetLowering(const TargetMachine &TM, const HexagonSubtarget &ST)
SDValue getTargetGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, int64_t offset=0, unsigned char TargetFlags=0)
void setIndexedStoreAction(unsigned IdxMode, MVT VT, LegalizeAction Action)
Indicate that the specified indexed store does or does not work with the specified type and indicate ...
MemIndexedMode
MemIndexedMode enum - This enum defines the load / store indexed addressing modes.
This class is used to represent ISD::LOAD nodes.
DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned to a specified boundary...