65 #define DEBUG_TYPE "hexagon-lowering" 69 cl::desc(
"Control jump table emission on Hexagon target"));
73 cl::desc(
"Enable Hexagon SDNode scheduling"));
77 cl::desc(
"Enable Fast Math processing"));
81 cl::desc(
"Set minimum jump tables"));
85 cl::desc(
"Max #stores to inline memcpy"));
89 cl::desc(
"Max #stores to inline memcpy"));
93 cl::desc(
"Max #stores to inline memmove"));
97 cl::desc(
"Max #stores to inline memmove"));
101 cl::desc(
"Max #stores to inline memset"));
105 cl::desc(
"Max #stores to inline memset"));
109 cl::desc(
"Rewrite unaligned loads as a pair of aligned loads"));
114 class HexagonCCState :
public CCState {
115 unsigned NumNamedVarArgParams = 0;
120 unsigned NumNamedArgs)
121 :
CCState(CC, IsVarArg, MF, locs, C),
122 NumNamedVarArgParams(NumNamedArgs) {}
123 unsigned getNumNamedVarArgParams()
const {
return NumNamedVarArgParams; }
142 if (RegNum != NumArgRegs && RegNum % 2 == 1)
151 #include "HexagonGenCallingConv.inc" 154 void HexagonTargetLowering::promoteLdStType(
MVT VT,
MVT PromotedLdStVT) {
155 if (VT != PromotedLdStVT) {
156 setOperationAction(
ISD::LOAD, VT, Promote);
157 AddPromotedToType(
ISD::LOAD, VT, PromotedLdStVT);
160 AddPromotedToType(
ISD::STORE, VT, PromotedLdStVT);
191 CCState CCInfo(CallConv, IsVarArg, MF, RVLocs, Context);
194 return CCInfo.
CheckReturn(Outs, RetCC_Hexagon_HVX);
215 if (Subtarget.useHVXOps())
218 CCInfo.AnalyzeReturn(Outs, RetCC_Hexagon);
224 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
247 if (!CI->
isTailCall() || Attr.getValueAsString() ==
"true")
269 if (Subtarget.useHVXOps())
272 CCInfo.AnalyzeCallResult(Ins, RetCC_Hexagon);
275 for (
unsigned i = 0; i != RVLocs.
size(); ++i) {
277 if (RVLocs[i].getValVT() ==
MVT::i1) {
287 unsigned PredR =
MRI.createVirtualRegister(&Hexagon::PredRegsRegClass);
299 RVLocs[i].getValVT(), Glue);
325 bool IsStructRet = Outs.
empty() ?
false : Outs[0].Flags.isSRet();
338 HexagonCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.
getContext(),
341 if (Subtarget.useHVXOps())
342 CCInfo.AnalyzeCallOperands(Outs, CC_Hexagon_HVX);
344 CCInfo.AnalyzeCallOperands(Outs, CC_Hexagon);
347 if (Attr.getValueAsString() ==
"true")
352 CLI.
IsTailCall = IsEligibleForTailCallOptimization(Callee, CallConv,
353 IsVarArg, IsStructRet, StructAttrFlag, Outs,
355 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
363 :
"Argument must be passed on stack. " 364 "Not eligible for Tail Call\n"));
367 unsigned NumBytes = CCInfo.getNextStackOffset();
375 bool NeedsArgAlign =
false;
376 unsigned LargestAlignSeen = 0;
378 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
383 bool ArgAlign = Subtarget.isHVXVectorType(VA.
getValVT());
384 NeedsArgAlign |= ArgAlign;
413 LargestAlignSeen =
std::max(LargestAlignSeen,
435 if (NeedsArgAlign && Subtarget.hasV60Ops()) {
436 LLVM_DEBUG(
dbgs() <<
"Function needs byte stack align due to call args\n");
437 unsigned VecAlign = HRI.getSpillAlignment(Hexagon::HvxVRRegClass);
438 LargestAlignSeen =
std::max(LargestAlignSeen, VecAlign);
443 if (!MemOpChains.
empty())
457 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
459 RegsToPass[i].
second, Glue);
474 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
476 RegsToPass[i].
second, Glue);
491 dyn_cast<ExternalSymbolSDNode>(Callee)) {
503 for (
unsigned i = 0, e = RegsToPass.
size(); i != e; ++i) {
505 RegsToPass[i].second.getValueType()));
509 assert(Mask &&
"Missing call preserved mask for calling convention");
526 Chain = DAG.
getNode(OpCode, dl, NodeTys, Ops);
537 InVals, OutVals, Callee);
564 if (!isa<ConstantSDNode>(Offset.
getNode()))
568 int32_t V = cast<ConstantSDNode>(Offset.
getNode())->getSExtValue();
569 return Subtarget.getInstrInfo()->isValidAutoIncImm(VT, V);
587 unsigned Flags = cast<ConstantSDNode>(Op.
getOperand(i))->getZExtValue();
602 for (; NumVals; --NumVals, ++i) {
606 HMFI.setHasClobberLR(
true);
646 unsigned IntNo = cast<ConstantSDNode>(Op.
getOperand(1))->getZExtValue();
648 if (IntNo == Intrinsic::hexagon_prefetch) {
666 assert(AlignConst &&
"Non-constant Align in LowerDYNAMIC_STACKALLOC");
669 auto &HFI = *Subtarget.getFrameLowering();
672 A = HFI.getStackAlignment();
675 dbgs () << __func__ <<
" Align: " << A <<
" Size: ";
698 HexagonCCState CCInfo(CallConv, IsVarArg, MF, ArgLocs, *DAG.
getContext(),
701 if (Subtarget.useHVXOps())
702 CCInfo.AnalyzeFormalArguments(Ins, CC_Hexagon_HVX);
704 CCInfo.AnalyzeFormalArguments(Ins, CC_Hexagon);
715 for (
unsigned i = 0, e = ArgLocs.
size(); i != e; ++i) {
751 assert(RegSize == 32 || RegSize == 64 ||
752 Subtarget.isHVXVectorType(RegVT));
762 unsigned ObjSize = Flags.
isByVal()
789 HMFI.setVarArgsFrameIndex(FI);
832 auto isSExtFree = [
this](
SDValue N) {
833 switch (
N.getOpcode()) {
840 unsigned ThisBW = ty(
N).getSizeInBits();
845 return ThisBW >= OrigBW;
857 if (IsNegative || isSExtFree(LHS) || isSExtFree(RHS))
894 "conversion only supported for pow2 VectorSize!");
896 for (
unsigned i = 0; i < NumVectorElements / 8; ++i) {
898 for (
unsigned j = 0; j < 8; ++j) {
899 uint8_t y = CV->
getOperand(i * 8 + j)->getUniqueInteger().getZExtValue();
902 assert((x == 0 || x == 255) &&
"Either all 0's or all 1's expected!");
913 bool isVTi1Type =
false;
915 Type *CValTy = ConstVal->getType();
919 isVTi1Type = (CVal !=
nullptr);
923 bool IsPositionIndependent = isPositionIndependent();
936 assert(cast<ConstantPoolSDNode>(T)->getTargetFlags() == TF &&
937 "Inconsistent target flag encountered");
939 if (IsPositionIndependent)
947 int Idx = cast<JumpTableSDNode>(
Op)->getIndex();
948 if (isPositionIndependent()) {
964 if (verifyReturnAddressArgumentIsConstant(Op, DAG))
969 unsigned Depth = cast<ConstantSDNode>(Op.
getOperand(0))->getZExtValue();
991 unsigned Depth = cast<ConstantSDNode>(Op.
getOperand(0))->getZExtValue();
1009 auto *GAN = cast<GlobalAddressSDNode>(
Op);
1011 auto *GV = GAN->getGlobal();
1012 int64_t
Offset = GAN->getOffset();
1014 auto &HLOF = *HTM.getObjFileLowering();
1020 if (GO && Subtarget.useSmallData() && HLOF.isGlobalInSmallSection(GO, HTM))
1025 bool UsePCRel = getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV);
1042 const BlockAddress *BA = cast<BlockAddressSDNode>(
Op)->getBlockAddress();
1085 const auto &HRI = *Subtarget.getRegisterInfo();
1087 assert(Mask &&
"Missing call preserved mask for calling convention");
1112 bool IsPositionIndependent = isPositionIndependent();
1122 if (IsPositionIndependent) {
1124 SDValue GOT = LowerGLOBAL_OFFSET_TABLE(Sym, DAG);
1178 SDValue GOT = LowerGLOBAL_OFFSET_TABLE(TGA, DAG);
1194 return GetDynamicTLSAddr(DAG, Chain, GA, InFlag, PtrVT,
1195 Hexagon::R0, Flags);
1208 switch (HTM.getTLSModel(GA->
getGlobal())) {
1211 return LowerToTLSGeneralDynamicModel(GA, DAG);
1213 return LowerToTLSInitialExecModel(GA, DAG);
1215 return LowerToTLSLocalExecModel(GA, DAG);
1363 for (
unsigned IntExpOp :
1372 for (
unsigned FPExpOp :
1414 static const unsigned VectExpOps[] = {
1439 for (
unsigned VectExpOp : VectExpOps)
1555 for (
unsigned FPExpOpV4 :
1578 initializeHVXLowering();
1598 setLibcallName(RTLIB::FPTOUINT_F32_I128,
"__hexagon_fixunssfti");
1599 setLibcallName(RTLIB::FPTOUINT_F64_I128,
"__hexagon_fixunsdfti");
1659 setLibcallName(RTLIB::UINTTOFP_I32_F32,
"__hexagon_floatunsisf");
1660 setLibcallName(RTLIB::UINTTOFP_I32_F64,
"__hexagon_floatunsidf");
1661 setLibcallName(RTLIB::UINTTOFP_I64_F32,
"__hexagon_floatundisf");
1662 setLibcallName(RTLIB::UINTTOFP_I64_F64,
"__hexagon_floatundidf");
1745 return (ID == Intrinsic::hexagon_L2_loadrd_pbr ||
1746 ID == Intrinsic::hexagon_L2_loadri_pbr ||
1747 ID == Intrinsic::hexagon_L2_loadrh_pbr ||
1748 ID == Intrinsic::hexagon_L2_loadruh_pbr ||
1749 ID == Intrinsic::hexagon_L2_loadrb_pbr ||
1750 ID == Intrinsic::hexagon_L2_loadrub_pbr);
1759 V = cast<Operator>(V)->getOperand(0);
1761 V = cast<Instruction>(V)->getOperand(0);
1774 if (Blk == Parent) {
1779 BaseVal = BackEdgeVal;
1781 }
while ((BaseVal != BackEdgeVal) && (IntrBaseVal != BackEdgeVal));
1784 if (IntrBaseVal == BackEdgeVal)
1791 assert(Idx >= 0 &&
"Unexpected index to incoming argument in PHI");
1799 Value *IntrBaseVal = V;
1806 }
while (BaseVal != V);
1809 if (
const PHINode *PN = dyn_cast<PHINode>(V))
1823 unsigned Intrinsic)
const {
1824 switch (Intrinsic) {
1825 case Intrinsic::hexagon_L2_loadrd_pbr:
1826 case Intrinsic::hexagon_L2_loadri_pbr:
1827 case Intrinsic::hexagon_L2_loadrh_pbr:
1828 case Intrinsic::hexagon_L2_loadruh_pbr:
1829 case Intrinsic::hexagon_L2_loadrb_pbr:
1830 case Intrinsic::hexagon_L2_loadrub_pbr: {
1851 case Intrinsic::hexagon_V6_vgathermw:
1852 case Intrinsic::hexagon_V6_vgathermw_128B:
1853 case Intrinsic::hexagon_V6_vgathermh:
1854 case Intrinsic::hexagon_V6_vgathermh_128B:
1855 case Intrinsic::hexagon_V6_vgathermhw:
1856 case Intrinsic::hexagon_V6_vgathermhw_128B:
1857 case Intrinsic::hexagon_V6_vgathermwq:
1858 case Intrinsic::hexagon_V6_vgathermwq_128B:
1859 case Intrinsic::hexagon_V6_vgathermhq:
1860 case Intrinsic::hexagon_V6_vgathermhq_128B:
1861 case Intrinsic::hexagon_V6_vgathermhwq:
1862 case Intrinsic::hexagon_V6_vgathermhwq_128B: {
1897 unsigned DefinedValues)
const {
1924 if (VecWidth >= HwWidth/2 && VecWidth < HwWidth)
1931 std::pair<SDValue, int>
1932 HexagonTargetLowering::getBaseAndOffset(
SDValue Addr)
const {
1935 if (
auto *CN = dyn_cast<const ConstantSDNode>(Op1.
getNode()))
1936 return { Addr.
getOperand(0), CN->getSExtValue() };
1946 const auto *SVN = cast<ShuffleVectorSDNode>(
Op);
1948 assert(AM.size() <= 8 &&
"Unexpected shuffle mask");
1949 unsigned VecLen = AM.size();
1953 "HVX shuffles should be legal");
1958 const SDLoc &dl(Op);
1963 if (ty(Op0) != VecTy || ty(Op1) != VecTy)
1969 unsigned F =
llvm::find_if(AM, [](
int M) {
return M >= 0; }) - AM.data();
1972 if (AM[F] >=
int(VecLen)) {
1980 for (
unsigned i = 0, e =
Mask.size(); i != e; ++i) {
1983 for (
unsigned j = 0; j != ElemBytes; ++j)
1986 for (
unsigned j = 0; j != ElemBytes; ++j)
1997 uint64_t MaskIdx = 0;
1998 uint64_t MaskUnd = 0;
1999 for (
unsigned i = 0, e = ByteMask.
size(); i != e; ++i) {
2001 uint64_t M = ByteMask[i] & 0xFF;
2007 if (ByteMask.
size() == 4) {
2009 if (MaskIdx == (0x03020100 | MaskUnd))
2012 if (MaskIdx == (0x00010203 | MaskUnd)) {
2020 typeJoin({ty(Op1), ty(Op0)}), {Op1, Op0});
2021 if (MaskIdx == (0x06040200 | MaskUnd))
2022 return getInstr(Hexagon::S2_vtrunehb, dl, VecTy, {Concat10}, DAG);
2023 if (MaskIdx == (0x07050301 | MaskUnd))
2024 return getInstr(Hexagon::S2_vtrunohb, dl, VecTy, {Concat10}, DAG);
2027 typeJoin({ty(Op0), ty(Op1)}), {Op0, Op1});
2028 if (MaskIdx == (0x02000604 | MaskUnd))
2029 return getInstr(Hexagon::S2_vtrunehb, dl, VecTy, {Concat01}, DAG);
2030 if (MaskIdx == (0x03010705 | MaskUnd))
2031 return getInstr(Hexagon::S2_vtrunohb, dl, VecTy, {Concat01}, DAG);
2034 if (ByteMask.
size() == 8) {
2036 if (MaskIdx == (0x0706050403020100ull | MaskUnd))
2039 if (MaskIdx == (0x0001020304050607ull | MaskUnd)) {
2046 if (MaskIdx == (0x0d0c050409080100ull | MaskUnd))
2047 return getInstr(Hexagon::S2_shuffeh, dl, VecTy, {Op1, Op0}, DAG);
2048 if (MaskIdx == (0x0f0e07060b0a0302ull | MaskUnd))
2049 return getInstr(Hexagon::S2_shuffoh, dl, VecTy, {Op1, Op0}, DAG);
2050 if (MaskIdx == (0x0d0c090805040100ull | MaskUnd))
2051 return getInstr(Hexagon::S2_vtrunewh, dl, VecTy, {Op1, Op0}, DAG);
2052 if (MaskIdx == (0x0f0e0b0a07060302ull | MaskUnd))
2053 return getInstr(Hexagon::S2_vtrunowh, dl, VecTy, {Op1, Op0}, DAG);
2054 if (MaskIdx == (0x0706030205040100ull | MaskUnd)) {
2055 VectorPair
P = opSplit(Op0, dl, DAG);
2056 return getInstr(Hexagon::S2_packhl, dl, VecTy, {P.second, P.first}, DAG);
2060 if (MaskIdx == (0x0e060c040a020800ull | MaskUnd))
2061 return getInstr(Hexagon::S2_shuffeb, dl, VecTy, {Op1, Op0}, DAG);
2062 if (MaskIdx == (0x0f070d050b030901ull | MaskUnd))
2063 return getInstr(Hexagon::S2_shuffob, dl, VecTy, {Op1, Op0}, DAG);
2074 if (
SDValue S = BVN->getSplatValue()) {
2098 return getVectorShiftByInt(Op, DAG);
2112 MVT InpTy = ty(InpV);
2114 const SDLoc &dl(Op);
2120 return getInstr(Hexagon::C2_tfrrp, dl, ResTy, Ext, DAG);
2133 bool AllConst =
true;
2135 for (
unsigned i = 0, e = Values.
size(); i != e; ++i) {
2142 if (
auto *CN = dyn_cast<ConstantSDNode>(V.
getNode())) {
2143 const ConstantInt *CI = CN->getConstantIntValue();
2145 }
else if (
auto *CN = dyn_cast<ConstantFPSDNode>(V.
getNode())) {
2146 const ConstantFP *CF = CN->getConstantFPValue();
2163 bool AllConst = getBuildVectorConstInts(Elem, VecTy, DAG, Consts);
2165 unsigned First, Num = Elem.
size();
2166 for (First = 0; First != Num; ++First)
2167 if (!isUndef(Elem[First]))
2174 return getZero(dl, VecTy, DAG);
2179 uint32_t V = (Consts[0]->getZExtValue() & 0xFFFF) |
2180 Consts[1]->getZExtValue() << 16;
2184 {Elem[1], Elem[0]}, DAG);
2191 int32_t V = (Consts[0]->getZExtValue() & 0xFF) |
2192 (Consts[1]->getZExtValue() & 0xFF) << 8 |
2193 (Consts[1]->getZExtValue() & 0xFF) << 16 |
2194 Consts[2]->getZExtValue() << 24;
2199 bool IsSplat =
true;
2200 for (
unsigned i = 0; i != Num; ++i) {
2203 if (Elem[i] == Elem[First] || isUndef(Elem[i]))
2219 for (
unsigned i = 0; i != 4; ++i) {
2229 SDValue R = getInstr(Hexagon::A2_combine_ll, dl,
MVT::i32, {B1, B0}, DAG);
2246 bool AllConst = getBuildVectorConstInts(Elem, VecTy, DAG, Consts);
2248 unsigned First, Num = Elem.
size();
2249 for (First = 0; First != Num; ++First)
2250 if (!isUndef(Elem[First]))
2257 return getZero(dl, VecTy, DAG);
2261 bool IsSplat =
true;
2262 for (
unsigned i = 0; i != Num; ++i) {
2265 if (Elem[i] == Elem[First] || isUndef(Elem[i]))
2282 : (ElemTy ==
MVT::i16) ? 0xFFFFull : 0xFFFFFFFFull;
2283 for (
unsigned i = 0; i != Num; ++i)
2284 Val = (Val << W) | (Consts[Num-1-i]->getZExtValue() &
Mask);
2293 : buildVector32(Elem.
take_front(Num/2), dl, HalfTy, DAG);
2296 : buildVector32(Elem.
drop_front(Num/2), dl, HalfTy, DAG);
2304 MVT VecTy = ty(VecV);
2310 assert((VecWidth % ElemWidth) == 0);
2315 if (ElemWidth == 1) {
2317 assert(VecWidth == 8 || VecWidth == 4 || VecWidth == 2);
2328 if (ValWidth == 1) {
2339 unsigned Scale = VecWidth / ValWidth;
2352 T1 = expandPredicate(T1, dl, DAG);
2359 assert(VecWidth == 32 || VecWidth == 64);
2362 MVT ScalarTy = tyScalar(VecTy);
2369 unsigned Off = IdxN->getZExtValue() * ElemWidth;
2370 if (VecWidth == 64 && ValWidth == 32) {
2371 assert(Off == 0 || Off == 32);
2372 unsigned SubIdx = Off == 0 ? Hexagon::isub_lo : Hexagon::isub_hi;
2374 }
else if (Off == 0 && (ValWidth % 8) == 0) {
2381 {VecV, WidthV, OffV});
2389 {VecV, WidthV, OffV});
2402 MVT VecTy = ty(VecV);
2404 MVT ValTy = ty(ValV);
2411 for (
unsigned R = Scale; R > 1; R /= 2) {
2412 ValR = contractPredicate(ValR, dl, DAG);
2420 unsigned ValBytes = 64 / Scale;
2426 {VecR, ValR, Width, Idx});
2432 assert(VecWidth == 32 || VecWidth == 64);
2433 assert((VecWidth % ValWidth) == 0);
2449 unsigned W =
C->getZExtValue() * ValWidth;
2452 {VecV, ValV, WidthV, OffV});
2458 {VecV, ValV, WidthV, OffV});
2465 HexagonTargetLowering::expandPredicate(
SDValue Vec32,
const SDLoc &dl,
2470 return getInstr(Hexagon::S2_vsxtbh, dl,
MVT::i64, {Vec32}, DAG);
2474 HexagonTargetLowering::contractPredicate(
SDValue Vec64,
const SDLoc &dl,
2479 return getInstr(Hexagon::S2_vtrunehb, dl,
MVT::i32, {Vec64}, DAG);
2504 const SDLoc &dl(Op);
2510 return buildVector32(Ops, dl, VecTy, DAG);
2512 return buildVector64(Ops, dl, VecTy, DAG);
2522 for (
unsigned i = 0; i != 8; ++i) {
2527 for (
unsigned i = 0, e = A.size()/2; i != e; ++i)
2531 return getInstr(Hexagon::C2_tfrrp, dl, VecTy, {Rs[0]}, DAG);
2541 const SDLoc &dl(Op);
2566 for (
unsigned R = Scale; R > 1; R /= 2) {
2567 W = contractPredicate(W, dl, DAG);
2572 Words[IdxW].push_back(W);
2577 Words[IdxW ^ 1].clear();
2579 for (
unsigned i = 0, e = Words[IdxW].
size(); i != e; i += 2) {
2580 SDValue W0 = Words[IdxW][i], W1 = Words[IdxW][i+1];
2583 {W0, W1, WidthV, WidthV});
2584 Words[IdxW ^ 1].push_back(T);
2592 assert(Scale == 2 && Words[IdxW].
size() == 2);
2595 Words[IdxW][1], Words[IdxW][0]);
2607 return extractVector(Vec, Op.
getOperand(1),
SDLoc(Op), ElemTy, ty(Op), DAG);
2614 ty(Op), ty(Op), DAG);
2629 SDLoc(Op), ty(ValV), DAG);
2650 MVT LoadTy = ty(Op);
2652 if (HaveAlign >= NeedAlign)
2655 const SDLoc &dl(Op);
2662 bool DoDefault =
false;
2672 if (!DoDefault && 2*HaveAlign == NeedAlign) {
2690 unsigned LoadLen = NeedAlign;
2693 auto BO = getBaseAndOffset(Base);
2694 unsigned BaseOpc = BO.first.getOpcode();
2698 if (BO.second % LoadLen != 0) {
2701 BO.second -= BO.second % LoadLen;
2714 2*LoadLen, LoadLen, MMO->getAAInfo(), MMO->getRanges(),
2715 MMO->getSyncScopeID(), MMO->getOrdering(),
2716 MMO->getFailureOrdering());
2732 const SDLoc &dl(Op);
2740 EVT CarryTy =
C.getValueType();
2761 unsigned OffsetReg = Hexagon::R28;
2767 Chain = DAG.
getCopyToReg(Chain, dl, OffsetReg, Offset);
2783 if (isHvxOperation(Op)) {
2785 if (
SDValue V = LowerHvxOperation(Op, DAG))
2794 errs() <<
"Error: check for a non-legal type in this operation\n";
2861 int Idx = cast<JumpTableSDNode>(Table)->getIndex();
2873 if (Constraint.
size() == 1) {
2874 switch (Constraint[0]) {
2889 std::pair<unsigned, const TargetRegisterClass*>
2893 if (Constraint.
size() == 1) {
2894 switch (Constraint[0]) {
2898 return {0u,
nullptr};
2904 return {0u, &Hexagon::IntRegsRegClass};
2907 return {0u, &Hexagon::DoubleRegsRegClass};
2912 return {0u,
nullptr};
2913 return {0u, &Hexagon::ModRegsRegClass};
2917 return {0u,
nullptr};
2920 return {0u, &Hexagon::HvxQRRegClass};
2926 return {0u,
nullptr};
2928 return {0u, &Hexagon::HvxVRRegClass};
2931 return {0u, &Hexagon::HvxVRRegClass};
2932 return {0u, &Hexagon::HvxWRRegClass};
2934 return {0u, &Hexagon::HvxWRRegClass};
2938 return {0u,
nullptr};
2978 int Scale = AM.
Scale;
3002 return Imm >= -512 && Imm <= 511;
3012 bool IsCalleeStructRet,
3013 bool IsCallerStructRet,
3020 bool CCMatch = CallerCC == CalleeCC;
3028 if (!isa<GlobalAddressSDNode>(Callee) &&
3029 !isa<ExternalSymbolSDNode>(Callee)) {
3049 if (IsCalleeStructRet || IsCallerStructRet)
3071 unsigned DstAlign,
unsigned SrcAlign,
bool IsMemset,
bool ZeroMemset,
3074 auto Aligned = [](
unsigned GivenA,
unsigned MinA) ->
bool {
3075 return (GivenA % MinA) == 0;
3078 if (Size >= 8 && Aligned(DstAlign, 8) && (IsMemset || Aligned(SrcAlign, 8)))
3080 if (Size >= 4 && Aligned(DstAlign, 4) && (IsMemset || Aligned(SrcAlign, 4)))
3082 if (Size >= 2 && Aligned(DstAlign, 2) && (IsMemset || Aligned(SrcAlign, 2)))
3095 std::pair<const TargetRegisterClass*, uint8_t>
3103 return std::make_pair(&Hexagon::HvxQRRegClass, 1);
3104 if (BitWidth == VecWidth)
3105 return std::make_pair(&Hexagon::HvxVRRegClass, 1);
3106 assert(BitWidth == 2 * VecWidth);
3107 return std::make_pair(&Hexagon::HvxWRRegClass, 1);
3117 Type *Ty = cast<PointerType>(Addr->
getType())->getElementType();
3119 assert((SZ == 32 || SZ == 64) &&
"Only 32/64-bit atomic loads supported");
3120 Intrinsic::ID IntID = (SZ == 32) ? Intrinsic::hexagon_L2_loadw_locked
3121 : Intrinsic::hexagon_L4_loadd_locked;
3134 assert((SZ == 32 || SZ == 64) &&
"Only 32/64-bit atomic stores supported");
3135 Intrinsic::ID IntID = (SZ == 32) ? Intrinsic::hexagon_S2_storew_locked
3136 : Intrinsic::hexagon_S4_stored_locked;
3161 return 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.
bool isMachineConstantPoolEntry() const
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...
X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating point type down to the precision of the ...
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...
void push_back(const T &Elt)
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.
Function * getCalledFunction() const
Return the function called, or null if this is an indirect function invocation.
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.
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.
C - The default llvm calling convention, compatible with C.
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.
Compute iterated dominance frontiers using a linear time algorithm.
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.
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.
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
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
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
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.
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.
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.
PointerType * getPointerTo(unsigned AddrSpace=0) const
Return a pointer to the current type.
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
#define Hexagon_PointerSize
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...
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)
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.
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
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
Class to represent pointers.
unsigned getByValSize() const
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...
Value * getOperand(unsigned i_nocapture) const
The memory access is volatile.
SDValue LowerINTRINSIC_VOID(SDValue Op, SelectionDAG &DAG) const
bool isNegative() const
Determine sign of this APInt.
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
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.
TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(EVT VT) const override
Return the preferred vector type legalization action.
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.
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.
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
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.
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"))
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.
X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type.
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...
This class contains a discriminated union of information about pointers in memory operands...
Fast - This calling convention attempts to make calls as fast as possible (e.g.
#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.
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
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 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
#define HEXAGON_LRFP_SIZE
unsigned getNumOperands() const
CCState - This class holds information needed while lowering arguments and return values...
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
#define HEXAGON_GOT_SYM_NAME
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.
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...
bool shouldExpandAtomicCmpXchgInIR(AtomicCmpXchgInst *AI) const override
Returns true if the given atomic cmpxchg should be expanded by the IR-level AtomicExpand pass into a ...
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
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.
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)
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 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...
void setReturnAddressIsTaken(bool s)
Value * getArgOperand(unsigned i) const
getArgOperand/setArgOperand - Return/set the i-th call argument.
static cl::opt< int > MaxStoresPerMemcpyCL("max-store-memcpy", cl::Hidden, cl::ZeroOrMore, cl::init(6), cl::desc("Max #stores to inline memcpy"))
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
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
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
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...
FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2, FCEIL, FTRUNC, FRINT, FNEARBYINT, FROUND, FFLOOR - Perform various unary floating point operations.
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)
Type * getElementType() const
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.
Type * getContainedType(unsigned i) const
This method is used to implement the type iterator (defined at the end of the file).
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 ...
CallInst * CreateCall(Value *Callee, ArrayRef< Value *> Args=None, const Twine &Name="", MDNode *FPMathTag=nullptr)
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...