LLVM: include/llvm/CodeGen/SelectionDAGNodes.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18#ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H

19#define LLVM_CODEGEN_SELECTIONDAGNODES_H

20

48#include

49#include

50#include

51#include

52#include

53#include

54#include

55#include

56#include

57#include

58

59namespace llvm {

60

72

74 bool force = false);

75

76

77

78

79

84

85namespace ISD {

86

87

88

89

90

91

93

94

95

96

98 bool BuildVectorOnly = false);

99

100

101

102

104 bool BuildVectorOnly = false);

105

106

107

109

110

111

113

114

115

117

118

119

121

122

123

126

127

128

130

131

133

134}

135

136

137

138

139

140

141

142

143

144

145

146

149

150 SDNode *Node = nullptr;

151 unsigned ResNo = 0;

152

153public:

156

157

158 unsigned getResNo() const { return ResNo; }

159

160

162

163

165

167

169 return Node == O.Node && ResNo == O.ResNo;

170 }

175 return std::tie(Node, ResNo) < std::tie(O.Node, O.ResNo);

176 }

177 explicit operator bool() const {

178 return Node != nullptr;

179 }

180

184

185

187

188

190

191

195

196

197

198

199

200

204

208

209

210 inline unsigned getOpcode() const;

217 inline bool isUndef() const;

218 inline bool isAnyAdd() const;

221 inline void dump() const;

223 inline void dumpr() const;

225

226

227

228

229

230

232 unsigned Depth = 2) const;

233

234

236

237

239};

240

244 V.ResNo = -1U;

245 return V;

246 }

247

250 V.ResNo = -2U;

251 return V;

252 }

253

255 return ((unsigned)((uintptr_t)Val.getNode() >> 4) ^

256 (unsigned)((uintptr_t)Val.getNode() >> 9)) + Val.getResNo();

257 }

258

262};

263

264

265

280

281

282

283

284

285

287

289

290 SDNode *User = nullptr;

291

292

293 SDUse **Prev = nullptr;

294 SDUse *Next = nullptr;

295

296public:

300

301

302 operator const SDValue&() const { return Val; }

303

304

305

307

308

311

312

314

315

317

318

320

321 unsigned getResNo() const { return Val.getResNo(); }

322

324

325

327 return Val == V;

328 }

329

330

332 return Val != V;

333 }

334

335

337 return Val < V;

338 }

339

340private:

343

345

346 void setUser(SDNode *p) { User = p; }

347

348

349

350 inline void set(const SDValue &V);

351

352

353 inline void setInitial(const SDValue &V);

354

355

356 inline void setNode(SDNode *N);

357

362 *List = this;

363 }

364

365 void removeFromList() {

366 *Prev = Next;

368 }

369};

370

371

372

380

381

382

383

385private:

387

388 unsigned Flags = 0;

389

390 template void setFlag(bool B) {

391 Flags = (Flags & ~Flag) | (B ? Flag : 0);

392 }

393

394public:

395 enum : unsigned {

410

411

412

413

414

415

417

419

421

422

423

424

425

426

427

428

430

431

432

433

438 };

439

440

442

443

453

454

457 void setExact(bool b) { setFlag(b); }

460 void setNonNeg(bool b) { setFlag(b); }

461 void setNoNaNs(bool b) { setFlag(b); }

462 void setNoInfs(bool b) { setFlag(b); }

471

472

489

491 return Flags == Other.Flags;

492 }

495};

496

499

504

509

510

511

513private:

514

515 int32_t NodeType;

516

518

519protected:

520

521

522

523

524#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))

525

526

527#define BEGIN_TWO_BYTE_PACK() _Pragma("pack(2)")

528#define END_TWO_BYTE_PACK() _Pragma("pack(pop)")

529#else

530#define BEGIN_TWO_BYTE_PACK()

531#define END_TWO_BYTE_PACK()

532#endif

533

546

554

559

561

564 uint16_t IsDereferenceable : 1;

566 };

568

576

578

579

580

581

582

583

584

585

586

588 };

590

606

620

621 union {

629 };

631#undef BEGIN_TWO_BYTE_PACK

632#undef END_TWO_BYTE_PACK

633

634

635

636

637 static_assert(sizeof(SDNodeBitfields) <= 2, "field too wide");

638 static_assert(sizeof(ConstantSDNodeBitfields) <= 2, "field too wide");

639 static_assert(sizeof(MemSDNodeBitfields) <= 2, "field too wide");

640 static_assert(sizeof(LSBaseSDNodeBitfields) <= 2, "field too wide");

641 static_assert(sizeof(LoadSDNodeBitfields) <= 2, "field too wide");

642 static_assert(sizeof(StoreSDNodeBitfields) <= 2, "field too wide");

643

644public:

645

646

647

648

649

651

652private:

654

656

657

658 int NodeId = -1;

659

660

661 SDUse *OperandList = nullptr;

662

663

664

665 const EVT *ValueList;

666

667

668 SDUse *UseList = nullptr;

669

670

671 unsigned short NumOperands = 0;

672 unsigned short NumValues;

673

674

675

676

677

678

679 unsigned IROrder;

680

681

683

684

686

687

688

689

690 int CombinerWorklistIndex = -1;

691

693

694public:

695

696

697

698

699

700

701

702

703 unsigned getOpcode() const { return (unsigned)NodeType; }

704

705

706

708

709

713

714

716 return NodeType == ISD::ADD || NodeType == ISD::PTRADD;

717 }

718

719

721

722

724 switch (NodeType) {

725 default:

726 return false;

727 case ISD::STRICT_FP16_TO_FP:

728 case ISD::STRICT_FP_TO_FP16:

729 case ISD::STRICT_BF16_TO_FP:

730 case ISD::STRICT_FP_TO_BF16:

731#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN) \

732 case ISD::STRICT_##DAGN:

733#include "llvm/IR/ConstrainedOps.def"

734 return true;

735 }

736 }

737

738

740 switch (NodeType) {

741 default:

742 return false;

747 return true;

748 }

749 }

750

751

753

754

755

757

758

759

760

763 return ~NodeType;

764 }

765

768

770

771

772 bool use_empty() const { return UseList == nullptr; }

773

774

776

777

778

780

781

783

784

786

787

789

790

792

793

795

796

797 void setIROrder(unsigned Order) { IROrder = Order; }

798

799

801

802

803

805

806

807

808 class use_iterator {

810

811 SDUse *Op = nullptr;

812

814

815 public:

821

824 use_iterator &operator=(const use_iterator &) = default;

825

826 bool operator==(const use_iterator &x) const { return Op == x.Op; }

830

831

833 assert(Op && "Cannot increment end iterator!");

834 Op = Op->getNext();

835 return *this;

836 }

837

839 use_iterator tmp = *this; ++*this; return tmp;

840 }

841

842

844 assert(Op && "Cannot dereference end iterator!");

845 return *Op;

846 }

847

849 };

850

851 class user_iterator {

854

856

857 public:

863

865

866 bool operator==(const user_iterator &x) const { return UI == x.UI; }

868

870 ++UI;

871 return *this;

872 }

873

875 auto tmp = *this;

876 ++*this;

877 return tmp;

878 }

879

880

882

884

886 };

887

888

892

894

901

902

904

906

913

914

915

918

919

921 if (U.getResNo() == Value) {

922 if (NUses == 0)

923 return false;

924 --NUses;

925 }

926 }

927

928

929 return NUses == 0;

930 }

931

932

933

935

936

938

939

941

942

943

944

946 return N->hasPredecessor(this);

947 }

948

949

950

951

952

954

955

956

957

958

959

960

961

962

963

968 bool TopologicalPrune = false) {

969 if (Visited.count(N))

970 return true;

971

973

974

975

976

977

978

979

980

981

982

983

984 int NId = N->getNodeId();

985

986 if (NId < -1)

987 NId = -(NId + 1);

988

989 bool Found = false;

990 while (!Worklist.empty()) {

992 int MId = M->getNodeId();

993 if (TopologicalPrune && M->getOpcode() != ISD::TokenFactor && (NId > 0) &&

994 (MId > 0) && (MId < NId)) {

996 continue;

997 }

1000 if (Visited.insert(Op).second)

1002 if (Op == N)

1003 Found = true;

1004 }

1005 if (Found)

1006 break;

1008 break;

1009 }

1010

1011 Worklist.append(DeferredNodes.begin(), DeferredNodes.end());

1012

1014 return true;

1015 return Found;

1016 }

1017

1018

1019

1022

1023

1025

1026

1028 return std::numeric_limits<decltype(SDNode::NumOperands)>::max();

1029 }

1030

1031

1033

1034

1036

1037

1039

1040

1042

1044

1046 assert(Num < NumOperands && "Invalid child # of SDNode!");

1047 return OperandList[Num];

1048 }

1049

1051

1055

1056

1059 std::random_access_iterator_tag, SDValue,

1060 ptrdiff_t, value_op_iterator *,

1061 value_op_iterator *> {

1064

1066 };

1067

1072

1074 SDVTList X = { ValueList, NumValues };

1075 return X;

1076 }

1077

1078

1079

1084 return nullptr;

1085 }

1086

1087

1088

1091 if (U.getValueType() == MVT::Glue)

1092 return U.getUser();

1093 return nullptr;

1094 }

1095

1098 void dropFlags(unsigned Mask) { Flags &= ~Mask; }

1099

1100

1101

1103

1107

1110

1111

1113

1114

1116 assert(ResNo < NumValues && "Illegal result number!");

1117 return ValueList[ResNo];

1118 }

1119

1120

1124

1125

1126

1127

1128

1129

1133

1135

1141

1142

1149

1150

1151

1152

1153

1154

1155

1158

1159

1160

1161

1162

1163

1164

1166 unsigned depth = 100) const;

1167

1168

1170

1171

1173

1174

1175

1176

1178

1179

1180

1181

1183

1184

1185

1186

1187

1189

1190

1191

1192

1193

1194

1196 unsigned depth = 100) const;

1197

1198

1200

1201

1203

1204protected:

1206 SDVTList Ret = { getValueTypeList(VT), 1 };

1207 return Ret;

1208 }

1209

1210

1211

1212

1213

1215 : NodeType(Opc), ValueList(VTs.VTs), NumValues(VTs.NumVTs),

1216 IROrder(Order), debugLoc(std::move(dl)) {

1218 assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor");

1220 "NumValues wasn't wide enough for its operands!");

1221 }

1222

1223

1225};

1226

1227

1228

1229

1230

1231

1232

1233

1234

1235

1237private:

1239 int IROrder = 0;

1240

1241public:

1246 assert(Order >= 0 && "bad IROrder");

1247 if (I)

1248 DL = I->getDebugLoc();

1249 }

1250

1253};

1254

1255

1256

1258 : Node(node), ResNo(resno) {

1259

1260

1261

1262 assert((!Node || !ResNo || ResNo < Node->getNumValues()) &&

1263 "Invalid result number for the given node!");

1264 assert(ResNo < -2U && "Cannot use result numbers reserved for DenseMaps.");

1265}

1266

1268 return Node->getOpcode();

1269}

1270

1272 return Node->getValueType(ResNo);

1273}

1274

1276 return Node->getNumOperands();

1277}

1278

1282

1284 return Node->getConstantOperandVal(i);

1285}

1286

1288 return Node->getConstantOperandAPInt(i);

1289}

1290

1292 return Node->isTargetOpcode();

1293}

1294

1296 return Node->isMachineOpcode();

1297}

1298

1300 return Node->getMachineOpcode();

1301}

1302

1304 return Node->isUndef();

1305}

1306

1308

1310 return !Node->hasAnyUseOfValue(ResNo);

1311}

1312

1314 return Node->hasNUsesOfValue(1, ResNo);

1315}

1316

1318 return Node->getDebugLoc();

1319}

1320

1322 return Node->dump();

1323}

1324

1326 return Node->dump(G);

1327}

1328

1330 return Node->dumpr();

1331}

1332

1334 return Node->dumpr(G);

1335}

1336

1337

1341

1342inline void SDUse::set(const SDValue &V) {

1343 if (Val.getNode()) removeFromList();

1344 Val = V;

1345 if (V.getNode())

1347}

1348

1349inline void SDUse::setInitial(const SDValue &V) {

1350 Val = V;

1352}

1353

1354inline void SDUse::setNode(SDNode *N) {

1355 if (Val.getNode()) removeFromList();

1356 Val.setNode(N);

1357 if (N) N->addUse(*this);

1358}

1359

1360

1361

1362

1363

1366

1367public:

1370

1371

1373

1374

1375

1376

1377

1378 Op.setUser(this);

1379 Op.setInitial(X);

1380 NumOperands = 1;

1381 OperandList = &Op;

1382 }

1384

1386};

1387

1389private:

1390 unsigned SrcAddrSpace;

1391 unsigned DestAddrSpace;

1392

1393public:

1395 unsigned SrcAS, unsigned DestAS)

1396 : SDNode(ISD::ADDRSPACECAST, Order, dl, VTs), SrcAddrSpace(SrcAS),

1397 DestAddrSpace(DestAS) {}

1398

1401

1403 return N->getOpcode() == ISD::ADDRSPACECAST;

1404 }

1405};

1406

1407

1409private:

1410

1411 EVT MemoryVT;

1412

1413protected:

1414

1416

1417public:

1420

1423

1424

1427

1428

1429

1430

1431

1432

1433

1436 union {

1439 };

1444 return Data;

1445 }

1446

1451

1452

1454

1455

1457

1458

1460

1461

1463

1464

1465

1466

1468 return MMO->getSuccessOrdering();

1469 }

1470

1471

1472

1473

1475

1476

1478

1479

1480

1481

1483

1484

1486

1487

1489

1490

1491

1493

1495 return MMO->getPointerInfo();

1496 }

1497

1498

1502

1503

1504

1505

1506

1508 MMO->refineAlignment(NewMMO);

1509 }

1510

1512

1513

1514

1516 MMO->clearRanges();

1517 }

1518

1520

1523 case ISD::STORE:

1524 case ISD::ATOMIC_STORE:

1525 case ISD::VP_STORE:

1526 case ISD::MSTORE:

1527 case ISD::VP_SCATTER:

1528 case ISD::EXPERIMENTAL_VP_STRIDED_STORE:

1530 case ISD::MGATHER:

1531 case ISD::MSCATTER:

1532 case ISD::EXPERIMENTAL_VECTOR_HISTOGRAM:

1534 default:

1536 }

1537 }

1538

1539

1541

1542

1543 switch (N->getOpcode()) {

1544 case ISD::LOAD:

1545 case ISD::STORE:

1546 case ISD::ATOMIC_CMP_SWAP:

1547 case ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS:

1548 case ISD::ATOMIC_SWAP:

1549 case ISD::ATOMIC_LOAD_ADD:

1550 case ISD::ATOMIC_LOAD_SUB:

1551 case ISD::ATOMIC_LOAD_AND:

1552 case ISD::ATOMIC_LOAD_CLR:

1553 case ISD::ATOMIC_LOAD_OR:

1554 case ISD::ATOMIC_LOAD_XOR:

1555 case ISD::ATOMIC_LOAD_NAND:

1556 case ISD::ATOMIC_LOAD_MIN:

1557 case ISD::ATOMIC_LOAD_MAX:

1558 case ISD::ATOMIC_LOAD_UMIN:

1559 case ISD::ATOMIC_LOAD_UMAX:

1560 case ISD::ATOMIC_LOAD_FADD:

1561 case ISD::ATOMIC_LOAD_FSUB:

1562 case ISD::ATOMIC_LOAD_FMAX:

1563 case ISD::ATOMIC_LOAD_FMIN:

1564 case ISD::ATOMIC_LOAD_FMAXIMUM:

1565 case ISD::ATOMIC_LOAD_FMINIMUM:

1566 case ISD::ATOMIC_LOAD_UINC_WRAP:

1567 case ISD::ATOMIC_LOAD_UDEC_WRAP:

1568 case ISD::ATOMIC_LOAD_USUB_COND:

1569 case ISD::ATOMIC_LOAD_USUB_SAT:

1570 case ISD::ATOMIC_LOAD:

1571 case ISD::ATOMIC_STORE:

1572 case ISD::MLOAD:

1573 case ISD::MSTORE:

1574 case ISD::MGATHER:

1575 case ISD::MSCATTER:

1576 case ISD::VP_LOAD:

1577 case ISD::VP_STORE:

1578 case ISD::VP_GATHER:

1579 case ISD::VP_SCATTER:

1580 case ISD::EXPERIMENTAL_VP_STRIDED_LOAD:

1581 case ISD::EXPERIMENTAL_VP_STRIDED_STORE:

1582 case ISD::GET_FPENV_MEM:

1583 case ISD::SET_FPENV_MEM:

1584 case ISD::EXPERIMENTAL_VECTOR_HISTOGRAM:

1585 return true;

1586 default:

1587 return N->isMemIntrinsic();

1588 }

1589 }

1590};

1591

1592

1594public:

1598 assert(((Opc != ISD::ATOMIC_LOAD && Opc != ISD::ATOMIC_STORE) ||

1599 MMO->isAtomic()) && "then why are we using an AtomicSDNode?");

1601 "Only atomic load uses ExtTy");

1603 }

1604

1606 assert(getOpcode() == ISD::ATOMIC_LOAD && "Only used for atomic loads.");

1608 }

1609

1616

1617

1618

1621 return Op == ISD::ATOMIC_CMP_SWAP ||

1622 Op == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS;

1623 }

1624

1625

1626

1629 return MMO->getFailureOrdering();

1630 }

1631

1632

1634 return N->getOpcode() == ISD::ATOMIC_CMP_SWAP ||

1635 N->getOpcode() == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS ||

1636 N->getOpcode() == ISD::ATOMIC_SWAP ||

1637 N->getOpcode() == ISD::ATOMIC_LOAD_ADD ||

1638 N->getOpcode() == ISD::ATOMIC_LOAD_SUB ||

1639 N->getOpcode() == ISD::ATOMIC_LOAD_AND ||

1640 N->getOpcode() == ISD::ATOMIC_LOAD_CLR ||

1641 N->getOpcode() == ISD::ATOMIC_LOAD_OR ||

1642 N->getOpcode() == ISD::ATOMIC_LOAD_XOR ||

1643 N->getOpcode() == ISD::ATOMIC_LOAD_NAND ||

1644 N->getOpcode() == ISD::ATOMIC_LOAD_MIN ||

1645 N->getOpcode() == ISD::ATOMIC_LOAD_MAX ||

1646 N->getOpcode() == ISD::ATOMIC_LOAD_UMIN ||

1647 N->getOpcode() == ISD::ATOMIC_LOAD_UMAX ||

1648 N->getOpcode() == ISD::ATOMIC_LOAD_FADD ||

1649 N->getOpcode() == ISD::ATOMIC_LOAD_FSUB ||

1650 N->getOpcode() == ISD::ATOMIC_LOAD_FMAX ||

1651 N->getOpcode() == ISD::ATOMIC_LOAD_FMIN ||

1652 N->getOpcode() == ISD::ATOMIC_LOAD_FMAXIMUM ||

1653 N->getOpcode() == ISD::ATOMIC_LOAD_FMINIMUM ||

1654 N->getOpcode() == ISD::ATOMIC_LOAD_UINC_WRAP ||

1655 N->getOpcode() == ISD::ATOMIC_LOAD_UDEC_WRAP ||

1656 N->getOpcode() == ISD::ATOMIC_LOAD_USUB_COND ||

1657 N->getOpcode() == ISD::ATOMIC_LOAD_USUB_SAT ||

1658 N->getOpcode() == ISD::ATOMIC_LOAD ||

1659 N->getOpcode() == ISD::ATOMIC_STORE;

1660 }

1661};

1662

1663

1664

1665

1666

1668public:

1674

1675

1677

1678

1679 return N->isMemIntrinsic();

1680 }

1681};

1682

1683

1684

1685

1686

1687

1688

1689

1690

1692

1693

1694 const int *Mask;

1695

1696protected:

1698

1700 const int *M)

1701 : SDNode(ISD::VECTOR_SHUFFLE, Order, dl, VTs), Mask(M) {}

1702

1703public:

1708

1710 assert(Idx < getValueType(0).getVectorNumElements() && "Idx out of range!");

1711 return Mask[Idx];

1712 }

1713

1715

1717

1719

1721 assert(isSplatMask(Mask) && "Cannot get splat index for non-splat!");

1722 for (int Elem : Mask)

1723 if (Elem >= 0)

1724 return Elem;

1725

1726

1727

1728 return 0;

1729 }

1730

1731

1732

1734 unsigned NumElems = Mask.size();

1735 for (unsigned i = 0; i != NumElems; ++i) {

1736 int idx = Mask[i];

1737 if (idx < 0)

1738 continue;

1739 else if (idx < (int)NumElems)

1740 Mask[i] = idx + NumElems;

1741 else

1742 Mask[i] = idx - NumElems;

1743 }

1744 }

1745

1749};

1750

1751class ConstantSDNode : public SDNode {

1753

1755

1759 VTs),

1760 Value(val) {

1763 }

1764

1765public:

1769 int64_t getSExtValue() const { return Value->getSExtValue(); }

1771 return Value->getLimitedValue(Limit);

1772 }

1775

1776 bool isOne() const { return Value->isOne(); }

1777 bool isZero() const { return Value->isZero(); }

1778 bool isAllOnes() const { return Value->isMinusOne(); }

1781

1783

1788};

1789

1793

1797

1801

1805

1806class ConstantFPSDNode : public SDNode {

1808

1810

1811 ConstantFPSDNode(bool isTarget, const ConstantFP *val, SDVTList VTs)

1814 Value(val) {

1816 }

1817

1818public:

1821

1822

1823 bool isZero() const { return Value->isZero(); }

1824

1825

1826 bool isNaN() const { return Value->isNaN(); }

1827

1828

1829 bool isInfinity() const { return Value->isInfinity(); }

1830

1831

1832 bool isNegative() const { return Value->isNegative(); }

1833

1834

1835

1836

1837

1838

1839

1840

1841

1843 return Value->getValueAPF().isExactlyValue(V);

1844 }

1846

1848

1853};

1854

1857 return CN->getAPIntValue();

1859 return CFPN->getValueAPF().bitcastToAPInt();

1860 return std::nullopt;

1861}

1862

1863

1865

1866

1868

1869

1871

1872

1874

1875

1877

1878

1880

1881

1882

1883

1885 unsigned OperandNo);

1886

1887

1888

1890

1891

1892

1894

1895

1896

1898

1899

1900

1901

1903 const APInt &DemandedElts);

1904

1905

1906

1908

1909

1910

1912

1913

1914

1915

1917 bool AllowUndefs);

1918

1919

1921 bool AllowUndefs = false,

1922 bool AllowTruncation = false);

1923

1924

1925

1927 const APInt &DemandedElts,

1928 bool AllowUndefs = false,

1929 bool AllowTruncation = false);

1930

1931

1933 bool AllowUndefs = false);

1934

1935

1936

1938 const APInt &DemandedElts,

1939 bool AllowUndefs = false);

1940

1941

1942

1943

1945

1946

1947

1948

1949

1951

1952

1953

1955

1956

1957

1958

1960

1961

1962

1963

1965

1966

1967

1968

1970

1971

1972

1974

1975

1979

1980class GlobalAddressSDNode : public SDNode {

1982

1984 int64_t Offset;

1985 unsigned TargetFlags;

1986

1987 GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL,

1989 unsigned TF)

1990 : SDNode(Opc, Order, DL, VTs), TheGlobal(GA), Offset(o), TargetFlags(TF) {

1991 }

1992

1993public:

1997

1999

2006};

2007

2008class DeactivationSymbolSDNode : public SDNode {

2010

2012

2014 : SDNode(ISD::DEACTIVATION_SYMBOL, 0, DebugLoc(), VTs), TheGlobal(GV) {}

2015

2016public:

2018

2022};

2023

2024class FrameIndexSDNode : public SDNode {

2026

2027 int FI;

2028

2029 FrameIndexSDNode(int fi, SDVTList VTs, bool isTarg)

2031 VTs),

2032 FI(fi) {}

2033

2034public:

2036

2041};

2042

2043

2044class LifetimeSDNode : public SDNode {

2046

2047 LifetimeSDNode(unsigned Opcode, unsigned Order, const DebugLoc &dl,

2049 : SDNode(Opcode, Order, dl, VTs) {}

2050

2051public:

2055

2056

2058 return N->getOpcode() == ISD::LIFETIME_START ||

2059 N->getOpcode() == ISD::LIFETIME_END;

2060 }

2061};

2062

2063

2064

2065

2066

2067class PseudoProbeSDNode : public SDNode {

2072

2073 PseudoProbeSDNode(unsigned Opcode, unsigned Order, const DebugLoc &Dl,

2075 : SDNode(Opcode, Order, Dl, VTs), Guid(Guid), Index(Index),

2076 Attributes(Attr) {}

2077

2078public:

2082

2083

2085 return N->getOpcode() == ISD::PSEUDO_PROBE;

2086 }

2087};

2088

2089class JumpTableSDNode : public SDNode {

2091

2092 int JTI;

2093 unsigned TargetFlags;

2094

2095 JumpTableSDNode(int jti, SDVTList VTs, bool isTarg, unsigned TF)

2097 VTs),

2098 JTI(jti), TargetFlags(TF) {}

2099

2100public:

2103

2108};

2109

2110class ConstantPoolSDNode : public SDNode {

2112

2113 union {

2116 } Val;

2117 int Offset;

2118 Align Alignment;

2119 unsigned TargetFlags;

2120

2122 Align Alignment, unsigned TF)

2125 Offset(o), Alignment(Alignment), TargetFlags(TF) {

2126 assert(Offset >= 0 && "Offset is too large");

2127 Val.ConstVal = c;

2128 }

2129

2130 ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, SDVTList VTs,

2131 int o, Align Alignment, unsigned TF)

2132 : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0,

2134 Offset(o), Alignment(Alignment), TargetFlags(TF) {

2135 assert(Offset >= 0 && "Offset is too large");

2136 Val.MachineCPVal = v;

2138 }

2139

2140public:

2142 return Offset < 0;

2143 }

2144

2147 return Val.ConstVal;

2148 }

2149

2152 return Val.MachineCPVal;

2153 }

2154

2156 return Offset & ~(1 << (sizeof(unsigned)*CHAR_BIT-1));

2157 }

2158

2159

2160

2163

2165

2170};

2171

2172

2175

2176 unsigned TargetFlags;

2177 int Index;

2178 int64_t Offset;

2179

2180public:

2182 : SDNode(ISD::TargetIndex, 0, DebugLoc(), VTs), TargetFlags(TF),

2183 Index(Idx), Offset(Ofs) {}

2184

2188

2192};

2193

2194class BasicBlockSDNode : public SDNode {

2196

2198

2199

2200

2201

2204 {}

2205

2206public:

2208

2212};

2213

2214

2216public:

2217

2219

2220

2221

2222

2223

2224

2225

2226

2227

2228

2230 unsigned &SplatBitSize, bool &HasAnyUndefs,

2231 unsigned MinSplatBits = 0,

2233

2234

2235

2236

2237

2238

2239

2241 BitVector *UndefElements = nullptr) const;

2242

2243

2244

2245

2246

2248

2249

2250

2251

2252

2253

2254

2255

2256

2257

2258

2259

2262 BitVector *UndefElements = nullptr) const;

2263

2264

2265

2266

2267

2268

2269

2270

2271

2272

2274 BitVector *UndefElements = nullptr) const;

2275

2276

2277

2278

2279

2280

2281

2284 BitVector *UndefElements = nullptr) const;

2285

2286

2287

2288

2289

2290

2293

2294

2295

2296

2297

2298

2299

2302 BitVector *UndefElements = nullptr) const;

2303

2304

2305

2306

2307

2308

2311

2312

2313

2314

2315

2316

2319

2320

2321

2322

2323

2325 unsigned DstEltSizeInBits,

2327 BitVector &UndefElements) const;

2328

2330

2331

2332

2333

2335

2336

2337

2338

2340 unsigned DstEltSizeInBits,

2344 const BitVector &SrcUndefElements);

2345

2349};

2350

2351

2352

2353

2354

2355class SrcValueSDNode : public SDNode {

2357

2359

2360

2361 explicit SrcValueSDNode(const Value *v)

2363

2364public:

2365

2367

2369 return N->getOpcode() == ISD::SRCVALUE;

2370 }

2371};

2372

2375

2377

2378 explicit MDNodeSDNode(const MDNode *md)

2380 {}

2381

2382public:

2384

2386 return N->getOpcode() == ISD::MDNODE_SDNODE;

2387 }

2388};

2389

2390class RegisterSDNode : public SDNode {

2392

2394

2397

2398public:

2400

2404};

2405

2406class RegisterMaskSDNode : public SDNode {

2408

2409

2411

2414 RegMask(mask) {}

2415

2416public:

2418

2422};

2423

2424class BlockAddressSDNode : public SDNode {

2426

2428 int64_t Offset;

2429 unsigned TargetFlags;

2430

2432 int64_t o, unsigned Flags)

2433 : SDNode(NodeTy, 0, DebugLoc(), VTs), BA(ba), Offset(o),

2434 TargetFlags(Flags) {}

2435

2436public:

2440

2445};

2446

2449

2451

2452 LabelSDNode(unsigned Opcode, unsigned Order, const DebugLoc &dl, MCSymbol *L)

2455 }

2456

2457public:

2459

2461 return N->getOpcode() == ISD::EH_LABEL ||

2462 N->getOpcode() == ISD::ANNOTATION_LABEL;

2463 }

2464};

2465

2466class ExternalSymbolSDNode : public SDNode {

2468

2469 const char *Symbol;

2470 unsigned TargetFlags;

2471

2472 ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned TF,

2474 : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, 0,

2476 Symbol(Sym), TargetFlags(TF) {}

2477

2478public:

2479 const char *getSymbol() const { return Symbol; }

2481

2486};

2487

2488class MCSymbolSDNode : public SDNode {

2490

2492

2495

2496public:

2498

2502};

2503

2504class CondCodeSDNode : public SDNode {

2506

2508

2511 Condition(Cond) {}

2512

2513public:

2515

2519};

2520

2521

2522

2525

2526 EVT ValueType;

2527

2528 explicit VTSDNode(EVT VT)

2530 ValueType(VT) {}

2531

2532public:

2534

2538};

2539

2540

2542public:

2546 : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {

2549 }

2550

2554

2555

2556

2560

2561

2563

2564

2566

2568 return N->getOpcode() == ISD::LOAD ||

2569 N->getOpcode() == ISD::STORE;

2570 }

2571};

2572

2573

2576

2577 LoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,

2582 assert(readMem() && "Load MachineMemOperand is not a load!");

2583 assert(writeMem() && "Load MachineMemOperand is a store!");

2584 }

2585

2586public:

2587

2588

2592

2595

2597 return N->getOpcode() == ISD::LOAD;

2598 }

2599};

2600

2601

2604

2605 StoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs,

2610 assert(readMem() && "Store MachineMemOperand is a load!");

2611 assert(writeMem() && "Store MachineMemOperand is not a store!");

2612 }

2613

2614public:

2615

2616

2617

2619

2623

2625 return N->getOpcode() == ISD::STORE;

2626 }

2627};

2628

2629

2630

2632public:

2634

2643

2644

2645

2646

2647

2648

2649

2653 ? 2

2654 : 3);

2655 }

2659 ? 1

2660 : 2);

2661 }

2664 default:

2666 case ISD::VP_LOAD:

2668 case ISD::VP_STORE:

2669 case ISD::EXPERIMENTAL_VP_STRIDED_LOAD:

2671 case ISD::EXPERIMENTAL_VP_STRIDED_STORE:

2673 }

2674 }

2677 default:

2679 case ISD::VP_LOAD:

2681 case ISD::VP_STORE:

2682 case ISD::EXPERIMENTAL_VP_STRIDED_LOAD:

2684 case ISD::EXPERIMENTAL_VP_STRIDED_STORE:

2686 }

2687 }

2688

2689

2690

2694

2695

2697

2698

2700

2702 return N->getOpcode() == ISD::EXPERIMENTAL_VP_STRIDED_LOAD ||

2703 N->getOpcode() == ISD::EXPERIMENTAL_VP_STRIDED_STORE ||

2704 N->getOpcode() == ISD::VP_LOAD || N->getOpcode() == ISD::VP_STORE;

2705 }

2706};

2707

2708

2710public:

2712

2720

2724

2729

2731 return N->getOpcode() == ISD::VP_LOAD;

2732 }

2734};

2735

2736

2738public:

2740

2745 AM, MemVT, MMO) {

2748 }

2749

2753

2759

2761 return N->getOpcode() == ISD::EXPERIMENTAL_VP_STRIDED_LOAD;

2762 }

2764};

2765

2766

2768public:

2770

2778

2779

2780

2781

2783

2784

2785

2786

2787

2789

2795

2797 return N->getOpcode() == ISD::VP_STORE;

2798 }

2799};

2800

2801

2803public:

2805

2810 VTs, AM, MemVT, MMO) {

2813 }

2814

2815

2816

2817

2819

2820

2821

2822

2823

2825

2832

2834 return N->getOpcode() == ISD::EXPERIMENTAL_VP_STRIDED_STORE;

2835 }

2836};

2837

2838

2840public:

2842

2847 : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {

2850 }

2851

2852

2853

2854

2861

2862

2863

2867

2868

2870

2871

2873

2875 return N->getOpcode() == ISD::MLOAD ||

2876 N->getOpcode() == ISD::MSTORE;

2877 }

2878};

2879

2880

2882public:

2884

2892

2896

2901

2903 return N->getOpcode() == ISD::MLOAD;

2904 }

2905

2907};

2908

2909

2911public:

2913

2921

2922

2923

2924

2926

2927

2928

2929

2930

2932

2937

2939 return N->getOpcode() == ISD::MSTORE;

2940 }

2941};

2942

2943

2944

2945

2947public:

2949

2953 : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {

2956 }

2957

2958

2966

2967

2968

2969

2970

2986

2988 return N->getOpcode() == ISD::VP_GATHER ||

2989 N->getOpcode() == ISD::VP_SCATTER;

2990 }

2991};

2992

2993

2994

2996public:

2998

3003

3005 return N->getOpcode() == ISD::VP_GATHER;

3006 }

3007};

3008

3009

3010

3012public:

3014

3019

3021

3023 return N->getOpcode() == ISD::VP_SCATTER;

3024 }

3025};

3026

3027

3028

3029

3031public:

3033

3037 : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {

3040 }

3041

3042

3050

3051

3052

3053

3054

3059

3061 return N->getOpcode() == ISD::MGATHER || N->getOpcode() == ISD::MSCATTER ||

3062 N->getOpcode() == ISD::EXPERIMENTAL_VECTOR_HISTOGRAM;

3063 }

3064};

3065

3066

3067

3069public:

3071

3079

3081

3085

3087 return N->getOpcode() == ISD::MGATHER;

3088 }

3089};

3090

3091

3092

3094public:

3096

3104

3105

3106

3107

3109

3111

3113 return N->getOpcode() == ISD::MSCATTER;

3114 }

3115};

3116

3118public:

3120

3125 VTs, MemVT, MMO, IndexType) {}

3126

3130

3137

3139 return N->getOpcode() == ISD::EXPERIMENTAL_VECTOR_HISTOGRAM;

3140 }

3141};

3142

3144public:

3146

3150

3154

3156 return N->getOpcode() == ISD::VP_LOAD_FF;

3157 }

3158};

3159

3161public:

3163

3166 : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {

3167 assert((NodeTy == ISD::GET_FPENV_MEM || NodeTy == ISD::SET_FPENV_MEM) &&

3168 "Expected FP state access node");

3169 }

3170

3172 return N->getOpcode() == ISD::GET_FPENV_MEM ||

3173 N->getOpcode() == ISD::SET_FPENV_MEM;

3174 }

3175};

3176

3177

3178

3179

3180

3181

3182

3183

3184class MachineSDNode : public SDNode {

3185private:

3187

3190

3191

3192

3193

3194

3195

3196

3197

3198

3199

3200

3201

3202

3203

3204

3206

3207

3208

3209

3210

3211 int NumMemRefs = 0;

3212

3213public:

3215

3217

3218 if (NumMemRefs == 0)

3219 return {};

3220 if (NumMemRefs == 1)

3221 return ArrayRef(MemRefs.getAddrOfPtr1(), 1);

3222

3223

3225 }

3229

3230

3232 MemRefs = nullptr;

3233 NumMemRefs = 0;

3234 }

3235

3237 return N->isMachineOpcode();

3238 }

3239};

3240

3241

3242

3244 Align Alignment;

3245

3246public:

3248 : SDNode(ISD::AssertAlign, Order, DL, VTs), Alignment(A) {}

3249

3251

3255};

3256

3257class SDNodeIterator {

3259 unsigned Operand;

3260

3261 SDNodeIterator(const SDNode *N, unsigned Op) : Node(N), Operand(Op) {}

3262

3263public:

3269

3271 return Operand == x.Operand;

3272 }

3274

3279

3281 ++Operand;

3282 return *this;

3283 }

3285 SDNodeIterator tmp = *this; ++*this; return tmp;

3286 }

3289 "Cannot compare iterators of two different nodes!");

3290 return Operand - Other.Operand;

3291 }

3292

3293 static SDNodeIterator begin(const SDNode *N) { return SDNodeIterator(N, 0); }

3295 return SDNodeIterator(N, N->getNumOperands());

3296 }

3297

3300};

3301

3316

3317

3318

3319

3320

3325

3326

3328

3329namespace ISD {

3330

3331

3337

3338

3343

3344

3347 return Ld && Ld->getExtensionType() == ISD::EXTLOAD;

3348 }

3349

3350

3353 return Ld && Ld->getExtensionType() == ISD::SEXTLOAD;

3354 }

3355

3356

3359 return Ld && Ld->getExtensionType() == ISD::ZEXTLOAD;

3360 }

3361

3362

3367

3368

3369

3372 return St && !St->isTruncatingStore() &&

3374 }

3375

3376

3381

3382

3383

3389

3390

3391

3394 return St && !St->isTruncatingStore() &&

3396 }

3397

3398

3399

3400

3401 template

3403 std::function<bool(ConstNodeType *)> Match,

3404 bool AllowUndefs = false,

3405 bool AllowTruncation = false);

3406

3407

3410 bool AllowUndefs = false,

3411 bool AllowTruncation = false) {

3413 AllowTruncation);

3414 }

3415

3416

3417 inline bool

3420 bool AllowUndefs = false) {

3422 }

3423

3424

3425

3426

3427

3431 bool AllowUndefs = false, bool AllowTypeMismatch = false);

3432

3433

3434

3436 unsigned Opc = Op.getOpcode();

3437 return (Op.getResNo() == 1 &&

3440 }

3441

3442}

3443

3444}

3445

3446#endif

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static msgpack::DocNode getNode(msgpack::DocNode DN, msgpack::Type Type, MCValue Val)

This file declares a class to represent arbitrary precision floating point values and provide a varie...

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

Atomic ordering constants.

This file implements the BitVector class.

#define LLVM_DECLARE_ENUM_AS_BITMASK(Enum, LargestValue)

LLVM_DECLARE_ENUM_AS_BITMASK can be used to declare an enum type as a bit set, so that bitwise operat...

static constexpr unsigned long long mask(BlockVerifier::State S)

static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")

static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")

static std::optional< bool > isBigEndian(const SmallDenseMap< int64_t, int64_t, 8 > &MemOffset2Idx, int64_t LowestIdx)

Given a map from byte offsets in memory to indices in a load/store, determine if that map corresponds...

This file contains the declarations for the subclasses of Constant, which represent the different fla...

This file defines a hash set that can be used to remove duplication of nodes in a graph.

This file defines the little GraphTraits template class that should be specialized by classes that...

const SmallVectorImpl< MachineOperand > & Cond

#define END_TWO_BYTE_PACK()

Definition SelectionDAGNodes.h:531

#define BEGIN_TWO_BYTE_PACK()

Definition SelectionDAGNodes.h:530

static cl::opt< unsigned > MaxSteps("has-predecessor-max-steps", cl::Hidden, cl::init(8192), cl::desc("DAG combiner limit number of steps when searching DAG " "for predecessor nodes"))

This file defines the SmallPtrSet class.

This file defines the SmallVector class.

static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")

Class for arbitrary precision integers.

unsigned getSrcAddressSpace() const

Definition SelectionDAGNodes.h:1399

AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, unsigned SrcAS, unsigned DestAS)

Definition SelectionDAGNodes.h:1394

unsigned getDestAddressSpace() const

Definition SelectionDAGNodes.h:1400

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1402

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

const_pointer const_iterator

Align getAlign() const

Definition SelectionDAGNodes.h:3250

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3252

AssertAlignSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, Align A)

Definition SelectionDAGNodes.h:3247

This is an SDNode representing atomic operations.

Definition SelectionDAGNodes.h:1593

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1633

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:1610

ISD::LoadExtType getExtensionType() const

Definition SelectionDAGNodes.h:1605

AtomicOrdering getFailureOrdering() const

For cmpxchg atomic operations, return the atomic ordering requirements when store does not occur.

Definition SelectionDAGNodes.h:1627

AtomicSDNode(unsigned Order, const DebugLoc &dl, unsigned Opc, SDVTList VTL, EVT MemVT, MachineMemOperand *MMO, ISD::LoadExtType ETy)

Definition SelectionDAGNodes.h:1595

bool isCompareAndSwap() const

Returns true if this SDNode represents cmpxchg atomic operation, false otherwise.

Definition SelectionDAGNodes.h:1619

const SDValue & getVal() const

Definition SelectionDAGNodes.h:1613

friend class SelectionDAG

Definition SelectionDAGNodes.h:2195

MachineBasicBlock * getBasicBlock() const

Definition SelectionDAGNodes.h:2207

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2209

LLVM Basic Block Representation.

friend class SelectionDAG

Definition SelectionDAGNodes.h:2425

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2441

int64_t getOffset() const

Definition SelectionDAGNodes.h:2438

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:2439

const BlockAddress * getBlockAddress() const

Definition SelectionDAGNodes.h:2437

The address of a basic block.

BuildVectorSDNode()=delete

LLVM_ABI bool getConstantRawBits(bool IsLittleEndian, unsigned DstEltSizeInBits, SmallVectorImpl< APInt > &RawBitElements, BitVector &UndefElements) const

Extract the raw bit data from a build vector of Undef, Constant or ConstantFP node elements.

static LLVM_ABI void recastRawBits(bool IsLittleEndian, unsigned DstEltSizeInBits, SmallVectorImpl< APInt > &DstBitElements, ArrayRef< APInt > SrcBitElements, BitVector &DstUndefElements, const BitVector &SrcUndefElements)

Recast bit data SrcBitElements to DstEltSizeInBits wide elements.

LLVM_ABI bool getRepeatedSequence(const APInt &DemandedElts, SmallVectorImpl< SDValue > &Sequence, BitVector *UndefElements=nullptr) const

Find the shortest repeating sequence of values in the build vector.

LLVM_ABI ConstantFPSDNode * getConstantFPSplatNode(const APInt &DemandedElts, BitVector *UndefElements=nullptr) const

Returns the demanded splatted constant FP or null if this is not a constant FP splat.

LLVM_ABI std::optional< std::pair< APInt, APInt > > isConstantSequence() const

If this BuildVector is constant and represents the numerical series "<a, a+n, a+2n,...

LLVM_ABI SDValue getSplatValue(const APInt &DemandedElts, BitVector *UndefElements=nullptr) const

Returns the demanded splatted value or a null value if this is not a splat.

LLVM_ABI bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef, unsigned &SplatBitSize, bool &HasAnyUndefs, unsigned MinSplatBits=0, bool isBigEndian=false) const

Check if this is a constant splat, and if so, find the smallest element size that splats the vector.

LLVM_ABI ConstantSDNode * getConstantSplatNode(const APInt &DemandedElts, BitVector *UndefElements=nullptr) const

Returns the demanded splatted constant or null if this is not a constant splat.

LLVM_ABI int32_t getConstantFPSplatPow2ToLog2Int(BitVector *UndefElements, uint32_t BitWidth) const

If this is a constant FP splat and the splatted constant FP is an exact power or 2,...

LLVM_ABI bool isConstant() const

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2346

ISD::CondCode get() const

Definition SelectionDAGNodes.h:2514

friend class SelectionDAG

Definition SelectionDAGNodes.h:2505

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2516

static LLVM_ABI bool isValueValidForType(EVT VT, const APFloat &Val)

const APFloat & getValueAPF() const

Definition SelectionDAGNodes.h:1819

friend class SelectionDAG

Definition SelectionDAGNodes.h:1807

bool isNaN() const

Return true if the value is a NaN.

Definition SelectionDAGNodes.h:1826

const ConstantFP * getConstantFPValue() const

Definition SelectionDAGNodes.h:1820

bool isExactlyValue(double V) const

We don't rely on operator== working on double values, as it returns true for things that are clearly ...

Definition SelectionDAGNodes.h:1842

bool isNegative() const

Return true if the value is negative.

Definition SelectionDAGNodes.h:1832

bool isInfinity() const

Return true if the value is an infinity.

Definition SelectionDAGNodes.h:1829

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1849

bool isZero() const

Return true if the value is positive or negative zero.

Definition SelectionDAGNodes.h:1823

ConstantFP - Floating Point Values [float, double].

This is the shared class of boolean and integer constants.

Align getAlign() const

Definition SelectionDAGNodes.h:2161

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2166

MachineConstantPoolValue * getMachineCPVal() const

Definition SelectionDAGNodes.h:2150

friend class SelectionDAG

Definition SelectionDAGNodes.h:2111

bool isMachineConstantPoolEntry() const

Definition SelectionDAGNodes.h:2141

const Constant * ConstVal

Definition SelectionDAGNodes.h:2114

int getOffset() const

Definition SelectionDAGNodes.h:2155

MachineConstantPoolValue * MachineCPVal

Definition SelectionDAGNodes.h:2115

const Constant * getConstVal() const

Definition SelectionDAGNodes.h:2145

LLVM_ABI Type * getType() const

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:2162

MaybeAlign getMaybeAlignValue() const

Definition SelectionDAGNodes.h:1773

bool isMinSignedValue() const

Definition SelectionDAGNodes.h:1780

uint64_t getLimitedValue(uint64_t Limit=UINT64_MAX)

Definition SelectionDAGNodes.h:1770

const ConstantInt * getConstantIntValue() const

Definition SelectionDAGNodes.h:1766

bool isOne() const

Definition SelectionDAGNodes.h:1776

bool isMaxSignedValue() const

Definition SelectionDAGNodes.h:1779

uint64_t getZExtValue() const

Definition SelectionDAGNodes.h:1768

friend class SelectionDAG

Definition SelectionDAGNodes.h:1752

Align getAlignValue() const

Definition SelectionDAGNodes.h:1774

const APInt & getAPIntValue() const

Definition SelectionDAGNodes.h:1767

int64_t getSExtValue() const

Definition SelectionDAGNodes.h:1769

bool isOpaque() const

Definition SelectionDAGNodes.h:1782

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1784

bool isZero() const

Definition SelectionDAGNodes.h:1777

bool isAllOnes() const

Definition SelectionDAGNodes.h:1778

This is an important base class in LLVM.

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2019

friend class SelectionDAG

Definition SelectionDAGNodes.h:2009

const GlobalValue * getGlobal() const

Definition SelectionDAGNodes.h:2017

friend class SelectionDAG

Definition SelectionDAGNodes.h:2467

const char * getSymbol() const

Definition SelectionDAGNodes.h:2479

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2482

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:2480

Utility class for floating point operations which can have information about relaxed accuracy require...

bool hasAllowReassoc() const

Test if this operation may be simplified with reassociative transforms.

bool hasNoNaNs() const

Test if this operation's arguments and results are assumed not-NaN.

bool hasAllowReciprocal() const

Test if this operation can use reciprocal multiply instead of division.

bool hasNoSignedZeros() const

Test if this operation can ignore the sign of zero.

bool hasAllowContract() const

Test if this operation can be floating-point contracted (FMA).

bool hasNoInfs() const

Test if this operation's arguments and results are assumed not-infinite.

bool hasApproxFunc() const

Test if this operation allows approximations of math library functions or intrinsics.

friend class SelectionDAG

Definition SelectionDAGNodes.h:3162

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3171

FPStateAccessSDNode(unsigned NodeTy, unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:3164

FoldingSetNodeID - This class is used to gather all the unique data bits of a node.

int getIndex() const

Definition SelectionDAGNodes.h:2035

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2037

friend class SelectionDAG

Definition SelectionDAGNodes.h:2025

int64_t getOffset() const

Definition SelectionDAGNodes.h:1995

friend class SelectionDAG

Definition SelectionDAGNodes.h:1981

LLVM_ABI unsigned getAddressSpace() const

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2000

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:1996

const GlobalValue * getGlobal() const

Definition SelectionDAGNodes.h:1994

HandleSDNode(SDValue X)

Definition SelectionDAGNodes.h:1368

const SDValue & getValue() const

Definition SelectionDAGNodes.h:1385

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2104

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:2102

friend class SelectionDAG

Definition SelectionDAGNodes.h:2090

int getIndex() const

Definition SelectionDAGNodes.h:2101

LSBaseSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2543

ISD::MemIndexedMode getAddressingMode() const

Return the addressing mode for this load or store: unindexed, pre-inc, pre-dec, post-inc,...

Definition SelectionDAGNodes.h:2557

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2551

bool isUnindexed() const

Return true if this is NOT a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2565

bool isIndexed() const

Return true if this is a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2562

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2567

MCSymbol * getLabel() const

Definition SelectionDAGNodes.h:2458

friend class SelectionDAG

Definition SelectionDAGNodes.h:2448

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2460

int64_t getFrameIndex() const

Definition SelectionDAGNodes.h:2052

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2057

friend class SelectionDAG

Definition SelectionDAGNodes.h:2045

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2593

friend class SelectionDAG

Definition SelectionDAGNodes.h:2575

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2594

ISD::LoadExtType getExtensionType() const

Return whether this is a plain node, or one of the varieties of value-extending loads.

Definition SelectionDAGNodes.h:2589

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2596

friend class SelectionDAG

Definition SelectionDAGNodes.h:2489

MCSymbol * getMCSymbol() const

Definition SelectionDAGNodes.h:2497

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2499

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2385

const MDNode * getMD() const

Definition SelectionDAGNodes.h:2383

friend class SelectionDAG

Definition SelectionDAGNodes.h:2374

Abstract base class for all machine specific constantpool value subclasses.

A description of a memory reference used in the backend.

const MDNode * getRanges() const

Return the range tag for the memory reference.

ArrayRef< MachineMemOperand * > memoperands() const

Definition SelectionDAGNodes.h:3216

bool memoperands_empty() const

Definition SelectionDAGNodes.h:3228

void clearMemRefs()

Clear out the memory reference descriptor list.

Definition SelectionDAGNodes.h:3231

friend class SelectionDAG

Definition SelectionDAGNodes.h:3186

mmo_iterator memoperands_begin() const

Definition SelectionDAGNodes.h:3226

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3236

ArrayRef< MachineMemOperand * >::const_iterator mmo_iterator

Definition SelectionDAGNodes.h:3214

mmo_iterator memoperands_end() const

Definition SelectionDAGNodes.h:3227

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3086

MaskedGatherSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType, ISD::LoadExtType ETy)

Definition SelectionDAGNodes.h:3072

friend class SelectionDAG

Definition SelectionDAGNodes.h:3070

const SDValue & getPassThru() const

Definition SelectionDAGNodes.h:3080

ISD::LoadExtType getExtensionType() const

Definition SelectionDAGNodes.h:3082

const SDValue & getIndex() const

Definition SelectionDAGNodes.h:3056

bool isIndexScaled() const

Definition SelectionDAGNodes.h:3046

const SDValue & getScale() const

Definition SelectionDAGNodes.h:3058

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3060

friend class SelectionDAG

Definition SelectionDAGNodes.h:3032

MaskedGatherScatterSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

Definition SelectionDAGNodes.h:3034

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:3055

const SDValue & getMask() const

Definition SelectionDAGNodes.h:3057

bool isIndexSigned() const

Definition SelectionDAGNodes.h:3049

ISD::MemIndexType getIndexType() const

How is Index applied to BasePtr when computing addresses.

Definition SelectionDAGNodes.h:3043

const SDValue & getInc() const

Definition SelectionDAGNodes.h:3135

MaskedHistogramSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

Definition SelectionDAGNodes.h:3121

const SDValue & getScale() const

Definition SelectionDAGNodes.h:3134

friend class SelectionDAG

Definition SelectionDAGNodes.h:3119

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3138

const SDValue & getMask() const

Definition SelectionDAGNodes.h:3133

const SDValue & getIntID() const

Definition SelectionDAGNodes.h:3136

const SDValue & getIndex() const

Definition SelectionDAGNodes.h:3132

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:3131

ISD::MemIndexType getIndexType() const

Definition SelectionDAGNodes.h:3127

MaskedLoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, ISD::LoadExtType ETy, bool IsExpanding, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2885

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2897

bool isExpandingLoad() const

Definition SelectionDAGNodes.h:2906

ISD::LoadExtType getExtensionType() const

Definition SelectionDAGNodes.h:2893

friend class SelectionDAG

Definition SelectionDAGNodes.h:2883

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2899

const SDValue & getPassThru() const

Definition SelectionDAGNodes.h:2900

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2902

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2898

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2858

MaskedLoadStoreSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2843

bool isIndexed() const

Return true if this is a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2869

friend class SelectionDAG

Definition SelectionDAGNodes.h:2841

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2874

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2855

bool isUnindexed() const

Return true if this is NOT a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2872

ISD::MemIndexedMode getAddressingMode() const

Return the addressing mode for this load or store: unindexed, pre-inc, pre-dec, post-inc,...

Definition SelectionDAGNodes.h:2864

MaskedScatterSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType, bool IsTrunc)

Definition SelectionDAGNodes.h:3097

const SDValue & getValue() const

Definition SelectionDAGNodes.h:3110

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3112

friend class SelectionDAG

Definition SelectionDAGNodes.h:3095

bool isTruncatingStore() const

Return true if the op does a truncation before store.

Definition SelectionDAGNodes.h:3108

bool isCompressingStore() const

Returns true if the op does a compression to the vector before storing.

Definition SelectionDAGNodes.h:2931

MaskedStoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, bool isTrunc, bool isCompressing, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2914

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2935

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2934

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2936

const SDValue & getValue() const

Definition SelectionDAGNodes.h:2933

bool isTruncatingStore() const

Return true if the op does a truncation before store.

Definition SelectionDAGNodes.h:2925

friend class SelectionDAG

Definition SelectionDAGNodes.h:2912

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2938

MemIntrinsicSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemoryVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:1669

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1676

LLVM_ABI MemSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT memvt, MachineMemOperand *MMO)

MachineMemOperand * MMO

Memory reference information.

Definition SelectionDAGNodes.h:1415

unsigned getAddressSpace() const

Return the address space for the associated pointer.

Definition SelectionDAGNodes.h:1499

Align getBaseAlign() const

Returns alignment and volatility of the memory access.

Definition SelectionDAGNodes.h:1425

const MDNode * getRanges() const

Returns the Ranges that describes the dereference.

Definition SelectionDAGNodes.h:1459

void refineRanges(const MachineMemOperand *NewMMO)

Definition SelectionDAGNodes.h:1511

Align getAlign() const

Definition SelectionDAGNodes.h:1426

bool isVolatile() const

Definition SelectionDAGNodes.h:1447

AAMDNodes getAAInfo() const

Returns the AA info that describes the dereference.

Definition SelectionDAGNodes.h:1456

SyncScope::ID getSyncScopeID() const

Returns the synchronization scope ID for this memory operation.

Definition SelectionDAGNodes.h:1462

int64_t getSrcValueOffset() const

Definition SelectionDAGNodes.h:1453

bool readMem() const

Definition SelectionDAGNodes.h:1421

bool isSimple() const

Returns true if the memory operation is neither atomic or volatile.

Definition SelectionDAGNodes.h:1485

AtomicOrdering getSuccessOrdering() const

Return the atomic ordering requirements for this memory operation.

Definition SelectionDAGNodes.h:1467

MachineMemOperand * getMemOperand() const

Return a MachineMemOperand object describing the memory reference performed by operation.

Definition SelectionDAGNodes.h:1492

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:1521

void refineAlignment(const MachineMemOperand *NewMMO)

Update this MemSDNode's MachineMemOperand information to reflect the alignment of NewMMO,...

Definition SelectionDAGNodes.h:1507

const MachinePointerInfo & getPointerInfo() const

Definition SelectionDAGNodes.h:1494

AtomicOrdering getMergedOrdering() const

Return a single atomic ordering that is at least as strong as both the success and failure orderings ...

Definition SelectionDAGNodes.h:1474

const SDValue & getChain() const

Definition SelectionDAGNodes.h:1519

bool isNonTemporal() const

Definition SelectionDAGNodes.h:1448

bool isInvariant() const

Definition SelectionDAGNodes.h:1450

bool writeMem() const

Definition SelectionDAGNodes.h:1422

bool isDereferenceable() const

Definition SelectionDAGNodes.h:1449

bool isUnordered() const

Returns true if the memory operation doesn't imply any ordering constraints on surrounding memory ope...

Definition SelectionDAGNodes.h:1482

bool isAtomic() const

Return true if the memory operation ordering is Unordered or higher.

Definition SelectionDAGNodes.h:1477

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1540

unsigned getRawSubclassData() const

Return the SubclassData value, without HasDebugValue.

Definition SelectionDAGNodes.h:1434

EVT getMemoryVT() const

Return the type of the in-memory value.

Definition SelectionDAGNodes.h:1488

MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...

A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...

This SDNode is used for PSEUDO_PROBE values, which are the function guid and the index of the basic b...

Definition SelectionDAGNodes.h:2067

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2084

uint64_t getGuid() const

Definition SelectionDAGNodes.h:2079

friend class SelectionDAG

Definition SelectionDAGNodes.h:2068

uint32_t getAttributes() const

Definition SelectionDAGNodes.h:2081

uint64_t getIndex() const

Definition SelectionDAGNodes.h:2080

const uint32_t * getRegMask() const

Definition SelectionDAGNodes.h:2417

friend class SelectionDAG

Definition SelectionDAGNodes.h:2407

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2419

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2401

friend class SelectionDAG

Definition SelectionDAGNodes.h:2391

Register getReg() const

Definition SelectionDAGNodes.h:2399

Wrapper class representing virtual and physical registers.

const DebugLoc & getDebugLoc() const

Definition SelectionDAGNodes.h:1252

unsigned getIROrder() const

Definition SelectionDAGNodes.h:1251

SDLoc(const SDValue V)

Definition SelectionDAGNodes.h:1244

SDLoc(const SDNode *N)

Definition SelectionDAGNodes.h:1243

SDLoc(const Instruction *I, int Order)

Definition SelectionDAGNodes.h:1245

pointer operator->() const

Definition SelectionDAGNodes.h:3278

value_type & reference

Definition SelectionDAGNodes.h:3268

static SDNodeIterator end(const SDNode *N)

Definition SelectionDAGNodes.h:3294

size_t operator-(SDNodeIterator Other) const

Definition SelectionDAGNodes.h:3287

SDNodeIterator operator++(int)

Definition SelectionDAGNodes.h:3284

value_type * pointer

Definition SelectionDAGNodes.h:3267

std::ptrdiff_t difference_type

Definition SelectionDAGNodes.h:3266

std::forward_iterator_tag iterator_category

Definition SelectionDAGNodes.h:3264

unsigned getOperand() const

Definition SelectionDAGNodes.h:3298

pointer operator*() const

Definition SelectionDAGNodes.h:3275

SDNodeIterator & operator++()

Definition SelectionDAGNodes.h:3280

bool operator==(const SDNodeIterator &x) const

Definition SelectionDAGNodes.h:3270

SDNode value_type

Definition SelectionDAGNodes.h:3265

const SDNode * getNode() const

Definition SelectionDAGNodes.h:3299

static SDNodeIterator begin(const SDNode *N)

Definition SelectionDAGNodes.h:3293

bool operator!=(const SDNodeIterator &x) const

Definition SelectionDAGNodes.h:3273

friend class ConstantSDNode

Definition SelectionDAGNodes.h:548

friend class MaskedLoadStoreSDNode

Definition SelectionDAGNodes.h:572

friend class LSBaseSDNode

Definition SelectionDAGNodes.h:570

friend class VPGatherScatterSDNode

Definition SelectionDAGNodes.h:574

friend class MaskedGatherScatterSDNode

Definition SelectionDAGNodes.h:573

friend class MaskedHistogramSDNode

Definition SelectionDAGNodes.h:575

friend class VPBaseLoadStoreSDNode

Definition SelectionDAGNodes.h:571

friend class LoadSDNode

Definition SelectionDAGNodes.h:592

friend class MaskedGatherSDNode

Definition SelectionDAGNodes.h:597

friend class VPStridedLoadSDNode

Definition SelectionDAGNodes.h:595

friend class VPGatherSDNode

Definition SelectionDAGNodes.h:598

friend class MaskedLoadSDNode

Definition SelectionDAGNodes.h:596

friend class MaskedHistogramSDNode

Definition SelectionDAGNodes.h:599

friend class VPLoadSDNode

Definition SelectionDAGNodes.h:594

friend class AtomicSDNode

Definition SelectionDAGNodes.h:593

friend class MemSDNode

Definition SelectionDAGNodes.h:556

friend class MemIntrinsicSDNode

Definition SelectionDAGNodes.h:557

friend class AtomicSDNode

Definition SelectionDAGNodes.h:558

friend class SDNode

Definition SelectionDAGNodes.h:536

friend class SelectionDAG

Definition SelectionDAGNodes.h:539

friend class MemSDNode

Definition SelectionDAGNodes.h:538

friend class MemIntrinsicSDNode

Definition SelectionDAGNodes.h:537

friend class MaskedScatterSDNode

Definition SelectionDAGNodes.h:612

friend class StoreSDNode

Definition SelectionDAGNodes.h:608

friend class VPScatterSDNode

Definition SelectionDAGNodes.h:613

friend class VPStoreSDNode

Definition SelectionDAGNodes.h:609

friend class MaskedStoreSDNode

Definition SelectionDAGNodes.h:611

friend class VPStridedStoreSDNode

Definition SelectionDAGNodes.h:610

This class provides iterator support for SDUse operands that use a specific SDNode.

Definition SelectionDAGNodes.h:808

bool operator!=(const use_iterator &x) const

Definition SelectionDAGNodes.h:827

use_iterator & operator=(const use_iterator &)=default

use_iterator & operator++()

Definition SelectionDAGNodes.h:832

friend class SDNode

Definition SelectionDAGNodes.h:809

std::ptrdiff_t difference_type

Definition SelectionDAGNodes.h:818

std::forward_iterator_tag iterator_category

Definition SelectionDAGNodes.h:816

bool operator==(const use_iterator &x) const

Definition SelectionDAGNodes.h:826

SDUse & operator*() const

Retrieve a pointer to the current user node.

Definition SelectionDAGNodes.h:843

value_type & reference

Definition SelectionDAGNodes.h:820

SDUse value_type

Definition SelectionDAGNodes.h:817

use_iterator(const use_iterator &I)=default

value_type * pointer

Definition SelectionDAGNodes.h:819

SDUse * operator->() const

Definition SelectionDAGNodes.h:848

use_iterator operator++(int)

Definition SelectionDAGNodes.h:838

std::ptrdiff_t difference_type

Definition SelectionDAGNodes.h:860

user_iterator & operator++()

Definition SelectionDAGNodes.h:869

friend class SDNode

Definition SelectionDAGNodes.h:852

std::forward_iterator_tag iterator_category

Definition SelectionDAGNodes.h:858

SDUse & getUse() const

Definition SelectionDAGNodes.h:885

bool operator!=(const user_iterator &x) const

Definition SelectionDAGNodes.h:867

SDNode * operator->() const

Definition SelectionDAGNodes.h:883

value_type & reference

Definition SelectionDAGNodes.h:862

bool operator==(const user_iterator &x) const

Definition SelectionDAGNodes.h:866

user_iterator operator++(int)

Definition SelectionDAGNodes.h:874

SDNode * operator*() const

Definition SelectionDAGNodes.h:881

value_type * pointer

Definition SelectionDAGNodes.h:861

SDNode * value_type

Definition SelectionDAGNodes.h:859

Represents one node in the SelectionDAG.

Definition SelectionDAGNodes.h:512

void setDebugLoc(DebugLoc dl)

Set source location info.

Definition SelectionDAGNodes.h:804

uint32_t getCFIType() const

Definition SelectionDAGNodes.h:1109

void setIROrder(unsigned Order)

Set the node ordering.

Definition SelectionDAGNodes.h:797

bool isStrictFPOpcode()

Test if this node is a strict floating point pseudo-op.

Definition SelectionDAGNodes.h:723

ArrayRef< SDUse > ops() const

Definition SelectionDAGNodes.h:1054

char RawSDNodeBits[sizeof(uint16_t)]

Definition SelectionDAGNodes.h:622

const APInt & getAsAPIntVal() const

Helper method returns the APInt value of a ConstantSDNode.

Definition SelectionDAGNodes.h:1802

bool isMachineOpcode() const

Test if this node has a post-isel opcode, directly corresponding to a MachineInstr opcode.

Definition SelectionDAGNodes.h:756

LLVM_ABI void dumprFull(const SelectionDAG *G=nullptr) const

printrFull to dbgs().

int getNodeId() const

Return the unique node id.

Definition SelectionDAGNodes.h:782

LLVM_ABI void dump() const

Dump this node, for debugging.

iterator_range< value_iterator > values() const

Definition SelectionDAGNodes.h:1138

iterator_range< use_iterator > uses() const

Definition SelectionDAGNodes.h:898

unsigned getOpcode() const

Return the SelectionDAG opcode value for this node.

Definition SelectionDAGNodes.h:703

@ NumSDNodeBits

Definition SelectionDAGNodes.h:545

SDNode * getGluedUser() const

If this node has a glue value with a user, return the user (there is at most one).

Definition SelectionDAGNodes.h:1089

bool isDivergent() const

Definition SelectionDAGNodes.h:769

bool hasOneUse() const

Return true if there is exactly one use of this node.

Definition SelectionDAGNodes.h:775

LLVM_ABI bool isOnlyUserOf(const SDNode *N) const

Return true if this node is the only use of N.

static LLVM_ABI const char * getIndexedModeName(ISD::MemIndexedMode AM)

iterator_range< value_op_iterator > op_values() const

Definition SelectionDAGNodes.h:1068

unsigned getIROrder() const

Return the node ordering.

Definition SelectionDAGNodes.h:794

LoadSDNodeBitfields LoadSDNodeBits

Definition SelectionDAGNodes.h:627

void dropFlags(unsigned Mask)

Definition SelectionDAGNodes.h:1098

static constexpr size_t getMaxNumOperands()

Return the maximum number of operands that a SDNode can hold.

Definition SelectionDAGNodes.h:1027

int getCombinerWorklistIndex() const

Get worklist index for DAGCombiner.

Definition SelectionDAGNodes.h:788

value_iterator value_end() const

Definition SelectionDAGNodes.h:1137

void setHasDebugValue(bool b)

Definition SelectionDAGNodes.h:767

LSBaseSDNodeBitfields LSBaseSDNodeBits

Definition SelectionDAGNodes.h:626

SDUse * op_iterator

Definition SelectionDAGNodes.h:1050

iterator_range< use_iterator > uses()

Definition SelectionDAGNodes.h:895

MemSDNodeBitfields MemSDNodeBits

Definition SelectionDAGNodes.h:625

bool getHasDebugValue() const

Definition SelectionDAGNodes.h:766

LLVM_ABI void dumpr() const

Dump (recursively) this node and its use-def subgraph.

SDNodeFlags getFlags() const

Definition SelectionDAGNodes.h:1096

void setNodeId(int Id)

Set unique node id.

Definition SelectionDAGNodes.h:785

LLVM_ABI std::string getOperationName(const SelectionDAG *G=nullptr) const

Return the opcode of this operation for printing.

LLVM_ABI void printrFull(raw_ostream &O, const SelectionDAG *G=nullptr) const

Print a SelectionDAG node and all children down to the leaves.

size_t use_size() const

Return the number of uses of this node.

Definition SelectionDAGNodes.h:779

friend class SelectionDAG

Definition SelectionDAGNodes.h:653

LLVM_ABI void intersectFlagsWith(const SDNodeFlags Flags)

Clear any flags in this node that aren't also set in Flags.

LLVM_ABI void printr(raw_ostream &OS, const SelectionDAG *G=nullptr) const

const EVT * value_iterator

Definition SelectionDAGNodes.h:1134

StoreSDNodeBitfields StoreSDNodeBits

Definition SelectionDAGNodes.h:628

static SDVTList getSDVTList(MVT VT)

Definition SelectionDAGNodes.h:1205

@ NumLSBaseSDNodeBits

Definition SelectionDAGNodes.h:589

TypeSize getValueSizeInBits(unsigned ResNo) const

Returns MVT::getSizeInBits(getValueType(ResNo)).

Definition SelectionDAGNodes.h:1130

MVT getSimpleValueType(unsigned ResNo) const

Return the type of a specified result as a simple type.

Definition SelectionDAGNodes.h:1121

static bool hasPredecessorHelper(const SDNode *N, SmallPtrSetImpl< const SDNode * > &Visited, SmallVectorImpl< const SDNode * > &Worklist, unsigned int MaxSteps=0, bool TopologicalPrune=false)

Returns true if N is a predecessor of any node in Worklist.

Definition SelectionDAGNodes.h:964

uint64_t getAsZExtVal() const

Helper method returns the zero-extended integer value of a ConstantSDNode.

Definition SelectionDAGNodes.h:1794

bool use_empty() const

Return true if there are no uses of this node.

Definition SelectionDAGNodes.h:772

unsigned getNumValues() const

Return the number of values defined/returned by this operator.

Definition SelectionDAGNodes.h:1112

unsigned getNumOperands() const

Return the number of values used by this operation.

Definition SelectionDAGNodes.h:1024

unsigned getMachineOpcode() const

This may only be called if isMachineOpcode returns true.

Definition SelectionDAGNodes.h:761

SDVTList getVTList() const

Definition SelectionDAGNodes.h:1073

const SDValue & getOperand(unsigned Num) const

Definition SelectionDAGNodes.h:1045

bool isMemIntrinsic() const

Test if this node is a memory intrinsic (with valid pointer information).

Definition SelectionDAGNodes.h:720

void setCombinerWorklistIndex(int Index)

Set worklist index for DAGCombiner.

Definition SelectionDAGNodes.h:791

uint64_t getConstantOperandVal(unsigned Num) const

Helper method returns the integer value of a ConstantSDNode operand.

Definition SelectionDAGNodes.h:1790

static LLVM_ABI bool areOnlyUsersOf(ArrayRef< const SDNode * > Nodes, const SDNode *N)

Return true if all the users of N are contained in Nodes.

bool hasNUsesOfValue(unsigned NUses, unsigned Value) const

Return true if there are exactly NUSES uses of the indicated value.

Definition SelectionDAGNodes.h:916

use_iterator use_begin() const

Provide iteration support to walk over all uses of an SDNode.

Definition SelectionDAGNodes.h:889

LLVM_ABI bool isOperandOf(const SDNode *N) const

Return true if this node is an operand of N.

LLVM_ABI void print(raw_ostream &OS, const SelectionDAG *G=nullptr) const

const DebugLoc & getDebugLoc() const

Return the source location info.

Definition SelectionDAGNodes.h:800

friend class HandleSDNode

Definition SelectionDAGNodes.h:655

LLVM_ABI void printrWithDepth(raw_ostream &O, const SelectionDAG *G=nullptr, unsigned depth=100) const

Print a SelectionDAG node and children up to depth "depth." The given SelectionDAG allows target-spec...

const APInt & getConstantOperandAPInt(unsigned Num) const

Helper method returns the APInt of a ConstantSDNode operand.

Definition SelectionDAGNodes.h:1798

uint16_t PersistentId

Unique and persistent id per SDNode in the DAG.

Definition SelectionDAGNodes.h:650

std::optional< APInt > bitcastToAPInt() const

Definition SelectionDAGNodes.h:1855

LLVM_ABI void dumprWithDepth(const SelectionDAG *G=nullptr, unsigned depth=100) const

printrWithDepth to dbgs().

static user_iterator user_end()

Definition SelectionDAGNodes.h:905

bool isPredecessorOf(const SDNode *N) const

Return true if this node is a predecessor of N.

Definition SelectionDAGNodes.h:945

LLVM_ABI bool hasPredecessor(const SDNode *N) const

Return true if N is a predecessor of this node.

void addUse(SDUse &U)

This method should only be used by the SDUse class.

Definition SelectionDAGNodes.h:1202

LLVM_ABI bool hasAnyUseOfValue(unsigned Value) const

Return true if there are any use of the indicated value.

EVT getValueType(unsigned ResNo) const

Return the type of a specified result.

Definition SelectionDAGNodes.h:1115

LLVM_ABI void print_details(raw_ostream &OS, const SelectionDAG *G) const

void setCFIType(uint32_t Type)

Definition SelectionDAGNodes.h:1108

bool isUndef() const

Returns true if the node type is UNDEF or POISON.

Definition SelectionDAGNodes.h:710

LLVM_ABI void print_types(raw_ostream &OS, const SelectionDAG *G) const

iterator_range< user_iterator > users()

Definition SelectionDAGNodes.h:907

iterator_range< user_iterator > users() const

Definition SelectionDAGNodes.h:910

bool isVPOpcode() const

Test if this node is a vector predication operation.

Definition SelectionDAGNodes.h:752

bool hasPoisonGeneratingFlags() const

Definition SelectionDAGNodes.h:1104

void setFlags(SDNodeFlags NewFlags)

Definition SelectionDAGNodes.h:1097

user_iterator user_begin() const

Provide iteration support to walk over all users of an SDNode.

Definition SelectionDAGNodes.h:903

SDNode * getGluedNode() const

If this node has a glue operand, return the node to which the glue operand points.

Definition SelectionDAGNodes.h:1080

bool isTargetOpcode() const

Test if this node has a target-specific opcode (in the ISD namespace).

Definition SelectionDAGNodes.h:707

op_iterator op_end() const

Definition SelectionDAGNodes.h:1053

ConstantSDNodeBitfields ConstantSDNodeBits

Definition SelectionDAGNodes.h:624

bool isAnyAdd() const

Returns true if the node type is ADD or PTRADD.

Definition SelectionDAGNodes.h:715

value_iterator value_begin() const

Definition SelectionDAGNodes.h:1136

bool isAssert() const

Test if this node is an assert operation.

Definition SelectionDAGNodes.h:739

op_iterator op_begin() const

Definition SelectionDAGNodes.h:1052

static use_iterator use_end()

Definition SelectionDAGNodes.h:893

LLVM_ABI void DropOperands()

Release the operands and set this node to have zero operands.

@ NumMemSDNodeBits

Definition SelectionDAGNodes.h:567

SDNode(unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs)

Create an SDNode.

Definition SelectionDAGNodes.h:1214

SDNodeBitfields SDNodeBits

Definition SelectionDAGNodes.h:623

Represents a use of a SDNode.

Definition SelectionDAGNodes.h:286

const SDNode * getUser() const

Definition SelectionDAGNodes.h:310

SDUse & operator=(const SDUse &)=delete

EVT getValueType() const

Convenience function for get().getValueType().

Definition SelectionDAGNodes.h:323

friend class SDNode

Definition SelectionDAGNodes.h:342

const SDValue & get() const

If implicit conversion to SDValue doesn't work, the get() method returns the SDValue.

Definition SelectionDAGNodes.h:306

SDUse * getNext() const

Get the next SDUse in the use list.

Definition SelectionDAGNodes.h:313

SDNode * getNode() const

Convenience function for get().getNode().

Definition SelectionDAGNodes.h:319

friend class SelectionDAG

Definition SelectionDAGNodes.h:341

bool operator!=(const SDValue &V) const

Convenience function for get().operator!=.

Definition SelectionDAGNodes.h:331

SDUse(const SDUse &U)=delete

friend class HandleSDNode

Definition SelectionDAGNodes.h:344

unsigned getResNo() const

Convenience function for get().getResNo().

Definition SelectionDAGNodes.h:321

bool operator==(const SDValue &V) const

Convenience function for get().operator==.

Definition SelectionDAGNodes.h:326

unsigned getOperandNo() const

Return the operand # of this use in its user.

Definition SelectionDAGNodes.h:1338

bool operator<(const SDValue &V) const

Convenience function for get().operator<.

Definition SelectionDAGNodes.h:336

SDNode * getUser()

This returns the SDNode that contains this Use.

Definition SelectionDAGNodes.h:309

Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation.

Definition SelectionDAGNodes.h:147

bool isUndef() const

Definition SelectionDAGNodes.h:1303

SDNode * getNode() const

get the SDNode which holds the desired result

Definition SelectionDAGNodes.h:161

bool hasOneUse() const

Return true if there is exactly one node using value ResNo of Node.

Definition SelectionDAGNodes.h:1313

LLVM_ABI bool isOperandOf(const SDNode *N) const

Return true if the referenced return value is an operand of N.

LLVM_ABI bool reachesChainWithoutSideEffects(SDValue Dest, unsigned Depth=2) const

Return true if this operand (which must be a chain) reaches the specified operand without crossing an...

bool operator!=(const SDValue &O) const

Definition SelectionDAGNodes.h:171

SDValue getValue(unsigned R) const

Definition SelectionDAGNodes.h:181

void dump() const

Definition SelectionDAGNodes.h:1321

EVT getValueType() const

Return the ValueType of the referenced return value.

Definition SelectionDAGNodes.h:1271

bool isTargetOpcode() const

Definition SelectionDAGNodes.h:1291

bool isMachineOpcode() const

Definition SelectionDAGNodes.h:1295

bool isAnyAdd() const

Definition SelectionDAGNodes.h:1307

TypeSize getValueSizeInBits() const

Returns the size of the value in bits.

Definition SelectionDAGNodes.h:201

const DebugLoc & getDebugLoc() const

Definition SelectionDAGNodes.h:1317

SDNode * operator->() const

Definition SelectionDAGNodes.h:166

bool operator==(const SDValue &O) const

Definition SelectionDAGNodes.h:168

const SDValue & getOperand(unsigned i) const

Definition SelectionDAGNodes.h:1279

bool use_empty() const

Return true if there are no nodes using value ResNo of Node.

Definition SelectionDAGNodes.h:1309

bool operator<(const SDValue &O) const

Definition SelectionDAGNodes.h:174

const APInt & getConstantOperandAPInt(unsigned i) const

Definition SelectionDAGNodes.h:1287

uint64_t getScalarValueSizeInBits() const

Definition SelectionDAGNodes.h:205

unsigned getResNo() const

get the index which selects a specific result in the SDNode

Definition SelectionDAGNodes.h:158

uint64_t getConstantOperandVal(unsigned i) const

Definition SelectionDAGNodes.h:1283

MVT getSimpleValueType() const

Return the simple ValueType of the referenced return value.

Definition SelectionDAGNodes.h:192

void setNode(SDNode *N)

set the SDNode

Definition SelectionDAGNodes.h:164

unsigned getMachineOpcode() const

Definition SelectionDAGNodes.h:1299

unsigned getOpcode() const

Definition SelectionDAGNodes.h:1267

void dumpr() const

Definition SelectionDAGNodes.h:1329

unsigned getNumOperands() const

Definition SelectionDAGNodes.h:1275

This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...

int getMaskElt(unsigned Idx) const

Definition SelectionDAGNodes.h:1709

static int getSplatMaskIndex(ArrayRef< int > Mask)

Definition SelectionDAGNodes.h:1720

friend class SelectionDAG

Definition SelectionDAGNodes.h:1697

int getSplatIndex() const

Definition SelectionDAGNodes.h:1716

ShuffleVectorSDNode(SDVTList VTs, unsigned Order, const DebugLoc &dl, const int *M)

Definition SelectionDAGNodes.h:1699

ArrayRef< int > getMask() const

Definition SelectionDAGNodes.h:1704

static void commuteMask(MutableArrayRef< int > Mask)

Change values in a shuffle permute mask assuming the two vector operands have swapped position.

Definition SelectionDAGNodes.h:1733

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:1746

bool isSplat() const

Definition SelectionDAGNodes.h:1714

static LLVM_ABI bool isSplatMask(ArrayRef< int > Mask)

A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...

size_type count(ConstPtrType Ptr) const

count - Return 1 if the specified pointer is in the set, 0 otherwise.

std::pair< iterator, bool > insert(PtrType Ptr)

Inserts Ptr if and only if there is no element in the container equal to Ptr.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

void append(ItTy in_start, ItTy in_end)

Add the specified range to the end of the SmallVector.

void push_back(const T &Elt)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

const Value * getValue() const

Return the contained Value.

Definition SelectionDAGNodes.h:2366

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2368

friend class SelectionDAG

Definition SelectionDAGNodes.h:2356

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2621

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2622

const SDValue & getValue() const

Definition SelectionDAGNodes.h:2620

friend class SelectionDAG

Definition SelectionDAGNodes.h:2603

bool isTruncatingStore() const

Return true if the op does a truncation before store.

Definition SelectionDAGNodes.h:2618

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2624

Completely target-dependent object reference.

Definition SelectionDAGNodes.h:2173

TargetIndexSDNode(int Idx, SDVTList VTs, int64_t Ofs, unsigned TF)

Definition SelectionDAGNodes.h:2181

int getIndex() const

Definition SelectionDAGNodes.h:2186

friend class SelectionDAG

Definition SelectionDAGNodes.h:2174

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2189

int64_t getOffset() const

Definition SelectionDAGNodes.h:2187

unsigned getTargetFlags() const

Definition SelectionDAGNodes.h:2185

The instances of the Type class are immutable: once they are created, they are never changed.

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2662

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2701

friend class SelectionDAG

Definition SelectionDAGNodes.h:2633

bool isIndexed() const

Return true if this is a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2696

VPBaseLoadStoreSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &DL, SDVTList VTs, ISD::MemIndexedMode AM, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2635

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2650

ISD::MemIndexedMode getAddressingMode() const

Return the addressing mode for this load or store: unindexed, pre-inc, pre-dec, post-inc,...

Definition SelectionDAGNodes.h:2691

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2675

bool isUnindexed() const

Return true if this is NOT a pre/post inc/dec load/store.

Definition SelectionDAGNodes.h:2699

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2656

friend class SelectionDAG

Definition SelectionDAGNodes.h:2997

VPGatherSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

Definition SelectionDAGNodes.h:2999

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3004

const SDValue & getScale() const

Definition SelectionDAGNodes.h:2977

friend class SelectionDAG

Definition SelectionDAGNodes.h:2948

ISD::MemIndexType getIndexType() const

How is Index applied to BasePtr when computing addresses.

Definition SelectionDAGNodes.h:2959

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2983

const SDValue & getIndex() const

Definition SelectionDAGNodes.h:2974

VPGatherScatterSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

Definition SelectionDAGNodes.h:2950

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2971

bool isIndexScaled() const

Definition SelectionDAGNodes.h:2962

bool isIndexSigned() const

Definition SelectionDAGNodes.h:2965

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2987

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2980

const SDValue & getMask() const

Definition SelectionDAGNodes.h:3152

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:3151

friend class SelectionDAG

Definition SelectionDAGNodes.h:3145

VPLoadFFSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:3147

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3155

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:3153

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2726

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2728

ISD::LoadExtType getExtensionType() const

Definition SelectionDAGNodes.h:2721

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2727

friend class SelectionDAG

Definition SelectionDAGNodes.h:2711

VPLoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, ISD::LoadExtType ETy, bool isExpanding, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2713

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2725

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2730

bool isExpandingLoad() const

Definition SelectionDAGNodes.h:2733

friend class SelectionDAG

Definition SelectionDAGNodes.h:3013

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:3022

VPScatterSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

Definition SelectionDAGNodes.h:3015

const SDValue & getValue() const

Definition SelectionDAGNodes.h:3020

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2793

VPStoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, ISD::MemIndexedMode AM, bool isTrunc, bool isCompressing, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2771

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2796

friend class SelectionDAG

Definition SelectionDAGNodes.h:2769

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2794

bool isCompressingStore() const

Returns true if the op does a compression to the vector before storing.

Definition SelectionDAGNodes.h:2788

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2792

bool isTruncatingStore() const

Return true if this is a truncating store.

Definition SelectionDAGNodes.h:2782

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2791

const SDValue & getValue() const

Definition SelectionDAGNodes.h:2790

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2757

ISD::LoadExtType getExtensionType() const

Definition SelectionDAGNodes.h:2750

bool isExpandingLoad() const

Definition SelectionDAGNodes.h:2763

friend class SelectionDAG

Definition SelectionDAGNodes.h:2739

const SDValue & getStride() const

Definition SelectionDAGNodes.h:2756

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2755

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2758

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2760

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2754

VPStridedLoadSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, ISD::MemIndexedMode AM, ISD::LoadExtType ETy, bool IsExpanding, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2741

const SDValue & getBasePtr() const

Definition SelectionDAGNodes.h:2827

const SDValue & getMask() const

Definition SelectionDAGNodes.h:2830

const SDValue & getValue() const

Definition SelectionDAGNodes.h:2826

bool isTruncatingStore() const

Return true if this is a truncating store.

Definition SelectionDAGNodes.h:2818

VPStridedStoreSDNode(unsigned Order, const DebugLoc &DL, SDVTList VTs, ISD::MemIndexedMode AM, bool IsTrunc, bool IsCompressing, EVT MemVT, MachineMemOperand *MMO)

Definition SelectionDAGNodes.h:2806

friend class SelectionDAG

Definition SelectionDAGNodes.h:2804

const SDValue & getOffset() const

Definition SelectionDAGNodes.h:2828

const SDValue & getVectorLength() const

Definition SelectionDAGNodes.h:2831

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2833

const SDValue & getStride() const

Definition SelectionDAGNodes.h:2829

bool isCompressingStore() const

Returns true if the op does a compression to the vector before storing.

Definition SelectionDAGNodes.h:2824

friend class SelectionDAG

Definition SelectionDAGNodes.h:2524

EVT getVT() const

Definition SelectionDAGNodes.h:2533

static bool classof(const SDNode *N)

Definition SelectionDAGNodes.h:2535

LLVM Value Representation.

Type * getType() const

All values are typed, get the type of this value.

iterator_adaptor_base()=default

A range adaptor for a pair of iterators.

This class implements an extremely fast bulk output stream that can only output to a stream.

This file defines the ilist_node class template, which is a convenient base class for creating classe...

This provides a very simple, boring adaptor for a begin and end iterator into a range type.

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

ISD namespace - This namespace contains an enum which represents all of the SelectionDAG node types a...

LLVM_ABI bool isConstantSplatVectorAllOnes(const SDNode *N, bool BuildVectorOnly=false)

Return true if the specified node is a BUILD_VECTOR or SPLAT_VECTOR where all of the elements are ~0 ...

bool isNormalMaskedLoad(const SDNode *N)

Returns true if the specified node is a non-extending and unindexed masked load.

Definition SelectionDAGNodes.h:3384

bool isNormalMaskedStore(const SDNode *N)

Returns true if the specified node is a non-extending and unindexed masked store.

Definition SelectionDAGNodes.h:3392

bool isNON_EXTLoad(const SDNode *N)

Returns true if the specified node is a non-extending load.

Definition SelectionDAGNodes.h:3339

NodeType

ISD::NodeType enum - This enum defines the target-independent operators for a SelectionDAG.

@ POISON

POISON - A poison node.

@ ADD

Simple integer binary arithmetic operators.

@ BUILTIN_OP_END

BUILTIN_OP_END - This must be the last enum value in this list.

@ TargetIndex

TargetIndex - Like a constant pool entry, but with completely target-dependent semantics.

@ SSUBO

Same for subtraction.

@ UNDEF

UNDEF - An undefined node.

@ AssertAlign

AssertAlign - These nodes record if a register contains a value that has a known alignment and the tr...

@ BasicBlock

Various leaf nodes.

@ SADDO

RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for addition.

@ TargetGlobalAddress

TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or anything else with this node...

@ AssertNoFPClass

AssertNoFPClass - These nodes record if a register contains a float value that is known to be not som...

@ VECTOR_SHUFFLE

VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as VEC1/VEC2.

@ SMULO

Same for multiplication.

@ TargetConstant

TargetConstant* - Like Constant*, but the DAG does not do any folding, simplification,...

@ TokenFactor

TokenFactor - This node takes multiple tokens as input and produces a single token result.

@ AssertSext

AssertSext, AssertZext - These nodes record if a register contains a value that has already been zero...

@ BUILD_VECTOR

BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a fixed-width vector with the specified,...

bool isOverflowIntrOpRes(SDValue Op)

Returns true if the specified value is the overflow result from one of the overflow intrinsic nodes.

Definition SelectionDAGNodes.h:3435

LLVM_ABI bool isBuildVectorOfConstantSDNodes(const SDNode *N)

Return true if the specified node is a BUILD_VECTOR node of all ConstantSDNode or undef.

bool isNormalStore(const SDNode *N)

Returns true if the specified node is a non-truncating and unindexed store.

Definition SelectionDAGNodes.h:3370

bool isZEXTLoad(const SDNode *N)

Returns true if the specified node is a ZEXTLOAD.

Definition SelectionDAGNodes.h:3357

bool matchUnaryFpPredicate(SDValue Op, std::function< bool(ConstantFPSDNode *)> Match, bool AllowUndefs=false)

Hook for matching ConstantFPSDNode predicate.

Definition SelectionDAGNodes.h:3418

LLVM_ABI bool isConstantSplatVectorAllZeros(const SDNode *N, bool BuildVectorOnly=false)

Return true if the specified node is a BUILD_VECTOR or SPLAT_VECTOR where all of the elements are 0 o...

LLVM_ABI bool isVectorShrinkable(const SDNode *N, unsigned NewEltSize, bool Signed)

Returns true if the specified node is a vector where all elements can be truncated to the specified e...

bool isUNINDEXEDLoad(const SDNode *N)

Returns true if the specified node is an unindexed load.

Definition SelectionDAGNodes.h:3363

bool isEXTLoad(const SDNode *N)

Returns true if the specified node is a EXTLOAD.

Definition SelectionDAGNodes.h:3345

LLVM_ABI bool allOperandsUndef(const SDNode *N)

Return true if the node has at least one operand and all operands of the specified node are ISD::UNDE...

LLVM_ABI bool isFreezeUndef(const SDNode *N)

Return true if the specified node is FREEZE(UNDEF).

MemIndexType

MemIndexType enum - This enum defines how to interpret MGATHER/SCATTER's index parameter when calcula...

LLVM_ABI bool isBuildVectorAllZeros(const SDNode *N)

Return true if the specified node is a BUILD_VECTOR where all of the elements are 0 or undef.

bool matchUnaryPredicateImpl(SDValue Op, std::function< bool(ConstNodeType *)> Match, bool AllowUndefs=false, bool AllowTruncation=false)

Attempt to match a unary predicate against a scalar/splat constant or every element of a constant BUI...

LLVM_ABI bool isConstantSplatVector(const SDNode *N, APInt &SplatValue)

Node predicates.

LLVM_ABI bool matchBinaryPredicate(SDValue LHS, SDValue RHS, std::function< bool(ConstantSDNode *, ConstantSDNode *)> Match, bool AllowUndefs=false, bool AllowTypeMismatch=false)

Attempt to match a binary predicate against a pair of scalar/splat constants or every element of a pa...

bool isUNINDEXEDStore(const SDNode *N)

Returns true if the specified node is an unindexed store.

Definition SelectionDAGNodes.h:3377

bool matchUnaryPredicate(SDValue Op, std::function< bool(ConstantSDNode *)> Match, bool AllowUndefs=false, bool AllowTruncation=false)

Hook for matching ConstantSDNode predicate.

Definition SelectionDAGNodes.h:3408

MemIndexedMode

MemIndexedMode enum - This enum defines the load / store indexed addressing modes.

LLVM_ABI bool isBuildVectorOfConstantFPSDNodes(const SDNode *N)

Return true if the specified node is a BUILD_VECTOR node of all ConstantFPSDNode or undef.

bool isSEXTLoad(const SDNode *N)

Returns true if the specified node is a SEXTLOAD.

Definition SelectionDAGNodes.h:3351

CondCode

ISD::CondCode enum - These are ordered carefully to make the bitfields below work out,...

LLVM_ABI bool isBuildVectorAllOnes(const SDNode *N)

Return true if the specified node is a BUILD_VECTOR where all of the elements are ~0 or undef.

LoadExtType

LoadExtType enum - This enum defines the three variants of LOADEXT (load with extension).

LLVM_ABI bool isVPOpcode(unsigned Opcode)

Whether this is a vector-predicated Opcode.

bool isNormalLoad(const SDNode *N)

Returns true if the specified node is a non-extending and unindexed load.

Definition SelectionDAGNodes.h:3332

This is an optimization pass for GlobalISel generic memory operations.

GCNRegPressure max(const GCNRegPressure &P1, const GCNRegPressure &P2)

LLVM_ABI SDValue peekThroughExtractSubvectors(SDValue V)

Return the non-extracted vector source operand of V if it exists.

LLVM_ABI bool isNullConstant(SDValue V)

Returns true if V is a constant integer zero.

LLVM_ABI bool isAllOnesOrAllOnesSplat(const MachineInstr &MI, const MachineRegisterInfo &MRI, bool AllowUndefs=false)

Return true if the value is a constant -1 integer or a splatted vector of a constant -1 integer (with...

APInt operator&(APInt a, const APInt &b)

LLVM_ABI SDValue getBitwiseNotOperand(SDValue V, SDValue Mask, bool AllowUndefs)

If V is a bitwise not, returns the inverted operand.

LLVM_ABI SDValue peekThroughBitcasts(SDValue V)

Return the non-bitcasted source operand of V if it exists.

decltype(auto) dyn_cast(const From &Val)

dyn_cast - Return the argument parameter cast to the specified type.

bool isIntOrFPConstant(SDValue V)

Return true if V is either a integer or FP constant.

Definition SelectionDAGNodes.h:1976

iterator_range< T > make_range(T x, T y)

Convenience function for iterating over sub-ranges.

FoldingSetBase::Node FoldingSetNode

LLVM_ABI bool isOneOrOneSplatFP(SDValue V, bool AllowUndefs=false)

Return true if the value is a constant floating-point value, or a splatted vector of a constant float...

LLVM_ABI bool isNullOrNullSplat(const MachineInstr &MI, const MachineRegisterInfo &MRI, bool AllowUndefs=false)

Return true if the value is a constant 0 integer or a splatted vector of a constant 0 integer (with n...

LLVM_ABI bool isMinSignedConstant(SDValue V)

Returns true if V is a constant min signed integer value.

LLVM_ABI ConstantFPSDNode * isConstOrConstSplatFP(SDValue N, bool AllowUndefs=false)

Returns the SDNode if it is a constant splat BuildVector or constant float.

LLVM_ABI bool isBitwiseNot(SDValue V, bool AllowUndefs=false)

Returns true if V is a bitwise not operation.

LLVM_ABI SDValue peekThroughInsertVectorElt(SDValue V, const APInt &DemandedElts)

Recursively peek through INSERT_VECTOR_ELT nodes, returning the source vector operand of V,...

LLVM_ABI void checkForCycles(const SelectionDAG *DAG, bool force=false)

LLVM_ABI SDValue peekThroughTruncates(SDValue V)

Return the non-truncated source operand of V if it exists.

AlignedCharArrayUnion< AtomicSDNode, TargetIndexSDNode, BlockAddressSDNode, GlobalAddressSDNode, PseudoProbeSDNode > LargestSDNode

A representation of the largest SDNode, for use in sizeof().

Definition SelectionDAGNodes.h:3321

GlobalAddressSDNode MostAlignedSDNode

The SDNode class with the greatest alignment requirement.

Definition SelectionDAGNodes.h:3327

bool hasSingleElement(ContainerTy &&C)

Returns true if the given container only contains a single element.

LLVM_ABI SDValue peekThroughOneUseBitcasts(SDValue V)

Return the non-bitcasted and one-use source operand of V if it exists.

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

LLVM_ABI bool isOneOrOneSplat(SDValue V, bool AllowUndefs=false)

Return true if the value is a constant 1 integer or a splatted vector of a constant 1 integer (with n...

AtomicOrdering

Atomic ordering for LLVM's memory model.

FunctionAddr VTableAddr uintptr_t uintptr_t Data

LLVM_ABI bool isNullConstantOrUndef(SDValue V)

Returns true if V is a constant integer zero or an UNDEF node.

FunctionAddr VTableAddr Next

DWARFExpression::Operation Op

ArrayRef(const T &OneElt) -> ArrayRef< T >

LLVM_ABI ConstantSDNode * isConstOrConstSplat(SDValue N, bool AllowUndefs=false, bool AllowTruncation=false)

Returns the SDNode if it is a constant splat BuildVector or constant int.

constexpr unsigned BitWidth

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

decltype(auto) cast(const From &Val)

cast - Return the argument parameter cast to the specified type.

LLVM_ABI bool isZeroOrZeroSplat(SDValue N, bool AllowUndefs=false)

Return true if the value is a constant 0 integer or a splatted vector of a constant 0 integer (with n...

LLVM_ABI bool isOneConstant(SDValue V)

Returns true if V is a constant integer one.

LLVM_ABI bool isNullFPConstant(SDValue V)

Returns true if V is an FP constant with a value of positive zero.

LLVM_ABI bool isZeroOrZeroSplatFP(SDValue N, bool AllowUndefs=false)

Return true if the value is a constant (+/-)0.0 floating-point value or a splatted vector thereof (wi...

APInt operator|(APInt a, const APInt &b)

LLVM_ABI bool isOnesOrOnesSplat(SDValue N, bool AllowUndefs=false)

Return true if the value is a constant 1 integer or a splatted vector of a constant 1 integer (with n...

LLVM_ABI bool isNeutralConstant(unsigned Opc, SDNodeFlags Flags, SDValue V, unsigned OperandNo)

Returns true if V is a neutral element of Opc with Flags.

LLVM_ABI bool isAllOnesConstant(SDValue V)

Returns true if V is an integer constant with all bits set.

Implement std::hash so that hash_code can be used in STL containers.

A collection of metadata nodes that might be associated with a memory access used by the alias-analys...

This struct is a compact representation of a valid (non-zero power of two) alignment.

A suitably aligned and sized character array member which can hold elements of any type.

static SDValue getEmptyKey()

Definition SelectionDAGNodes.h:242

static unsigned getHashValue(const SDValue &Val)

Definition SelectionDAGNodes.h:254

static SDValue getTombstoneKey()

Definition SelectionDAGNodes.h:248

static bool isEqual(const SDValue &LHS, const SDValue &RHS)

Definition SelectionDAGNodes.h:259

An information struct used to provide DenseMap with the various necessary components for a given valu...

TypeSize getSizeInBits() const

Return the size of the specified value type in bits.

MVT getSimpleVT() const

Return the SimpleValueType held in the specified simple EVT.

uint64_t getFixedSizeInBits() const

Return the size of the specified fixed width value type in bits.

EVT getScalarType() const

If this is a vector type, return the element type, otherwise return this.

unsigned getVectorNumElements() const

Given a vector type, return the number of elements it contains.

SDNodeIterator ChildIteratorType

Definition SelectionDAGNodes.h:3304

static ChildIteratorType child_begin(NodeRef N)

Definition SelectionDAGNodes.h:3308

SDNode * NodeRef

Definition SelectionDAGNodes.h:3303

static ChildIteratorType child_end(NodeRef N)

Definition SelectionDAGNodes.h:3312

static NodeRef getEntryNode(SDNode *N)

Definition SelectionDAGNodes.h:3306

This class contains a discriminated union of information about pointers in memory operands,...

LLVM_ABI unsigned getAddrSpace() const

Return the LLVM IR address space number that this pointer points into.

This struct is a compact representation of a valid (power of two) or undefined (0) alignment.

These are IR-level optimization flags that may be propagated to SDNodes.

Definition SelectionDAGNodes.h:384

void setInBounds(bool b)

Definition SelectionDAGNodes.h:470

@ AllowReciprocal

Definition SelectionDAGNodes.h:406

@ InBounds

Definition SelectionDAGNodes.h:429

@ AllowContract

Definition SelectionDAGNodes.h:407

@ NoInfs

Definition SelectionDAGNodes.h:404

@ NoWrap

Definition SelectionDAGNodes.h:399

@ Disjoint

Definition SelectionDAGNodes.h:401

@ Exact

Definition SelectionDAGNodes.h:400

@ NoFPExcept

Definition SelectionDAGNodes.h:416

@ NoNaNs

Definition SelectionDAGNodes.h:403

@ PoisonGeneratingFlags

Definition SelectionDAGNodes.h:434

@ ApproximateFuncs

Definition SelectionDAGNodes.h:408

@ SameSign

Definition SelectionDAGNodes.h:420

@ NoUnsignedWrap

Definition SelectionDAGNodes.h:397

@ AllowReassociation

Definition SelectionDAGNodes.h:409

@ NoSignedWrap

Definition SelectionDAGNodes.h:398

@ NonNeg

Definition SelectionDAGNodes.h:402

@ FastMathFlags

Definition SelectionDAGNodes.h:436

@ NoSignedZeros

Definition SelectionDAGNodes.h:405

@ Unpredictable

Definition SelectionDAGNodes.h:418

@ None

Definition SelectionDAGNodes.h:396

void setSameSign(bool b)

Definition SelectionDAGNodes.h:459

void copyFMF(const FPMathOperator &FPMO)

Propagate the fast-math-flags from an IR FPMathOperator.

Definition SelectionDAGNodes.h:444

bool hasNoInfs() const

Definition SelectionDAGNodes.h:480

void setNoFPExcept(bool b)

Definition SelectionDAGNodes.h:468

friend class SDNode

Definition SelectionDAGNodes.h:386

void setDisjoint(bool b)

Definition SelectionDAGNodes.h:458

void setAllowContract(bool b)

Definition SelectionDAGNodes.h:465

void setNoSignedZeros(bool b)

Definition SelectionDAGNodes.h:463

bool hasNoFPExcept() const

Definition SelectionDAGNodes.h:486

bool hasInBounds() const

Definition SelectionDAGNodes.h:488

bool operator==(const SDNodeFlags &Other) const

Definition SelectionDAGNodes.h:490

void setNoNaNs(bool b)

Definition SelectionDAGNodes.h:461

void operator&=(const SDNodeFlags &OtherFlags)

Definition SelectionDAGNodes.h:493

void operator|=(const SDNodeFlags &OtherFlags)

Definition SelectionDAGNodes.h:494

bool hasNoUnsignedWrap() const

Definition SelectionDAGNodes.h:473

void setAllowReassociation(bool b)

Definition SelectionDAGNodes.h:467

bool hasNoNaNs() const

Definition SelectionDAGNodes.h:479

void setUnpredictable(bool b)

Definition SelectionDAGNodes.h:469

void setNoInfs(bool b)

Definition SelectionDAGNodes.h:462

void setAllowReciprocal(bool b)

Definition SelectionDAGNodes.h:464

void setExact(bool b)

Definition SelectionDAGNodes.h:457

bool hasAllowContract() const

Definition SelectionDAGNodes.h:483

bool hasNoSignedZeros() const

Definition SelectionDAGNodes.h:481

bool hasDisjoint() const

Definition SelectionDAGNodes.h:476

bool hasExact() const

Definition SelectionDAGNodes.h:475

bool hasApproximateFuncs() const

Definition SelectionDAGNodes.h:484

bool hasUnpredictable() const

Definition SelectionDAGNodes.h:487

void setApproximateFuncs(bool b)

Definition SelectionDAGNodes.h:466

bool hasNoSignedWrap() const

Definition SelectionDAGNodes.h:474

bool hasSameSign() const

Definition SelectionDAGNodes.h:477

void setNonNeg(bool b)

Definition SelectionDAGNodes.h:460

SDNodeFlags(unsigned Flags=SDNodeFlags::None)

Default constructor turns off all optimization flags.

Definition SelectionDAGNodes.h:441

bool hasAllowReciprocal() const

Definition SelectionDAGNodes.h:482

bool hasNonNeg() const

Definition SelectionDAGNodes.h:478

bool hasAllowReassociation() const

Definition SelectionDAGNodes.h:485

void setNoUnsignedWrap(bool b)

Definition SelectionDAGNodes.h:455

void setNoSignedWrap(bool b)

Definition SelectionDAGNodes.h:456

Iterator for directly iterating over the operand SDValue's.

Definition SelectionDAGNodes.h:1061

const SDValue & operator*() const

Definition SelectionDAGNodes.h:1065

value_op_iterator(SDUse *U=nullptr)

Definition SelectionDAGNodes.h:1062

This represents a list of ValueType's that has been intern'd by a SelectionDAG.

Definition SelectionDAGNodes.h:80

const EVT * VTs

Definition SelectionDAGNodes.h:81

unsigned int NumVTs

Definition SelectionDAGNodes.h:82

static SimpleType getSimplifiedValue(SDUse &Val)

Definition SelectionDAGNodes.h:376

SDNode * SimpleType

Definition SelectionDAGNodes.h:374

SDNode * SimpleType

Definition SelectionDAGNodes.h:267

static SimpleType getSimplifiedValue(SDValue &Val)

Definition SelectionDAGNodes.h:269

static SimpleType getSimplifiedValue(const SDValue &Val)

Definition SelectionDAGNodes.h:276

SDNode * SimpleType

Definition SelectionDAGNodes.h:274

Define a template that can be specialized by smart pointers to reflect the fact that they are automat...