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

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_CODEGEN_SELECTIONDAG_H

15#define LLVM_CODEGEN_SELECTIONDAG_H

16

44#include

45#include

46#include

47#include

48#include

49#include

50#include

51#include

52#include

53

54namespace llvm {

55

62template struct GraphTraits;

63template <typename T, unsigned int N> class SmallSetVector;

64template <typename T, typename Enable> struct FoldingSetTrait;

94

99

102

103

104

105

106

107

109 const EVT *VTs;

110 unsigned int NumVTs;

111

112

113 unsigned HashValue;

114

115public:

117 FastID(ID), VTs(VT), NumVTs(Num) {

118 HashValue = ID.ComputeHash();

119 }

120

122 SDVTList result = {VTs, NumVTs};

123 return result;

124 }

125};

126

127

128

133

136 if (X.HashValue != IDHash)

137 return false;

138 return ID == X.FastID;

139 }

140

142 return X.HashValue;

143 }

144};

145

148 llvm_unreachable("ilist_traits shouldn't see a deleteNode call!");

149 }

150};

151

152

153

154

155

156

157

158

159

160

161

162

169 DbgValMapType DbgValMap;

170

171public:

175

177

179

180

181

183

185 DbgValMap.clear();

186 DbgValues.clear();

187 ByvalParmDbgValues.clear();

188 DbgLabels.clear();

189 Alloc.Reset();

190 }

191

193

195 return DbgValues.empty() && ByvalParmDbgValues.empty() && DbgLabels.empty();

196 }

197

199 auto I = DbgValMap.find(Node);

200 if (I != DbgValMap.end())

201 return I->second;

203 }

204

207

214};

215

217

218

219

220

221

222

223

224

225

226

227

228

237 Pass *SDAGISelPass = nullptr;

240

243

244

245

247

251

252

253 std::set<EVT, EVT::compareRawBits> EVTs;

254

255

257

258

260

261

263

264

266

267

269

270

271

275

276

277 NodeAllocatorType NodeAllocator;

278

279

280

282

283

286

287

289

292

293 struct NodeExtraInfo {

294 CallSiteInfo CSInfo;

295 MDNode *HeapAllocSite = nullptr;

296 MDNode *PCSections = nullptr;

297 MDNode *MMRA = nullptr;

298 CalledGlobalInfo CalledGlobal{};

299 bool NoMerge = false;

300 };

301

303

304

305

306

307

308

309 uint16_t NextPersistentId = 0;

310

311public:

312

313

314

315

316

317

321

323 : Next(D.UpdateListeners), DAG(D) {

324 DAG.UpdateListeners = this;

325 }

326

328 assert(DAG.UpdateListeners == this &&

329 "DAGUpdateListeners must be destroyed in LIFO order");

330 DAG.UpdateListeners = Next;

331 }

332

333

334

336

337

338 virtual void NodeUpdated(SDNode *N);

339

340

341 virtual void NodeInserted(SDNode *N);

342 };

343

346

350

352

353 private:

354 virtual void anchor();

355 };

356

359

363

365

366 private:

367 virtual void anchor();

368 };

369

370

371

376

377 public:

379 : DAG(SDAG), Flags(Flags),

382 }

385

389

391 };

392

393

394

395

396

397

399

400private:

401

403

404

405

407

408

409

410 bool setSubgraphColorHelper(SDNode *N, const char *Color,

412 int level, bool &printed);

413

414 template <typename SDNodeT, typename... ArgTypes>

415 SDNodeT *newSDNode(ArgTypes &&... Args) {

416 return new (NodeAllocator.template Allocate())

417 SDNodeT(std::forward(Args)...);

418 }

419

420

421

422

423

424

425

426 template <typename SDNodeT, typename... ArgTypes>

427 static uint16_t getSyntheticNodeSubclassData(unsigned IROrder,

428 ArgTypes &&... Args) {

429

430

431

432 return SDNodeT(IROrder, DebugLoc(), std::forward(Args)...)

433 .getRawSubclassData();

434 }

435

436 template

437 static uint16_t getSyntheticNodeSubclassData(unsigned Opc, unsigned Order,

438 SDVTList VTs, EVT MemoryVT,

439 MachineMemOperand *MMO) {

440 return SDNodeTy(Opc, Order, DebugLoc(), VTs, MemoryVT, MMO)

441 .getRawSubclassData();

442 }

443

445

447 if (Node->OperandList)

448 return;

449 OperandRecycler.deallocate(

451 Node->OperandList);

452 Node->NumOperands = 0;

453 Node->OperandList = nullptr;

454 }

455 void CreateTopologicalOrder(std::vector<SDNode*>& Order);

456

457public:

458

460

461

463

468

469

475

481 init(NewMF, NewORE, nullptr, LibraryInfo, UA, PSIin, BFIin, MMI, FnVarLocs);

482 MFAM = &AM;

483 }

484

486 FLI = FuncInfo;

487 }

488

489

490

492

496

501 template const STC &getSubtarget() const {

502 return MF->getSubtarget();

503 }

508

509

516

519

520

521

522

523

524

525

526

527#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

529#endif

530

531

534

535#if LLVM_ENABLE_ABI_BREAKING_CHECKS

536 std::map<const SDNode *, std::string> NodeGraphAttrs;

537#endif

538

539

540

542

543

545

546

547

549

550

552

553

555

557

560

562

565

567 return AllNodes.size();

568 }

569

576

577

579

580

584

585

586

588 assert((N.getNode() || N.getValueType() == MVT::Other) &&

589 "DAG root value is not a chain!");

590 if (N.getNode())

592 Root = N;

593 if (N.getNode())

595 return Root;

596 }

597

598#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS

599 void VerifyDAGDivergence();

600#endif

601

602

603

604

605

608

609

610

611

612

613

614

616

617

618

619

620

621

622

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

646

647

648

649

650

651

652

653

654

655

656

657

659

660

662

663

664

666

667

673

674

675

676

677

678

679

680

681

682

684 bool isTarget = false, bool isOpaque = false);

686 bool isTarget = false, bool isOpaque = false);

687

689 bool isTarget = false,

690 bool isOpaque = false);

691

693 bool IsTarget = false,

694 bool IsOpaque = false);

695

697 bool isTarget = false, bool isOpaque = false);

699 bool isTarget = false);

705 bool isTarget = false);

706

708 bool isOpaque = false) {

710 }

712 bool isOpaque = false) {

714 }

716 bool isOpaque = false) {

718 }

720 bool isOpaque = false) {

722 }

723

724

725

727

728

729

730

731

732

733

734

735

736

738 bool isTarget = false);

740 bool isTarget = false);

742 bool isTarget = false);

752

753

755 EVT VT, int64_t offset = 0,

756 bool isTargetGA = false,

757 unsigned TargetFlags = 0);

759 int64_t offset = 0, unsigned TargetFlags = 0) {

761 }

768 unsigned TargetFlags = 0);

776 int Offs = 0, bool isT = false,

777 unsigned TargetFlags = 0);

780 unsigned TargetFlags = 0) {

782 }

785 int Offs = 0, bool isT = false,

786 unsigned TargetFlags = 0);

789 unsigned TargetFlags = 0) {

791 }

792

793

798 unsigned TargetFlags = 0);

800

808 int64_t Offset = 0, bool isTarget = false,

809 unsigned TargetFlags = 0);

811 int64_t Offset = 0, unsigned TargetFlags = 0) {

813 }

814

820

821

822

823

831

832

840

846

847

848

849

857

859

860

861

862

865

866

867

868

869

874

875

876

877

878

883

884

885

886

888

889 if (Op.isUndef()) {

893 "A splatted value must have a width equal or (for integers) "

894 "greater than the vector element type!");

896 }

897

900 }

901

902

903

905 if (Op.isUndef()) {

909 "A splatted value must have a width equal or (for integers) "

910 "greater than the vector element type!");

912 }

914 }

915

916

917

918

919

925

926

927

929 const APInt &StepVal);

930

931

932

934

935

936

937

938

940

941

942

944 unsigned Idx) {

947 }

948

949

950

952 unsigned Idx) {

955 }

956

957

959 unsigned Idx) {

962 }

963

964

966 unsigned Idx) {

969 }

970

971

972

974

975

976

977 LLVM_ABI std::pair<SDValue, SDValue>

979

980

982 switch (Opcode) {

992 }

994 }

995

996

998 switch (Opcode) {

1008 }

1010 }

1011

1012

1013

1015

1016

1017

1019

1020

1021

1023

1024

1025

1026

1028 EVT VT, unsigned Opcode) {

1029 switch(Opcode) {

1036 }

1038 }

1039

1040

1041

1042

1046

1047

1048

1049

1051 EVT VT);

1052

1053

1054

1055

1057

1058

1059

1060

1062

1063

1064

1066

1067

1068

1071

1072

1073

1074

1076

1077

1078

1079

1081

1082

1083

1084

1086 EVT OpVT);

1087

1088

1090

1091

1093

1094

1096

1097

1098

1101

1102

1103

1104

1105

1108

1109

1110

1111

1112

1113

1116

1117

1118

1119

1126

1127

1128

1129

1130

1135

1142

1143

1144

1145

1152 return getNode(ISD::CALLSEQ_START, DL, VTs, Ops);

1153 }

1154

1155

1156

1157

1162 Ops.push_back(Chain);

1163 Ops.push_back(Op1);

1164 Ops.push_back(Op2);

1166 Ops.push_back(InGlue);

1167 return getNode(ISD::CALLSEQ_END, DL, NodeTys, Ops);

1168 }

1169

1176

1177

1179

1180

1184

1185

1187

1188

1190

1192

1194

1195

1196

1197

1200

1201

1205

1206

1207

1217

1218

1231

1232

1250

1251

1252

1265

1266

1267

1268

1270

1271

1272

1277

1278

1279

1280 LLVM_ABI std::pair<SDValue, SDValue>

1282

1283

1284

1285

1288 bool isVol, bool AlwaysInline, const CallInst *CI,

1289 std::optional OverrideTailCall,

1294

1295

1296

1297

1300 bool isVol, const CallInst *CI,

1301 std::optional OverrideTailCall,

1306

1309 bool isVol, bool AlwaysInline, const CallInst *CI,

1312

1315 unsigned ElemSz, bool isTailCall,

1318

1321 unsigned ElemSz, bool isTailCall,

1324

1327 unsigned ElemSz, bool isTailCall,

1329

1330

1331

1334 bool IsSignaling = false) {

1335 assert(LHS.getValueType().isVector() == RHS.getValueType().isVector() &&

1336 "Vector/scalar operand type mismatch for setcc");

1338 "Vector/scalar result type mismatch for setcc");

1340 "Cannot create a setCC of an invalid node.");

1341 if (Chain)

1345 }

1346

1347

1348

1351 assert(LHS.getValueType().isVector() && RHS.getValueType().isVector() &&

1352 "Cannot compare scalars");

1354 "Cannot create a setCC of an invalid node.");

1356 EVL);

1357 }

1358

1359

1360

1363 assert(LHS.getValueType() == VT && RHS.getValueType() == VT &&

1364 "Cannot use select on differing types");

1367 }

1368

1369

1370

1377

1378

1380

1381

1383

1384

1385

1388

1389

1390

1393

1394

1395

1396

1397

1402

1403

1404

1408

1409

1410

1415

1419

1420

1421

1422

1423

1431

1435 MaybeAlign Alignment = std::nullopt,

1440

1442 Alignment.value_or(getEVTAlign(MemVT)), Flags,

1443 Size, AAInfo);

1444 }

1445

1449

1450

1451

1453 int FrameIndex);

1454

1455

1456

1457

1461

1462

1464

1465

1466

1467

1468

1469

1501

1502 return getLoad(AM, ExtType, VT, dl, Chain, Ptr, Offset, PtrInfo, MemVT,

1503 Alignment.value_or(getEVTAlign(MemVT)), MMOFlags, AAInfo,

1504 Ranges);

1505 }

1509

1510

1511

1512

1513

1514

1525 return getStore(Chain, dl, Val, Ptr, PtrInfo,

1527 MMOFlags, AAInfo);

1528 }

1542 return getTruncStore(Chain, dl, Val, Ptr, PtrInfo, SVT,

1543 Alignment.value_or(getEVTAlign(SVT)), MMOFlags,

1544 AAInfo);

1545 }

1554 bool IsTruncating = false);

1555

1562 const MDNode *Ranges = nullptr,

1563 bool IsExpanding = false);

1571 const MDNode *Ranges = nullptr, bool IsExpanding = false) {

1572

1573 return getLoadVP(AM, ExtType, VT, dl, Chain, Ptr, Offset, Mask, EVL,

1574 PtrInfo, MemVT, Alignment.value_or(getEVTAlign(MemVT)),

1575 MMOFlags, AAInfo, Ranges, IsExpanding);

1576 }

1581 bool IsExpanding = false);

1587 const MDNode *Ranges = nullptr,

1588 bool IsExpanding = false);

1596 const AAMDNodes &AAInfo, bool IsExpanding = false);

1601 bool IsExpanding = false);

1609 bool IsCompressing = false);

1613 Align Alignment,

1616 bool IsCompressing = false);

1620 bool IsCompressing = false);

1624

1632 bool IsExpanding = false);

1638 bool IsExpanding = false);

1644 bool IsTruncating = false,

1645 bool IsCompressing = false);

1651 bool IsCompressing = false);

1652

1659

1672 bool IsTruncating = false,

1673 bool IsCompressing = false);

1686 bool IsTruncating = false);

1694

1699

1700

1702

1703

1705

1706

1707

1709

1710

1712 unsigned SrcAS, unsigned DestAS);

1713

1714

1716

1717

1719

1720

1721

1724

1725

1726

1728

1729

1731

1732

1734

1735

1736

1737

1738

1741

1742

1743

1744

1745

1746

1747

1757

1758

1759

1760

1763

1764

1765

1768

1769

1771

1772

1774

1775

1776

1777

1778

1789 EVT VT2);

1798

1799

1800

1803

1804

1805

1806

1808

1809

1810

1811

1812

1813

1814

1816 EVT VT);

1849

1850

1853

1854

1857

1858

1862 bool AllowCommute = false);

1865 bool AllowCommute = false);

1866

1867

1870

1871

1873 SDNode *N, unsigned R, bool IsIndirect,

1875

1876

1879 unsigned O);

1880

1881

1884 bool IsIndirect,

1886

1887

1891 bool IsIndirect,

1893

1894

1896 Register VReg, bool IsIndirect,

1898

1899

1903 bool IsIndirect, const DebugLoc &DL,

1904 unsigned O, bool IsVariadic);

1905

1906

1908 unsigned O);

1909

1910

1911

1912

1914 unsigned OffsetInBits = 0,

1915 unsigned SizeInBits = 0,

1916 bool InvalidateDbg = true);

1917

1918

1919

1920

1922

1923

1924

1926

1927

1928

1929

1930

1931

1932

1933

1934

1935

1936

1937

1938

1939

1940

1941

1945

1946

1947

1949

1950

1951

1952

1954 const SDValue *To, unsigned Num);

1955

1956

1957

1958

1959

1960

1963

1964

1965

1966

1967

1968

1971

1972

1975

1976

1977

1978

1980

1981

1982

1983

1985 AllNodes.insert(Position, AllNodes.remove(N));

1986 }

1987

1988

1989

1991

1992

1994

1995

1997 return DbgInfo->getSDDbgValues(SD);

1998 }

1999

2000public:

2001

2002

2004

2007

2009 return DbgInfo->ByvalParmDbgBegin();

2010 }

2012 return DbgInfo->ByvalParmDbgEnd();

2013 }

2014

2016 return DbgInfo->DbgLabelBegin();

2017 }

2019 return DbgInfo->DbgLabelEnd();

2020 }

2021

2022

2023

2025

2026

2027

2028 LLVM_ABI void dump(bool Sorted = false) const;

2029

2030

2031

2032

2033

2035

2036

2038

2039

2040

2042

2043

2044

2046

2050

2054

2055

2056

2059

2060

2061

2064

2065

2067 const SDLoc &dl);

2068

2069

2070

2072

2073

2074

2076

2077

2078

2079

2081 unsigned Depth = 0) const;

2082

2083

2084

2085

2087 const APInt &DemandedElts,

2088 unsigned Depth = 0) const;

2089

2090

2091

2093 unsigned Depth = 0) const;

2094

2095

2096

2098 unsigned Depth = 0) const;

2099

2100

2102 const APInt &DemandedElts,

2103 unsigned Depth = 0) const;

2104

2105

2106

2107

2108

2109

2111

2112

2113

2114

2115

2116

2118 unsigned Depth = 0) const;

2119

2120

2121

2122

2123

2129

2130

2133

2134

2137

2138

2144

2145

2149

2150

2153

2154

2157

2158

2164

2165

2169

2170

2173

2174

2177

2178

2184

2185

2189

2190

2191

2192

2194

2195

2196

2198

2199

2200

2201

2202

2203

2204

2205

2207

2208

2209

2210

2211

2212

2213

2214

2215

2217 unsigned Depth = 0) const;

2218

2219

2220

2221

2222

2224 unsigned Depth = 0) const;

2225

2226

2227

2228

2229

2231 const APInt &DemandedElts,

2232 unsigned Depth = 0) const;

2233

2234

2235

2238 unsigned Depth = 0) const;

2239

2240

2241

2242

2244 const APInt &DemandedElts,

2246 unsigned Depth = 0) const;

2247

2248

2252

2253

2254

2256 unsigned Depth = 0) const {

2258 true, Depth);

2259 }

2260

2261

2262

2263

2264

2265

2266

2267

2268

2269

2272 bool ConsiderFlags = true,

2273 unsigned Depth = 0) const;

2274

2275

2276

2277

2278

2279

2280

2281

2282

2284 bool ConsiderFlags = true,

2285 unsigned Depth = 0) const;

2286

2287

2288

2289

2290

2291

2293

2294

2295

2296

2297

2298

2300

2301

2302

2303

2304

2306 bool SNaN = false, unsigned Depth = 0) const;

2307

2308

2309

2310

2312 unsigned Depth = 0) const;

2313

2314

2315

2317 unsigned Depth = 0) const {

2319 }

2320

2321

2325

2326

2327

2329

2330

2332

2333

2334

2336

2337

2338

2339

2341

2342

2343

2345

2346

2347

2348

2349

2350

2351

2352

2354 APInt &UndefElts, unsigned Depth = 0) const;

2355

2356

2358

2359

2361

2362

2363

2364

2365

2367

2368

2369

2370 LLVM_ABI std::optional

2372 unsigned Depth) const;

2373

2374

2375

2376 LLVM_ABI std::optional

2378 unsigned Depth = 0) const;

2379

2380

2381

2382 LLVM_ABI std::optional

2384

2385

2386

2387 LLVM_ABI std::optional

2389 unsigned Depth = 0) const;

2390

2391

2392

2393 LLVM_ABI std::optional

2395

2396

2397

2398 LLVM_ABI std::optional

2400 unsigned Depth = 0) const;

2401

2402

2403

2404 LLVM_ABI std::optional

2406

2407

2408

2409

2410

2411

2412

2413

2414

2417 bool AllowPartials = false);

2418

2419

2420

2421

2422

2423

2424

2426

2427

2428

2429 LLVM_ABI std::pair<SDValue, SDValue>

2431

2432

2433

2434

2435

2437 unsigned Bytes, int Dist) const;

2438

2439

2440

2442

2443

2444

2447 const EVT &LoVT,

2448 const EVT &HiVT);

2449

2450

2451

2453

2454

2455

2456

2458 const EVT &EnvVT,

2459 bool *HiIsEmpty) const;

2460

2461

2462

2465 const EVT &LoVT,

2466 const EVT &HiVT);

2467

2468

2470 EVT LoVT, HiVT;

2473 }

2474

2475

2478

2479

2480

2485

2486

2488

2489

2490

2491

2492

2495 unsigned Start = 0, unsigned Count = 0,

2497

2498

2500

2501

2504 bool AllowOpaques = true) const;

2505

2506

2508

2509

2510

2515

2516

2517

2519

2520

2524

2526 auto I = SDEI.find(Node);

2527 return I != SDEI.end() ? std::move(I->second).CSInfo : CallSiteInfo();

2528 }

2529

2531 SDEI[Node].HeapAllocSite = MD;

2532 }

2533

2535 auto I = SDEI.find(Node);

2536 return I != SDEI.end() ? I->second.HeapAllocSite : nullptr;

2537 }

2538

2540 SDEI[Node].PCSections = MD;

2541 }

2542

2544 SDEI[Node].MMRA = MMRA;

2545 }

2546

2548 auto It = SDEI.find(Node);

2549 return It != SDEI.end() ? It->second.PCSections : nullptr;

2550 }

2551

2552

2554 auto It = SDEI.find(Node);

2555 return It != SDEI.end() ? It->second.MMRA : nullptr;

2556 }

2557

2559 unsigned OpFlags) {

2560 SDEI[Node].CalledGlobal = {GV, OpFlags};

2561 }

2562

2564 auto I = SDEI.find(Node);

2565 return I != SDEI.end()

2566 ? std::make_optional(std::move(I->second).CalledGlobal)

2567 : std::nullopt;

2568 }

2569

2571 if (NoMerge)

2572 SDEI[Node].NoMerge = NoMerge;

2573 }

2574

2576 auto I = SDEI.find(Node);

2577 return I != SDEI.end() ? I->second.NoMerge : false;

2578 }

2579

2580

2582

2583

2584

2588

2590

2591

2594

2595

2596

2597

2599 switch (Opcode) {

2606 return false;

2607 default:

2608 return true;

2609 }

2610 }

2611

2612

2613

2614

2615

2617 switch (N->getOpcode()) {

2620 default:

2622 }

2623 }

2624

2627

2628private:

2629#ifndef NDEBUG

2630 void verifyNode(SDNode *N) const;

2631#endif

2632 void InsertNode(SDNode *N);

2633 bool RemoveNodeFromCSEMaps(SDNode *N);

2634 void AddModifiedNodeToCSEMaps(SDNode *N);

2637 void *&InsertPos);

2639 void *&InsertPos);

2641

2642 void DeleteNodeNotInCSEMaps(SDNode *N);

2643 void DeallocateNode(SDNode *N);

2644

2645 void allnodes_clear();

2646

2647

2648

2649

2650

2652

2653

2654

2655

2657 void *&InsertPos);

2658

2659

2660 std::vector<CondCodeSDNode*> CondCodeNodes;

2661

2662 std::vector<SDNode*> ValueTypeNodes;

2663 std::map<EVT, SDNode*, EVT::compareRawBits> ExtendedValueTypeNodes;

2665

2666 std::map<std::pair<std::string, unsigned>, SDNode *> TargetExternalSymbols;

2668

2669 FlagInserter *Inserter = nullptr;

2670};

2671

2683

2684}

2685

2686#endif

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

This file defines the StringMap class.

AMDGPU Uniform Intrinsic Combine

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

This file defines the BumpPtrAllocator interface.

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

static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

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

#define LLVM_DUMP_METHOD

Mark debug helper function definitions like dump() that should not be stripped from debug builds.

This file defines the DenseMap class.

This file defines the DenseSet and SmallDenseSet classes.

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

const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]

const SmallVectorImpl< MachineOperand > & Cond

This file defines the SmallVector class.

static TableGen::Emitter::Opt Y("gen-skeleton-entry", EmitSkeleton, "Generate example skeleton entry")

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

static void removeOperands(MachineInstr &MI, unsigned i)

Class for arbitrary precision integers.

static Capacity get(size_t N)

Get the capacity of an array that can hold at least N elements.

Recycle small arrays allocated from a BumpPtrAllocator.

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

This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR ch...

The address of a basic block.

BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...

A "pseudo-class" with methods for operating on BUILD_VECTORs.

This class represents a function call, abstracting a target machine's calling convention.

ConstantFP - Floating Point Values [float, double].

This is the shared class of boolean and integer constants.

This is an important base class in LLVM.

Base class for variables.

A parsed version of the target data layout string in and methods for querying it.

Implements a dense probed hash-table based set.

FoldingSetNodeIDRef - This class describes a reference to an interned FoldingSetNodeID,...

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

FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...

FunctionLoweringInfo - This contains information that is global to a function that is used when lower...

Data structure describing the variable locations in a function.

This is an important class for using LLVM in a threaded context.

This class is used to represent ISD::LOAD nodes.

static LocationSize precise(uint64_t Value)

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

Abstract base class for all machine specific constantpool value subclasses.

A description of a memory reference used in the backend.

Flags

Flags values. These may be or'd together.

@ MOLoad

The memory access reads data.

@ MOStore

The memory access writes data.

This class contains meta information specific to a module.

An SDNode that represents everything that will be needed to construct a MachineInstr.

Pass interface - Implemented by all 'passes'.

Analysis providing profile information.

RecyclingAllocator - This class wraps an Allocator, adding the functionality of recycling deleted obj...

Wrapper class representing virtual and physical registers.

Keeps track of dbg_value information through SDISel.

Definition SelectionDAG.h:163

BumpPtrAllocator & getAlloc()

Definition SelectionDAG.h:192

DbgIterator ByvalParmDbgBegin()

Definition SelectionDAG.h:210

DbgIterator DbgEnd()

Definition SelectionDAG.h:209

SDDbgInfo & operator=(const SDDbgInfo &)=delete

SmallVectorImpl< SDDbgLabel * >::iterator DbgLabelIterator

Definition SelectionDAG.h:206

LLVM_ABI void add(SDDbgValue *V, bool isParameter)

bool empty() const

Definition SelectionDAG.h:194

void clear()

Definition SelectionDAG.h:184

DbgLabelIterator DbgLabelEnd()

Definition SelectionDAG.h:213

DbgIterator ByvalParmDbgEnd()

Definition SelectionDAG.h:211

SmallVectorImpl< SDDbgValue * >::iterator DbgIterator

Definition SelectionDAG.h:205

SDDbgInfo(const SDDbgInfo &)=delete

DbgLabelIterator DbgLabelBegin()

Definition SelectionDAG.h:212

void add(SDDbgLabel *L)

Definition SelectionDAG.h:178

DbgIterator DbgBegin()

Definition SelectionDAG.h:208

LLVM_ABI void erase(const SDNode *Node)

Invalidate all DbgValues attached to the node and remove it from the Node-to-DbgValues map.

ArrayRef< SDDbgValue * > getSDDbgValues(const SDNode *Node) const

Definition SelectionDAG.h:198

Holds the information from a dbg_label node through SDISel.

Holds the information for a single machine location through SDISel; either an SDNode,...

Holds the information from a dbg_value node through SDISel.

Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...

Represents one node in the SelectionDAG.

Definition SelectionDAG.h:100

SDVTListNode(const FoldingSetNodeIDRef ID, const EVT *VT, unsigned int Num)

Definition SelectionDAG.h:116

SDVTList getSDVTList()

Definition SelectionDAG.h:121

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

SDNode * getNode() const

get the SDNode which holds the desired result

EVT getValueType() const

Return the ValueType of the referenced return value.

Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...

Help to insert SDNodeFlags automatically in transforming.

Definition SelectionDAG.h:372

SDNodeFlags getFlags() const

Definition SelectionDAG.h:390

~FlagInserter()

Definition SelectionDAG.h:388

FlagInserter(SelectionDAG &SDAG, SDNodeFlags Flags)

Definition SelectionDAG.h:378

FlagInserter(const FlagInserter &)=delete

FlagInserter(SelectionDAG &SDAG, SDNode *N)

Definition SelectionDAG.h:383

FlagInserter & operator=(const FlagInserter &)=delete

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

Definition SelectionDAG.h:229

LLVM_ABI SDValue getElementCount(const SDLoc &DL, EVT VT, ElementCount EC)

bool willNotOverflowAdd(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the addition of 2 nodes can never overflow.

Definition SelectionDAG.h:2146

static unsigned getOpcode_EXTEND_VECTOR_INREG(unsigned Opcode)

Convert *_EXTEND to *_EXTEND_VECTOR_INREG opcode.

Definition SelectionDAG.h:997

LLVM_ABI Align getReducedAlign(EVT VT, bool UseABI)

In most cases this function returns the ABI alignment for a given type, except for illegal vector typ...

LLVM_ABI SDValue getVPZeroExtendInReg(SDValue Op, SDValue Mask, SDValue EVL, const SDLoc &DL, EVT VT)

Return the expression required to zero extend the Op value assuming it was the smaller SrcTy value.

LLVM_ABI SDValue getShiftAmountOperand(EVT LHSTy, SDValue Op)

Return the specified value casted to the target's desired shift amount type.

LLVM_ABI SDValue getExtLoad(ISD::LoadExtType ExtType, const SDLoc &dl, EVT VT, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, EVT MemVT, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())

LLVM_ABI SDValue getExtLoadVP(ISD::LoadExtType ExtType, const SDLoc &dl, EVT VT, SDValue Chain, SDValue Ptr, SDValue Mask, SDValue EVL, MachinePointerInfo PtrInfo, EVT MemVT, MaybeAlign Alignment, MachineMemOperand::Flags MMOFlags, const AAMDNodes &AAInfo, bool IsExpanding=false)

SDValue getTargetGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, int64_t offset=0, unsigned TargetFlags=0)

Definition SelectionDAG.h:758

SDValue getExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT, unsigned Opcode)

Convert Op, which must be of integer type, to the integer type VT, by either any/sign/zero-extending ...

Definition SelectionDAG.h:1027

SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, Register Reg, EVT VT, SDValue Glue)

Definition SelectionDAG.h:850

SDValue getExtractVectorElt(const SDLoc &DL, EVT VT, SDValue Vec, unsigned Idx)

Extract element at Idx from Vec.

Definition SelectionDAG.h:943

LLVM_ABI SDValue getSplatSourceVector(SDValue V, int &SplatIndex)

If V is a splatted value, return the source vector and its splat index.

LLVM_ABI SDValue getLabelNode(unsigned Opcode, const SDLoc &dl, SDValue Root, MCSymbol *Label)

LLVM_ABI OverflowKind computeOverflowForUnsignedSub(SDValue N0, SDValue N1) const

Determine if the result of the unsigned sub of 2 nodes can overflow.

LLVM_ABI unsigned ComputeMaxSignificantBits(SDValue Op, unsigned Depth=0) const

Get the upper bound on bit size for this Value Op as a signed integer.

const SDValue & getRoot() const

Return the root tag of the SelectionDAG.

Definition SelectionDAG.h:578

LLVM_ABI std::pair< SDValue, SDValue > getStrlen(SDValue Chain, const SDLoc &dl, SDValue Src, const CallInst *CI)

Lower a strlen operation into a target library call and return the resulting chain and call result as...

LLVM_ABI SDValue getMaskedGather(SDVTList VTs, EVT MemVT, const SDLoc &dl, ArrayRef< SDValue > Ops, MachineMemOperand *MMO, ISD::MemIndexType IndexType, ISD::LoadExtType ExtTy)

bool isKnownNeverSNaN(SDValue Op, unsigned Depth=0) const

Definition SelectionDAG.h:2322

LLVM_ABI SDValue getAddrSpaceCast(const SDLoc &dl, EVT VT, SDValue Ptr, unsigned SrcAS, unsigned DestAS)

Return an AddrSpaceCastSDNode.

bool isKnownNeverSNaN(SDValue Op, const APInt &DemandedElts, unsigned Depth=0) const

Definition SelectionDAG.h:2316

LLVM_ABI std::optional< bool > isBoolConstant(SDValue N) const

Check if a value \op N is a constant using the target's BooleanContent for its type.

LLVM_ABI SDValue getStackArgumentTokenFactor(SDValue Chain)

Compute a TokenFactor to force all the incoming stack arguments to be loaded from the stack.

const TargetSubtargetInfo & getSubtarget() const

Definition SelectionDAG.h:500

SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, Register Reg, SDValue N)

Definition SelectionDAG.h:815

const Pass * getPass() const

Definition SelectionDAG.h:494

LLVM_ABI SDValue getMergeValues(ArrayRef< SDValue > Ops, const SDLoc &dl)

Create a MERGE_VALUES node from the given operands.

LLVM_ABI SDVTList getVTList(EVT VT)

Return an SDVTList that represents the list of values specified.

OptimizationRemarkEmitter & getORE() const

Definition SelectionDAG.h:512

BlockFrequencyInfo * getBFI() const

Definition SelectionDAG.h:514

LLVM_ABI SDValue getShiftAmountConstant(uint64_t Val, EVT VT, const SDLoc &DL)

LLVM_ABI void updateDivergence(SDNode *N)

LLVM_ABI SDValue getSplatValue(SDValue V, bool LegalTypes=false)

If V is a splat vector, return its scalar source operand by extracting that element from the source v...

LLVM_ABI SDValue FoldSetCC(EVT VT, SDValue N1, SDValue N2, ISD::CondCode Cond, const SDLoc &dl)

Constant fold a setcc to true or false.

LLVM_ABI SDValue getAllOnesConstant(const SDLoc &DL, EVT VT, bool IsTarget=false, bool IsOpaque=false)

LLVM_ABI MachineSDNode * getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT)

These are used for target selectors to create a new node with specified return type(s),...

LLVM_ABI void ExtractVectorElements(SDValue Op, SmallVectorImpl< SDValue > &Args, unsigned Start=0, unsigned Count=0, EVT EltVT=EVT())

Append the extracted elements from Start to Count out of the vector Op in Args.

LLVM_ABI SDValue getNeutralElement(unsigned Opcode, const SDLoc &DL, EVT VT, SDNodeFlags Flags)

Get the (commutative) neutral element for the given opcode, if it exists.

LLVM_ABI SDValue getAtomicMemset(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Value, SDValue Size, Type *SizeTy, unsigned ElemSz, bool isTailCall, MachinePointerInfo DstPtrInfo)

LLVM_ABI SDValue getAtomicLoad(ISD::LoadExtType ExtType, const SDLoc &dl, EVT MemVT, EVT VT, SDValue Chain, SDValue Ptr, MachineMemOperand *MMO)

LLVM_ABI bool LegalizeVectors()

This transforms the SelectionDAG into a SelectionDAG that only uses vector math operations supported ...

LLVM_ABI SDNode * getNodeIfExists(unsigned Opcode, SDVTList VTList, ArrayRef< SDValue > Ops, const SDNodeFlags Flags, bool AllowCommute=false)

Get the specified node if it's already available, or else return NULL.

SDValue getTargetConstantFP(const APFloat &Val, const SDLoc &DL, EVT VT)

Definition SelectionDAG.h:746

LLVM_ABI SDValue getPseudoProbeNode(const SDLoc &Dl, SDValue Chain, uint64_t Guid, uint64_t Index, uint32_t Attr)

Creates a PseudoProbeSDNode with function GUID Guid and the index of the block Index it is probing,...

LLVM_ABI SDValue getFreeze(SDValue V)

Return a freeze using the SDLoc of the value operand.

LLVM_ABI SDNode * SelectNodeTo(SDNode *N, unsigned MachineOpc, EVT VT)

These are used for target selectors to mutate the specified node to have the specified return type,...

LLVM_ABI SelectionDAG(const TargetMachine &TM, CodeGenOptLevel)

LLVM_ABI SDValue getMemset(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVol, bool AlwaysInline, const CallInst *CI, MachinePointerInfo DstPtrInfo, const AAMDNodes &AAInfo=AAMDNodes())

LLVM_ABI SDValue getBitcastedSExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by first bitcasting (from potentia...

LLVM_ABI SDValue getConstantPool(const Constant *C, EVT VT, MaybeAlign Align=std::nullopt, int Offs=0, bool isT=false, unsigned TargetFlags=0)

LLVM_ABI SDValue getStridedLoadVP(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, const SDLoc &DL, SDValue Chain, SDValue Ptr, SDValue Offset, SDValue Stride, SDValue Mask, SDValue EVL, EVT MemVT, MachineMemOperand *MMO, bool IsExpanding=false)

SDDbgInfo::DbgIterator ByvalParmDbgEnd() const

Definition SelectionDAG.h:2011

LLVM_ABI SDValue getAtomicCmpSwap(unsigned Opcode, const SDLoc &dl, EVT MemVT, SDVTList VTs, SDValue Chain, SDValue Ptr, SDValue Cmp, SDValue Swp, MachineMemOperand *MMO)

Gets a node for an atomic cmpxchg op.

MachineModuleInfo * getMMI() const

Definition SelectionDAG.h:515

LLVM_ABI SDValue makeEquivalentMemoryOrdering(SDValue OldChain, SDValue NewMemOpChain)

If an existing load has uses of its chain, create a token factor node with that chain and the new mem...

LLVM_ABI bool isConstantIntBuildVectorOrConstantInt(SDValue N, bool AllowOpaques=true) const

Test whether the given value is a constant int or similar node.

LLVM_ABI void ReplaceAllUsesOfValuesWith(const SDValue *From, const SDValue *To, unsigned Num)

Like ReplaceAllUsesOfValueWith, but for multiple values at once.

LLVM_ABI SDValue getJumpTableDebugInfo(int JTI, SDValue Chain, const SDLoc &DL)

SDValue getSetCC(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond, SDValue Chain=SDValue(), bool IsSignaling=false)

Helper function to make it easier to build SetCC's if you just have an ISD::CondCode instead of an SD...

Definition SelectionDAG.h:1332

LLVM_ABI SDValue getSymbolFunctionGlobalAddress(SDValue Op, Function **TargetFunction=nullptr)

Return a GlobalAddress of the function from the current module with name matching the given ExternalS...

bool isSafeToSpeculativelyExecute(unsigned Opcode) const

Some opcodes may create immediate undefined behavior when used with some values (integer division-by-...

Definition SelectionDAG.h:2598

void addMMRAMetadata(const SDNode *Node, MDNode *MMRA)

Set MMRAMetadata to be associated with Node.

Definition SelectionDAG.h:2543

LLVM_ABI std::optional< unsigned > getValidMaximumShiftAmount(SDValue V, const APInt &DemandedElts, unsigned Depth=0) const

If a SHL/SRA/SRL node V has shift amounts that are all less than the element bit-width of the shift n...

OverflowKind computeOverflowForSub(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the sub of 2 nodes can overflow.

Definition SelectionDAG.h:2159

void init(MachineFunction &NewMF, OptimizationRemarkEmitter &NewORE, MachineFunctionAnalysisManager &AM, const TargetLibraryInfo *LibraryInfo, UniformityInfo *UA, ProfileSummaryInfo *PSIin, BlockFrequencyInfo *BFIin, MachineModuleInfo &MMI, FunctionVarLocs const *FnVarLocs)

Definition SelectionDAG.h:476

LLVM_ABI SDValue UnrollVectorOp(SDNode *N, unsigned ResNE=0)

Utility function used by legalize and lowering to "unroll" a vector operation by splitting out the sc...

SDDbgInfo::DbgIterator ByvalParmDbgBegin() const

Definition SelectionDAG.h:2008

LLVM_ABI SDValue getVScale(const SDLoc &DL, EVT VT, APInt MulImm)

Return a node that represents the runtime scaling 'MulImm * RuntimeVL'.

void setFunctionLoweringInfo(FunctionLoweringInfo *FuncInfo)

Definition SelectionDAG.h:485

LLVM_ABI SDValue getConstantFP(double Val, const SDLoc &DL, EVT VT, bool isTarget=false)

Create a ConstantFPSDNode wrapping a constant value.

OverflowKind

Used to represent the possible overflow behavior of an operation.

Definition SelectionDAG.h:2124

@ OFK_Never

Definition SelectionDAG.h:2125

@ OFK_Sometime

Definition SelectionDAG.h:2126

@ OFK_Always

Definition SelectionDAG.h:2127

static LLVM_ABI unsigned getHasPredecessorMaxSteps()

LLVM_ABI bool haveNoCommonBitsSet(SDValue A, SDValue B) const

Return true if A and B have no common bits set.

SDValue getExtractSubvector(const SDLoc &DL, EVT VT, SDValue Vec, unsigned Idx)

Return the VT typed sub-vector of Vec at Idx.

Definition SelectionDAG.h:965

LLVM_ABI bool cannotBeOrderedNegativeFP(SDValue Op) const

Test whether the given float value is known to be positive.

LLVM_ABI SDValue getRegister(Register Reg, EVT VT)

LLVM_ABI bool calculateDivergence(SDNode *N)

LLVM_ABI SDValue getGetFPEnv(SDValue Chain, const SDLoc &dl, SDValue Ptr, EVT MemVT, MachineMemOperand *MMO)

LLVM_ABI SDValue getAssertAlign(const SDLoc &DL, SDValue V, Align A)

Return an AssertAlignSDNode.

LLVM_ABI SDNode * mutateStrictFPToFP(SDNode *Node)

Mutate the specified strict FP node to its non-strict equivalent, unlinking the node from its chain a...

LLVM_ABI SDValue getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr)

Loads are not normal binary operators: their result type is not determined by their operands,...

SDValue getGLOBAL_OFFSET_TABLE(EVT VT)

Return a GLOBAL_OFFSET_TABLE node. This does not have a useful SDLoc.

Definition SelectionDAG.h:1202

LLVM_ABI bool SignBitIsZeroFP(SDValue Op, unsigned Depth=0) const

Return true if the sign bit of Op is known to be zero, for a floating-point value.

LLVM_ABI SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, ArrayRef< SDValue > Ops, EVT MemVT, MachinePointerInfo PtrInfo, Align Alignment, MachineMemOperand::Flags Flags=MachineMemOperand::MOLoad|MachineMemOperand::MOStore, LocationSize Size=LocationSize::precise(0), const AAMDNodes &AAInfo=AAMDNodes())

Creates a MemIntrinsicNode that may produce a result and takes a list of operands.

SDValue getInsertSubvector(const SDLoc &DL, SDValue Vec, SDValue SubVec, unsigned Idx)

Insert SubVec at the Idx element of Vec.

Definition SelectionDAG.h:958

LLVM_ABI SDValue getBitcastedZExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by first bitcasting (from potentia...

SelectionDAG(const SelectionDAG &)=delete

LLVM_ABI SDValue getStepVector(const SDLoc &DL, EVT ResVT, const APInt &StepVal)

Returns a vector of type ResVT whose elements contain the linear sequence <0, Step,...

bool willNotOverflowSub(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the sub of 2 nodes can never overflow.

Definition SelectionDAG.h:2166

LLVM_ABI SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, SDValue Chain, SDValue Ptr, SDValue Val, MachineMemOperand *MMO)

Gets a node for an atomic op, produces result (if relevant) and chain and takes 2 operands.

LLVM_ABI SDValue getMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVol, bool AlwaysInline, const CallInst *CI, std::optional< bool > OverrideTailCall, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo, const AAMDNodes &AAInfo=AAMDNodes(), BatchAAResults *BatchAA=nullptr)

LLVM_ABI Align getEVTAlign(EVT MemoryVT) const

Compute the default alignment value for the given type.

void addNoMergeSiteInfo(const SDNode *Node, bool NoMerge)

Set NoMergeSiteInfo to be associated with Node if NoMerge is true.

Definition SelectionDAG.h:2570

LLVM_ABI bool shouldOptForSize() const

std::pair< SDValue, SDValue > SplitVectorOperand(const SDNode *N, unsigned OpNo)

Split the node's operand with EXTRACT_SUBVECTOR and return the low/high part.

Definition SelectionDAG.h:2481

LLVM_ABI SDValue getNOT(const SDLoc &DL, SDValue Val, EVT VT)

Create a bitwise NOT operation as (XOR Val, -1).

LLVM_ABI SDValue getVPZExtOrTrunc(const SDLoc &DL, EVT VT, SDValue Op, SDValue Mask, SDValue EVL)

Convert a vector-predicated Op, which must be an integer vector, to the vector-type VT,...

const STC & getSubtarget() const

Definition SelectionDAG.h:501

SDValue getLoad(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue Offset, MachinePointerInfo PtrInfo, EVT MemVT, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr)

Definition SelectionDAG.h:1495

const TargetLowering & getTargetLoweringInfo() const

Definition SelectionDAG.h:504

LLVM_ABI bool isEqualTo(SDValue A, SDValue B) const

Test whether two SDValues are known to compare equal.

std::optional< CalledGlobalInfo > getCalledGlobal(const SDNode *Node)

Return CalledGlobal associated with Node, or a nullopt if none exists.

Definition SelectionDAG.h:2563

static constexpr unsigned MaxRecursionDepth

Definition SelectionDAG.h:459

LLVM_ABI SDValue getStridedStoreVP(SDValue Chain, const SDLoc &DL, SDValue Val, SDValue Ptr, SDValue Offset, SDValue Stride, SDValue Mask, SDValue EVL, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexedMode AM, bool IsTruncating=false, bool IsCompressing=false)

bool isGuaranteedNotToBePoison(SDValue Op, unsigned Depth=0) const

Return true if this function can prove that Op is never poison.

Definition SelectionDAG.h:2249

LLVM_ABI SDValue expandVACopy(SDNode *Node)

Expand the specified ISD::VACOPY node as the Legalize pass would.

LLVM_ABI SDValue getIndexedMaskedLoad(SDValue OrigLoad, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI void dump(bool Sorted=false) const

Dump the textual format of this DAG.

SelectionDAG & operator=(const SelectionDAG &)=delete

SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, ArrayRef< SDValue > Ops, EVT MemVT, MachinePointerInfo PtrInfo, MaybeAlign Alignment=std::nullopt, MachineMemOperand::Flags Flags=MachineMemOperand::MOLoad|MachineMemOperand::MOStore, LocationSize Size=LocationSize::precise(0), const AAMDNodes &AAInfo=AAMDNodes())

Definition SelectionDAG.h:1432

SDValue getTargetConstant(const APInt &Val, const SDLoc &DL, EVT VT, bool isOpaque=false)

Definition SelectionDAG.h:711

LLVM_ABI APInt computeVectorKnownZeroElements(SDValue Op, const APInt &DemandedElts, unsigned Depth=0) const

For each demanded element of a vector, see if it is known to be zero.

LLVM_ABI void AddDbgValue(SDDbgValue *DB, bool isParameter)

Add a dbg_value SDNode.

bool NewNodesMustHaveLegalTypes

When true, additional steps are taken to ensure that getConstant() and similar functions return DAG n...

Definition SelectionDAG.h:398

LLVM_ABI std::pair< EVT, EVT > GetSplitDestVTs(const EVT &VT) const

Compute the VTs needed for the low/hi parts of a type which is split (or expanded) into two not neces...

MDNode * getHeapAllocSite(const SDNode *Node) const

Return HeapAllocSite associated with Node, or nullptr if none exists.

Definition SelectionDAG.h:2534

LLVM_ABI void salvageDebugInfo(SDNode &N)

To be invoked on an SDNode that is slated to be erased.

LLVM_ABI SDNode * MorphNodeTo(SDNode *N, unsigned Opc, SDVTList VTs, ArrayRef< SDValue > Ops)

This mutates the specified node to have the specified return type, opcode, and operands.

SDValue getTargetJumpTable(int JTI, EVT VT, unsigned TargetFlags=0)

Definition SelectionDAG.h:769

MDNode * getMMRAMetadata(const SDNode *Node) const

Return the MMRA MDNode associated with Node, or nullptr if none exists.

Definition SelectionDAG.h:2553

SDValue getLoadVP(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue Offset, SDValue Mask, SDValue EVL, MachinePointerInfo PtrInfo, EVT MemVT, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr, bool IsExpanding=false)

Definition SelectionDAG.h:1565

LLVM_ABI std::pair< SDValue, SDValue > UnrollVectorOverflowOp(SDNode *N, unsigned ResNE=0)

Like UnrollVectorOp(), but for the [US](ADD|SUB|MUL)O family of opcodes.

allnodes_const_iterator allnodes_begin() const

Definition SelectionDAG.h:558

SDValue getUNDEF(EVT VT)

Return an UNDEF node. UNDEF does not have a useful SDLoc.

Definition SelectionDAG.h:1181

SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue InGlue, const SDLoc &DL)

Return a new CALLSEQ_END node, which always must have a glue result (to ensure it's not CSE'd).

Definition SelectionDAG.h:1158

LLVM_ABI SDValue getGatherVP(SDVTList VTs, EVT VT, const SDLoc &dl, ArrayRef< SDValue > Ops, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

SDValue getBuildVector(EVT VT, const SDLoc &DL, ArrayRef< SDValue > Ops)

Return an ISD::BUILD_VECTOR node.

Definition SelectionDAG.h:870

LLVM_ABI SDValue getBitcastedAnyExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by first bitcasting (from potentia...

allnodes_const_iterator allnodes_end() const

Definition SelectionDAG.h:559

LLVM_ABI bool isSplatValue(SDValue V, const APInt &DemandedElts, APInt &UndefElts, unsigned Depth=0) const

Test whether V has a splatted value for all the demanded elements.

LLVM_ABI void DeleteNode(SDNode *N)

Remove the specified node from the system.

LLVM_ABI SDValue getBitcast(EVT VT, SDValue V)

Return a bitcast using the SDLoc of the value operand, and casting to the provided type.

LLVM_ABI SDDbgValue * getDbgValueList(DIVariable *Var, DIExpression *Expr, ArrayRef< SDDbgOperand > Locs, ArrayRef< SDNode * > Dependencies, bool IsIndirect, const DebugLoc &DL, unsigned O, bool IsVariadic)

Creates a SDDbgValue node from a list of locations.

SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, Register Reg, EVT VT)

Definition SelectionDAG.h:841

SDValue getSelect(const SDLoc &DL, EVT VT, SDValue Cond, SDValue LHS, SDValue RHS, SDNodeFlags Flags=SDNodeFlags())

Helper function to make it easier to build Select's if you just have operands and don't want to check...

Definition SelectionDAG.h:1361

SDDbgInfo::DbgIterator DbgEnd() const

Definition SelectionDAG.h:2006

LLVM_ABI SDValue getNegative(SDValue Val, const SDLoc &DL, EVT VT)

Create negative operation as (SUB 0, Val).

LLVM_ABI std::optional< unsigned > getValidShiftAmount(SDValue V, const APInt &DemandedElts, unsigned Depth=0) const

If a SHL/SRA/SRL node V has a uniform shift amount that is less than the element bit-width of the shi...

LLVM_ABI void setNodeMemRefs(MachineSDNode *N, ArrayRef< MachineMemOperand * > NewMemRefs)

Mutate the specified machine node's memory references to the provided list.

LLVM_ABI SDValue simplifySelect(SDValue Cond, SDValue TVal, SDValue FVal)

Try to simplify a select/vselect into 1 of its operands or a constant.

CallSiteInfo getCallSiteInfo(const SDNode *Node)

Return CallSiteInfo associated with Node, or a default if none exists.

Definition SelectionDAG.h:2525

LLVM_ABI SDValue getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT)

Return the expression required to zero extend the Op value assuming it was the smaller SrcTy value.

LLVM_ABI bool isConstantFPBuildVectorOrConstantFP(SDValue N) const

Test whether the given value is a constant FP or similar node.

const DataLayout & getDataLayout() const

Definition SelectionDAG.h:498

allnodes_iterator allnodes_begin()

Definition SelectionDAG.h:563

iterator_range< allnodes_const_iterator > allnodes() const

Definition SelectionDAG.h:573

MDNode * getPCSections(const SDNode *Node) const

Return PCSections associated with Node, or nullptr if none exists.

Definition SelectionDAG.h:2547

ProfileSummaryInfo * getPSI() const

Definition SelectionDAG.h:513

LLVM_ABI SDValue expandVAArg(SDNode *Node)

Expand the specified ISD::VAARG node as the Legalize pass would.

SDValue getTargetFrameIndex(int FI, EVT VT)

Definition SelectionDAG.h:764

LLVM_ABI void Legalize()

This transforms the SelectionDAG into a SelectionDAG that is compatible with the target instruction s...

LLVM_ABI SDValue getTokenFactor(const SDLoc &DL, SmallVectorImpl< SDValue > &Vals)

Creates a new TokenFactor containing Vals.

LLVM_ABI void setGraphAttrs(const SDNode *N, const char *Attrs)

Set graph attributes for a node. (eg. "color=red".)

SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, SDValue Reg, SDValue N, SDValue Glue)

Definition SelectionDAG.h:833

LLVM_ABI bool LegalizeOp(SDNode *N, SmallSetVector< SDNode *, 16 > &UpdatedNodes)

Transforms a SelectionDAG node and any operands to it into a node that is compatible with the target ...

LLVM_ABI bool doesNodeExist(unsigned Opcode, SDVTList VTList, ArrayRef< SDValue > Ops)

Check if a node exists without modifying its flags.

void addHeapAllocSite(const SDNode *Node, MDNode *MD)

Set HeapAllocSite to be associated with Node.

Definition SelectionDAG.h:2530

const SelectionDAGTargetInfo & getSelectionDAGInfo() const

Definition SelectionDAG.h:506

LLVM_ABI bool areNonVolatileConsecutiveLoads(LoadSDNode *LD, LoadSDNode *Base, unsigned Bytes, int Dist) const

Return true if loads are next to each other and can be merged.

LLVM_ABI SDValue getMaskedHistogram(SDVTList VTs, EVT MemVT, const SDLoc &dl, ArrayRef< SDValue > Ops, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

LLVM_ABI SDDbgLabel * getDbgLabel(DILabel *Label, const DebugLoc &DL, unsigned O)

Creates a SDDbgLabel node.

SDValue getTargetConstant(const ConstantInt &Val, const SDLoc &DL, EVT VT, bool isOpaque=false)

Definition SelectionDAG.h:715

LLVM_ABI SDValue getStoreVP(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, SDValue Offset, SDValue Mask, SDValue EVL, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexedMode AM, bool IsTruncating=false, bool IsCompressing=false)

std::pair< SDValue, SDValue > SplitVector(const SDValue &N, const SDLoc &DL)

Split the vector with EXTRACT_SUBVECTOR and return the low/high part.

Definition SelectionDAG.h:2469

LLVM_ABI OverflowKind computeOverflowForUnsignedMul(SDValue N0, SDValue N1) const

Determine if the result of the unsigned mul of 2 nodes can overflow.

SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, Register Reg, SDValue N, SDValue Glue)

Definition SelectionDAG.h:824

LLVM_ABI void copyExtraInfo(SDNode *From, SDNode *To)

Copy extra info associated with one node to another.

LLVM_ABI SDValue getConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isTarget=false, bool isOpaque=false)

Create a ConstantSDNode wrapping a constant value.

LLVM_ABI void setGraphColor(const SDNode *N, const char *Color)

Convenience for setting node color attribute.

SDValue getStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())

Definition SelectionDAG.h:1521

LLVM_ABI SDValue getMemBasePlusOffset(SDValue Base, TypeSize Offset, const SDLoc &DL, const SDNodeFlags Flags=SDNodeFlags())

Returns sum of the base pointer and offset.

LLVM_ABI SDValue getGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, int64_t offset=0, bool isTargetGA=false, unsigned TargetFlags=0)

bool willNotOverflowMul(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the mul of 2 nodes can never overflow.

Definition SelectionDAG.h:2186

SDValue getSignedTargetConstant(int64_t Val, const SDLoc &DL, EVT VT, bool isOpaque=false)

Definition SelectionDAG.h:719

LLVM_ABI SDValue getVAArg(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue SV, unsigned Align)

VAArg produces a result and token chain, and takes a pointer and a source value as input.

OverflowKind computeOverflowForMul(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the mul of 2 nodes can overflow.

Definition SelectionDAG.h:2179

LLVM_ABI SDValue getTruncStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, EVT SVT, Align Alignment, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())

LLVM_ABI SDValue getLoadFFVP(EVT VT, const SDLoc &DL, SDValue Chain, SDValue Ptr, SDValue Mask, SDValue EVL, MachineMemOperand *MMO)

LLVM_ABI SDValue getTypeSize(const SDLoc &DL, EVT VT, TypeSize TS)

LLVM_ABI SDValue getMDNode(const MDNode *MD)

Return an MDNodeSDNode which holds an MDNode.

LLVM_ABI void clear()

Clear state and free memory necessary to make this SelectionDAG ready to process a new block.

SDValue getCALLSEQ_END(SDValue Chain, uint64_t Size1, uint64_t Size2, SDValue Glue, const SDLoc &DL)

Definition SelectionDAG.h:1170

LLVM_ABI std::pair< SDValue, SDValue > getMemcmp(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, const CallInst *CI)

Lower a memcmp operation into a target library call and return the resulting chain and call result as...

LLVM_ABI void ReplaceAllUsesWith(SDValue From, SDValue To)

Modify anything using 'From' to use 'To' instead.

LLVM_ABI SDValue getCommutedVectorShuffle(const ShuffleVectorSDNode &SV)

Returns an ISD::VECTOR_SHUFFLE node semantically equivalent to the shuffle node in input but with swa...

LLVM_ABI std::pair< SDValue, SDValue > SplitVector(const SDValue &N, const SDLoc &DL, const EVT &LoVT, const EVT &HiVT)

Split the vector with EXTRACT_SUBVECTOR using the provided VTs and return the low/high part.

LLVM_ABI SDValue makeStateFunctionCall(unsigned LibFunc, SDValue Ptr, SDValue InChain, const SDLoc &DLoc)

Helper used to make a call to a library function that has one argument of pointer type.

LLVM_ABI bool isGuaranteedNotToBeUndefOrPoison(SDValue Op, bool PoisonOnly=false, unsigned Depth=0) const

Return true if this function can prove that Op is never poison and, if PoisonOnly is false,...

LLVM_ABI SDValue getStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, Align Alignment, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())

Helper function to build ISD::STORE nodes.

LLVM_ABI SDValue getSignedConstant(int64_t Val, const SDLoc &DL, EVT VT, bool isTarget=false, bool isOpaque=false)

LLVM_ABI SDValue getIndexedLoadVP(SDValue OrigLoad, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI SDValue getSrcValue(const Value *v)

Construct a node to track a Value* through the backend.

SDValue getSplatVector(EVT VT, const SDLoc &DL, SDValue Op)

Definition SelectionDAG.h:904

LLVM_ABI SDValue getAtomicMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, Type *SizeTy, unsigned ElemSz, bool isTailCall, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)

LLVM_ABI OverflowKind computeOverflowForSignedMul(SDValue N0, SDValue N1) const

Determine if the result of the signed mul of 2 nodes can overflow.

LLVM_ABI MaybeAlign InferPtrAlign(SDValue Ptr) const

Infer alignment of a load / store address.

FlagInserter * getFlagInserter()

Definition SelectionDAG.h:517

LLVM_ABI bool MaskedValueIsAllOnes(SDValue Op, const APInt &Mask, unsigned Depth=0) const

Return true if '(Op & Mask) == Mask'.

SDValue getCALLSEQ_START(SDValue Chain, uint64_t InSize, uint64_t OutSize, const SDLoc &DL)

Return a new CALLSEQ_START node, that starts new call frame, in which InSize bytes are set up inside ...

Definition SelectionDAG.h:1146

bool hasDebugValues() const

Return true if there are any SDDbgValue nodes associated with this SelectionDAG.

Definition SelectionDAG.h:2003

LLVM_ABI bool SignBitIsZero(SDValue Op, unsigned Depth=0) const

Return true if the sign bit of Op is known to be zero.

LLVM_ABI void RemoveDeadNodes()

This method deletes all unreachable nodes in the SelectionDAG.

LLVM_ABI void RemoveDeadNode(SDNode *N)

Remove the specified node from the system.

LLVM_ABI void viewGraph()

SDValue getBuildVector(EVT VT, const SDLoc &DL, ArrayRef< SDUse > Ops)

Return an ISD::BUILD_VECTOR node.

Definition SelectionDAG.h:879

LLVM_ABI void AddDbgLabel(SDDbgLabel *DB)

Add a dbg_label SDNode.

bool isConstantValueOfAnyType(SDValue N) const

Definition SelectionDAG.h:2511

SDDbgInfo::DbgLabelIterator DbgLabelEnd() const

Definition SelectionDAG.h:2018

SDValue getTruncStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, EVT SVT, MaybeAlign Alignment=MaybeAlign(), MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())

Definition SelectionDAG.h:1537

allnodes_iterator allnodes_end()

Definition SelectionDAG.h:564

SDDbgInfo::DbgLabelIterator DbgLabelBegin() const

Definition SelectionDAG.h:2015

SDValue getInsertVectorElt(const SDLoc &DL, SDValue Vec, SDValue Elt, unsigned Idx)

Insert Elt into Vec at offset Idx.

Definition SelectionDAG.h:951

LLVM_ABI SDValue getTargetExtractSubreg(int SRIdx, const SDLoc &DL, EVT VT, SDValue Operand)

A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes.

LLVM_ABI SDValue getBasicBlock(MachineBasicBlock *MBB)

SDValue getSelectCC(const SDLoc &DL, SDValue LHS, SDValue RHS, SDValue True, SDValue False, ISD::CondCode Cond, SDNodeFlags Flags=SDNodeFlags())

Helper function to make it easier to build SelectCC's if you just have an ISD::CondCode instead of an...

Definition SelectionDAG.h:1371

MachineFunctionAnalysisManager * getMFAM()

Definition SelectionDAG.h:495

LLVM_ABI SDValue getSExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by either sign-extending or trunca...

LLVM_ABI SDDbgValue * getVRegDbgValue(DIVariable *Var, DIExpression *Expr, Register VReg, bool IsIndirect, const DebugLoc &DL, unsigned O)

Creates a VReg SDDbgValue node.

LLVM_ABI bool isKnownToBeAPowerOfTwo(SDValue Val, unsigned Depth=0) const

Test if the given value is known to have exactly one bit set.

LLVM_ABI SDValue getEHLabel(const SDLoc &dl, SDValue Root, MCSymbol *Label)

LLVM_ABI std::string getGraphAttrs(const SDNode *N) const

Get graph attributes for a node.

LLVM_ABI SDValue getIndexedStoreVP(SDValue OrigStore, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI bool isKnownNeverZero(SDValue Op, unsigned Depth=0) const

Test whether the given SDValue is known to contain non-zero value(s).

LLVM_ABI SDValue getIndexedStore(SDValue OrigStore, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI SDValue FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDValue > Ops, SDNodeFlags Flags=SDNodeFlags())

LLVM_ABI std::optional< unsigned > getValidMinimumShiftAmount(SDValue V, const APInt &DemandedElts, unsigned Depth=0) const

If a SHL/SRA/SRL node V has shift amounts that are all less than the element bit-width of the shift n...

LLVM_ABI SDValue getSetFPEnv(SDValue Chain, const SDLoc &dl, SDValue Ptr, EVT MemVT, MachineMemOperand *MMO)

LLVM_ABI SDValue getBoolExtOrTrunc(SDValue Op, const SDLoc &SL, EVT VT, EVT OpVT)

Convert Op, which must be of integer type, to the integer type VT, by using an extension appropriate ...

LLVM_ABI SDValue getMaskedStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Base, SDValue Offset, SDValue Mask, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexedMode AM, bool IsTruncating=false, bool IsCompressing=false)

LLVM_ABI SDValue getExternalSymbol(const char *Sym, EVT VT)

const TargetMachine & getTarget() const

Definition SelectionDAG.h:499

bool getNoMergeSiteInfo(const SDNode *Node) const

Return NoMerge info associated with Node.

Definition SelectionDAG.h:2575

LLVM_ABI std::pair< SDValue, SDValue > getStrictFPExtendOrRound(SDValue Op, SDValue Chain, const SDLoc &DL, EVT VT)

Convert Op, which must be a STRICT operation of float type, to the float type VT, by either extending...

SDValue getObjectPtrOffset(const SDLoc &SL, SDValue Ptr, SDValue Offset)

Definition SelectionDAG.h:1136

LLVM_ABI std::pair< SDValue, SDValue > SplitEVL(SDValue N, EVT VecVT, const SDLoc &DL)

Split the explicit vector length parameter of a VP operation.

LLVM_ABI SDValue getPtrExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by either truncating it or perform...

LLVM_ABI SDValue getVPLogicalNOT(const SDLoc &DL, SDValue Val, SDValue Mask, SDValue EVL, EVT VT)

Create a vector-predicated logical NOT operation as (VP_XOR Val, BooleanOne, Mask,...

LLVM_ABI SDValue getMaskFromElementCount(const SDLoc &DL, EVT VT, ElementCount Len)

Return a vector with the first 'Len' lanes set to true and remaining lanes set to false.

SDDbgInfo::DbgIterator DbgBegin() const

Definition SelectionDAG.h:2005

LLVM_ABI SDValue getAnyExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by either any-extending or truncat...

iterator_range< allnodes_iterator > allnodes()

Definition SelectionDAG.h:570

OverflowKind computeOverflowForAdd(bool IsSigned, SDValue N0, SDValue N1) const

Determine if the result of the addition of 2 nodes can overflow.

Definition SelectionDAG.h:2139

LLVM_ABI SDValue getBlockAddress(const BlockAddress *BA, EVT VT, int64_t Offset=0, bool isTarget=false, unsigned TargetFlags=0)

LLVM_ABI SDValue WidenVector(const SDValue &N, const SDLoc &DL)

Widen the vector up to the next power of two using INSERT_SUBVECTOR.

LLVM_ABI bool isKnownNeverZeroFloat(SDValue Op) const

Test whether the given floating point SDValue is known to never be positive or negative zero.

LLVM_ABI SDValue getLoadVP(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue Offset, SDValue Mask, SDValue EVL, MachinePointerInfo PtrInfo, EVT MemVT, Align Alignment, MachineMemOperand::Flags MMOFlags, const AAMDNodes &AAInfo, const MDNode *Ranges=nullptr, bool IsExpanding=false)

LLVM_ABI SDValue getIntPtrConstant(uint64_t Val, const SDLoc &DL, bool isTarget=false)

LLVM_ABI SDDbgValue * getConstantDbgValue(DIVariable *Var, DIExpression *Expr, const Value *C, const DebugLoc &DL, unsigned O)

Creates a constant SDDbgValue node.

LLVM_ABI SDValue getScatterVP(SDVTList VTs, EVT VT, const SDLoc &dl, ArrayRef< SDValue > Ops, MachineMemOperand *MMO, ISD::MemIndexType IndexType)

LLVM_ABI SDValue getValueType(EVT)

SDValue getTargetConstantFP(double Val, const SDLoc &DL, EVT VT)

Definition SelectionDAG.h:743

LLVM_ABI SDValue getLifetimeNode(bool IsStart, const SDLoc &dl, SDValue Chain, int FrameIndex)

Creates a LifetimeSDNode that starts (IsStart==true) or ends (IsStart==false) the lifetime of the Fra...

ArrayRef< SDDbgValue * > GetDbgValues(const SDNode *SD) const

Get the debug values which reference the given SDNode.

Definition SelectionDAG.h:1996

LLVM_ABI SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDUse > Ops)

Gets or creates the specified node.

LLVM_ABI OverflowKind computeOverflowForSignedAdd(SDValue N0, SDValue N1) const

Determine if the result of the signed addition of 2 nodes can overflow.

LLVM_ABI SDValue getFPExtendOrRound(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of float type, to the float type VT, by either extending or rounding (by tr...

LLVM_ABI unsigned AssignTopologicalOrder()

Topological-sort the AllNodes list and a assign a unique node id for each node in the DAG based on th...

ilist< SDNode >::size_type allnodes_size() const

Definition SelectionDAG.h:566

LLVM_ABI bool isKnownNeverNaN(SDValue Op, const APInt &DemandedElts, bool SNaN=false, unsigned Depth=0) const

Test whether the given SDValue (or all elements of it, if it is a vector) is known to never be NaN in...

LLVM_ABI SDValue FoldConstantBuildVector(BuildVectorSDNode *BV, const SDLoc &DL, EVT DstEltVT)

Fold BUILD_VECTOR of constants/undefs to the destination type BUILD_VECTOR of constants/undefs elemen...

ilist< SDNode >::const_iterator allnodes_const_iterator

Definition SelectionDAG.h:556

LLVM_ABI SDValue getAtomicMemmove(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, Type *SizeTy, unsigned ElemSz, bool isTailCall, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)

LLVM_ABI SDValue getIndexedMaskedStore(SDValue OrigStore, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI SDValue getTruncStoreVP(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, SDValue Mask, SDValue EVL, MachinePointerInfo PtrInfo, EVT SVT, Align Alignment, MachineMemOperand::Flags MMOFlags, const AAMDNodes &AAInfo, bool IsCompressing=false)

SDValue getTargetConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isOpaque=false)

Definition SelectionDAG.h:707

const TargetLibraryInfo & getLibInfo() const

Definition SelectionDAG.h:505

LLVM_ABI unsigned ComputeNumSignBits(SDValue Op, unsigned Depth=0) const

Return the number of times the sign bit of the register is replicated into the other bits.

void addCalledGlobal(const SDNode *Node, const GlobalValue *GV, unsigned OpFlags)

Set CalledGlobal to be associated with Node.

Definition SelectionDAG.h:2558

LLVM_ABI bool MaskedVectorIsZero(SDValue Op, const APInt &DemandedElts, unsigned Depth=0) const

Return true if 'Op' is known to be zero in DemandedElts.

LLVM_ABI SDValue getBoolConstant(bool V, const SDLoc &DL, EVT VT, EVT OpVT)

Create a true or false constant of type VT using the target's BooleanContent for type OpVT.

SDValue getTargetBlockAddress(const BlockAddress *BA, EVT VT, int64_t Offset=0, unsigned TargetFlags=0)

Definition SelectionDAG.h:810

LLVM_ABI SDDbgValue * getFrameIndexDbgValue(DIVariable *Var, DIExpression *Expr, unsigned FI, bool IsIndirect, const DebugLoc &DL, unsigned O)

Creates a FrameIndex SDDbgValue node.

const UniformityInfo * getUniformityInfo() const

Definition SelectionDAG.h:507

LLVM_ABI SDValue getExtStridedLoadVP(ISD::LoadExtType ExtType, const SDLoc &DL, EVT VT, SDValue Chain, SDValue Ptr, SDValue Stride, SDValue Mask, SDValue EVL, EVT MemVT, MachineMemOperand *MMO, bool IsExpanding=false)

CodeGenOptLevel getOptLevel() const

Definition SelectionDAG.h:497

LLVM_ABI SDValue getMemmove(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, SDValue Size, Align Alignment, bool isVol, const CallInst *CI, std::optional< bool > OverrideTailCall, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo, const AAMDNodes &AAInfo=AAMDNodes(), BatchAAResults *BatchAA=nullptr)

LLVM_ABI SDValue getJumpTable(int JTI, EVT VT, bool isTarget=false, unsigned TargetFlags=0)

LLVM_ABI bool isBaseWithConstantOffset(SDValue Op) const

Return true if the specified operand is an ISD::ADD with a ConstantSDNode on the right-hand side,...

LLVM_ABI SDValue getVPPtrExtOrTrunc(const SDLoc &DL, EVT VT, SDValue Op, SDValue Mask, SDValue EVL)

Convert a vector-predicated Op, which must be of integer type, to the vector-type integer type VT,...

LLVM_ABI SDValue getVectorIdxConstant(uint64_t Val, const SDLoc &DL, bool isTarget=false)

LLVM_ABI void getTopologicallyOrderedNodes(SmallVectorImpl< const SDNode * > &SortedNodes) const

Get all the nodes in their topological order without modifying any states.

LLVM_ABI void ReplaceAllUsesOfValueWith(SDValue From, SDValue To)

Replace any uses of From with To, leaving uses of other values produced by From.getNode() alone.

MachineFunction & getMachineFunction() const

Definition SelectionDAG.h:493

LLVM_ABI SDValue getPtrExtendInReg(SDValue Op, const SDLoc &DL, EVT VT)

Return the expression required to extend the Op as a pointer value assuming it was the smaller SrcTy ...

LLVM_ABI bool canCreateUndefOrPoison(SDValue Op, const APInt &DemandedElts, bool PoisonOnly=false, bool ConsiderFlags=true, unsigned Depth=0) const

Return true if Op can create undef or poison from non-undef & non-poison operands.

LLVM_ABI OverflowKind computeOverflowForUnsignedAdd(SDValue N0, SDValue N1) const

Determine if the result of the unsigned addition of 2 nodes can overflow.

SDValue getPOISON(EVT VT)

Return a POISON node. POISON does not have a useful SDLoc.

Definition SelectionDAG.h:1186

void setFlagInserter(FlagInserter *FI)

Definition SelectionDAG.h:518

SDValue getSplatBuildVector(EVT VT, const SDLoc &DL, SDValue Op)

Return a splat ISD::BUILD_VECTOR node, consisting of Op splatted to all elements.

Definition SelectionDAG.h:887

bool isSafeToSpeculativelyExecuteNode(const SDNode *N) const

Check if the provided node is save to speculatively executed given its current arguments.

Definition SelectionDAG.h:2616

LLVM_ABI SDValue getFrameIndex(int FI, EVT VT, bool isTarget=false)

LLVM_ABI SDValue getTruncStridedStoreVP(SDValue Chain, const SDLoc &DL, SDValue Val, SDValue Ptr, SDValue Stride, SDValue Mask, SDValue EVL, EVT SVT, MachineMemOperand *MMO, bool IsCompressing=false)

const FunctionVarLocs * getFunctionVarLocs() const

Returns the result of the AssignmentTrackingAnalysis pass if it's available, otherwise return nullptr...

Definition SelectionDAG.h:510

LLVM_ABI void canonicalizeCommutativeBinop(unsigned Opcode, SDValue &N1, SDValue &N2) const

Swap N1 and N2 if Opcode is a commutative binary opcode and the canonical form expects the opposite o...

LLVM_ABI KnownBits computeKnownBits(SDValue Op, unsigned Depth=0) const

Determine which bits of Op are known to be either zero or one and return them in Known.

LLVM_ABI SDValue getRegisterMask(const uint32_t *RegMask)

LLVM_ABI SDValue getZExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by either zero-extending or trunca...

LLVM_ABI SDValue getCondCode(ISD::CondCode Cond)

void addCallSiteInfo(const SDNode *Node, CallSiteInfo &&CallInfo)

Set CallSiteInfo to be associated with Node.

Definition SelectionDAG.h:2521

SDValue getExtOrTrunc(bool IsSigned, SDValue Op, const SDLoc &DL, EVT VT)

Convert Op, which must be of integer type, to the integer type VT, by either sign/zero-extending (dep...

Definition SelectionDAG.h:1043

LLVM_ABI bool MaskedValueIsZero(SDValue Op, const APInt &Mask, unsigned Depth=0) const

Return true if 'Op & Mask' is known to be zero.

LLVM_ABI bool isKnownToBeAPowerOfTwoFP(SDValue Val, unsigned Depth=0) const

Test if the given fp value is known to be an integer power-of-2, either positive or negative.

LLVM_ABI OverflowKind computeOverflowForSignedSub(SDValue N0, SDValue N1) const

Determine if the result of the signed sub of 2 nodes can overflow.

SDValue getObjectPtrOffset(const SDLoc &SL, SDValue Ptr, TypeSize Offset)

Create an add instruction with appropriate flags when used for addressing some offset of an object.

Definition SelectionDAG.h:1131

LLVMContext * getContext() const

Definition SelectionDAG.h:511

LLVM_ABI SDValue simplifyFPBinop(unsigned Opcode, SDValue X, SDValue Y, SDNodeFlags Flags)

Try to simplify a floating-point binary operation into 1 of its operands or a constant.

const SDValue & setRoot(SDValue N)

Set the current root tag of the SelectionDAG.

Definition SelectionDAG.h:587

void addPCSections(const SDNode *Node, MDNode *MD)

Set PCSections to be associated with Node.

Definition SelectionDAG.h:2539

bool isGuaranteedNotToBePoison(SDValue Op, const APInt &DemandedElts, unsigned Depth=0) const

Return true if this function can prove that Op is never poison.

Definition SelectionDAG.h:2255

SDValue getTargetConstantPool(MachineConstantPoolValue *C, EVT VT, MaybeAlign Align=std::nullopt, int Offset=0, unsigned TargetFlags=0)

Definition SelectionDAG.h:787

LLVM_ABI SDValue getDeactivationSymbol(const GlobalValue *GV)

LLVM_ABI void clearGraphAttrs()

Clear all previously defined node graph attributes.

LLVM_ABI SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned TargetFlags=0)

LLVM_ABI SDValue getMCSymbol(MCSymbol *Sym, EVT VT)

LLVM_ABI bool isUndef(unsigned Opcode, ArrayRef< SDValue > Ops)

Return true if the result of this operation is always undefined.

SDValue getSetCCVP(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond, SDValue Mask, SDValue EVL)

Helper function to make it easier to build VP_SETCCs if you just have an ISD::CondCode instead of an ...

Definition SelectionDAG.h:1349

LLVM_ABI SDValue CreateStackTemporary(TypeSize Bytes, Align Alignment)

Create a stack temporary based on the size in bytes and the alignment.

LLVM_ABI SDNode * UpdateNodeOperands(SDNode *N, SDValue Op)

Mutate the specified node in-place to have the specified operands.

LLVM_ABI std::pair< EVT, EVT > GetDependentSplitDestVTs(const EVT &VT, const EVT &EnvVT, bool *HiIsEmpty) const

Compute the VTs needed for the low/hi parts of a type, dependent on an enveloping VT that has been sp...

LLVM_ABI SDValue foldConstantFPMath(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDValue > Ops)

Fold floating-point operations when all operands are constants and/or undefined.

SDValue getTargetConstantPool(const Constant *C, EVT VT, MaybeAlign Align=std::nullopt, int Offset=0, unsigned TargetFlags=0)

Definition SelectionDAG.h:778

LLVM_ABI void init(MachineFunction &NewMF, OptimizationRemarkEmitter &NewORE, Pass *PassPtr, const TargetLibraryInfo *LibraryInfo, UniformityInfo *UA, ProfileSummaryInfo *PSIin, BlockFrequencyInfo *BFIin, MachineModuleInfo &MMI, FunctionVarLocs const *FnVarLocs)

Prepare this SelectionDAG to process code in the given MachineFunction.

LLVM_ABI std::optional< ConstantRange > getValidShiftAmountRange(SDValue V, const APInt &DemandedElts, unsigned Depth) const

If a SHL/SRA/SRL node V has shift amounts that are all less than the element bit-width of the shift n...

LLVM_ABI SDValue FoldSymbolOffset(unsigned Opcode, EVT VT, const GlobalAddressSDNode *GA, const SDNode *N2)

void RepositionNode(allnodes_iterator Position, SDNode *N)

Move node N in the AllNodes list to be immediately before the given iterator Position.

Definition SelectionDAG.h:1984

LLVM_ABI SDValue getIndexedLoad(SDValue OrigLoad, const SDLoc &dl, SDValue Base, SDValue Offset, ISD::MemIndexedMode AM)

LLVM_ABI SDValue getTargetInsertSubreg(int SRIdx, const SDLoc &DL, EVT VT, SDValue Operand, SDValue Subreg)

A convenience function for creating TargetInstrInfo::INSERT_SUBREG nodes.

SDValue getEntryNode() const

Return the token chain corresponding to the entry of the function.

Definition SelectionDAG.h:581

LLVM_ABI SDDbgValue * getDbgValue(DIVariable *Var, DIExpression *Expr, SDNode *N, unsigned R, bool IsIndirect, const DebugLoc &DL, unsigned O)

Creates a SDDbgValue node.

LLVM_ABI void setSubgraphColor(SDNode *N, const char *Color)

Convenience for setting subgraph color attribute.

LLVM_ABI SDValue getMaskedLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Base, SDValue Offset, SDValue Mask, SDValue Src0, EVT MemVT, MachineMemOperand *MMO, ISD::MemIndexedMode AM, ISD::LoadExtType, bool IsExpanding=false)

SDValue getTargetConstantFP(const ConstantFP &Val, const SDLoc &DL, EVT VT)

Definition SelectionDAG.h:749

DenormalMode getDenormalMode(EVT VT) const

Return the current function's default denormal handling kind for the given floating point type.

Definition SelectionDAG.h:2585

SDValue getSplat(EVT VT, const SDLoc &DL, SDValue Op)

Returns a node representing a splat of one value into all lanes of the provided vector type.

Definition SelectionDAG.h:920

LLVM_ABI std::pair< SDValue, SDValue > SplitScalar(const SDValue &N, const SDLoc &DL, const EVT &LoVT, const EVT &HiVT)

Split the scalar node with EXTRACT_ELEMENT using the provided VTs and return the low/high part.

static unsigned getOpcode_EXTEND(unsigned Opcode)

Convert *_EXTEND_VECTOR_INREG to *_EXTEND opcode.

Definition SelectionDAG.h:981

LLVM_ABI SDValue matchBinOpReduction(SDNode *Extract, ISD::NodeType &BinOp, ArrayRef< ISD::NodeType > CandidateBinOps, bool AllowPartials=false)

Match a binop + shuffle pyramid that represents a horizontal reduction over the elements of a vector ...

LLVM_ABI bool isADDLike(SDValue Op, bool NoWrap=false) const

Return true if the specified operand is an ISD::OR or ISD::XOR node that can be treated as an ISD::AD...

LLVM_ABI SDValue getVectorShuffle(EVT VT, const SDLoc &dl, SDValue N1, SDValue N2, ArrayRef< int > Mask)

Return an ISD::VECTOR_SHUFFLE node.

LLVM_DUMP_METHOD void dumpDotGraph(const Twine &FileName, const Twine &Title)

Just dump dot graph to a user-provided path and title.

LLVM_ABI SDValue simplifyShift(SDValue X, SDValue Y)

Try to simplify a shift into 1 of its operands or a constant.

LLVM_ABI void transferDbgValues(SDValue From, SDValue To, unsigned OffsetInBits=0, unsigned SizeInBits=0, bool InvalidateDbg=true)

Transfer debug values from one node to another, while optionally generating fragment expressions for ...

LLVM_ABI SDValue getLogicalNOT(const SDLoc &DL, SDValue Val, EVT VT)

Create a logical NOT operation as (XOR Val, BooleanOne).

LLVM_ABI SDValue getMaskedScatter(SDVTList VTs, EVT MemVT, const SDLoc &dl, ArrayRef< SDValue > Ops, MachineMemOperand *MMO, ISD::MemIndexType IndexType, bool IsTruncating=false)

ilist< SDNode >::iterator allnodes_iterator

Definition SelectionDAG.h:561

LLVM_ABI bool LegalizeTypes()

This transforms the SelectionDAG into a SelectionDAG that only uses types natively supported by the t...

This SDNode is used to implement the code generator support for the llvm IR shufflevector instruction...

A SetVector that performs no allocations if smaller than a certain size.

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

typename SuperClass::iterator iterator

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

StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...

Provides information about what library functions are available for the current target.

This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...

Primary interface to the complete machine description for the target machine.

TargetSubtargetInfo - Generic base class for all target subtargets.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

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

LLVM Value Representation.

typename base_list_type::iterator iterator

typename base_list_type::size_type size_type

typename base_list_type::const_iterator const_iterator

A range adaptor for a pair of iterators.

This file defines classes to implement an intrusive doubly linked list class (i.e.

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.

@ C

The default llvm calling convention, compatible with C.

NodeType

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

@ SETCC

SetCC operator - This evaluates to a true value iff the condition is true.

@ STRICT_FSETCC

STRICT_FSETCC/STRICT_FSETCCS - Constrained versions of SETCC, used for floating-point operands only.

@ POISON

POISON - A poison node.

@ INSERT_SUBVECTOR

INSERT_SUBVECTOR(VECTOR1, VECTOR2, IDX) - Returns a vector with VECTOR2 inserted into VECTOR1.

@ ANY_EXTEND

ANY_EXTEND - Used for integer types. The high bits are undefined.

@ SIGN_EXTEND_VECTOR_INREG

SIGN_EXTEND_VECTOR_INREG(Vector) - This operator represents an in-register sign-extension of the low ...

@ SDIVREM

SDIVREM/UDIVREM - Divide two integers and produce both a quotient and remainder result.

@ SIGN_EXTEND

Conversion operators.

@ SELECT

Select(COND, TRUEVAL, FALSEVAL).

@ UNDEF

UNDEF - An undefined node.

@ SPLAT_VECTOR

SPLAT_VECTOR(VAL) - Returns a vector with the scalar value VAL duplicated in all lanes.

@ CopyFromReg

CopyFromReg - This node indicates that the input value is a virtual or physical register that is defi...

@ EXTRACT_SUBVECTOR

EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR.

@ EXTRACT_VECTOR_ELT

EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR identified by the (potentially...

@ CopyToReg

CopyToReg - This node has three operands: a chain, a register number to set to this value,...

@ ZERO_EXTEND

ZERO_EXTEND - Used for integer types, zeroing the new bits.

@ SELECT_CC

Select with condition operator - This selects between a true value and a false value (ops #2 and #3) ...

@ ANY_EXTEND_VECTOR_INREG

ANY_EXTEND_VECTOR_INREG(Vector) - This operator represents an in-register any-extension of the low la...

@ GLOBAL_OFFSET_TABLE

The address of the GOT.

@ VSELECT

Select with a vector condition (op #0) and two vector operands (ops #1 and #2), returning a vector re...

@ INSERT_VECTOR_ELT

INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element at IDX replaced with VAL.

@ ZERO_EXTEND_VECTOR_INREG

ZERO_EXTEND_VECTOR_INREG(Vector) - This operator represents an in-register zero-extension of the low ...

@ BUILD_VECTOR

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

MemIndexType

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

MemIndexedMode

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

CondCode

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

LoadExtType

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

NodeAddr< NodeBase * > Node

This is an optimization pass for GlobalISel generic memory operations.

GenericUniformityInfo< SSAContext > UniformityInfo

GenericSSAContext< Function > SSAContext

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

Convenience function for iterating over sub-ranges.

FoldingSetBase::Node FoldingSetNode

AnalysisManager< MachineFunction > MachineFunctionAnalysisManager

iplist< T, Options... > ilist

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

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

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

FunctionAddr VTableAddr Count

GlobalAddressSDNode MostAlignedSDNode

The SDNode class with the greatest alignment requirement.

CodeGenOptLevel

Code generation optimization level.

DWARFExpression::Operation Op

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

OutputIt move(R &&Range, OutputIt Out)

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

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

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.

DefaultFoldingSetTrait - This class provides default implementations for FoldingSetTrait implementati...

Represent subnormal handling kind for floating point instruction inputs and outputs.

bool isVector() const

Return true if this is a vector value type.

bool isScalableVector() const

Return true if this is a vector type where the runtime length is machine dependent.

EVT getVectorElementType() const

Given a vector type, return the type of each element.

LLVM_ABI const fltSemantics & getFltSemantics() const

Returns an APFloat semantics tag appropriate for the value type.

unsigned getVectorNumElements() const

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

bool bitsLE(EVT VT) const

Return true if this has no more bits than VT.

bool isInteger() const

Return true if this is an integer or a vector integer type.

static bool Equals(const SDVTListNode &X, const FoldingSetNodeID &ID, unsigned IDHash, FoldingSetNodeID &TempID)

Definition SelectionDAG.h:134

static unsigned ComputeHash(const SDVTListNode &X, FoldingSetNodeID &TempID)

Definition SelectionDAG.h:141

static void Profile(const SDVTListNode &X, FoldingSetNodeID &ID)

Definition SelectionDAG.h:130

FoldingSetTrait - This trait class is used to define behavior of how to "profile" (in the FoldingSet ...

static nodes_iterator nodes_begin(SelectionDAG *G)

Definition SelectionDAG.h:2675

static nodes_iterator nodes_end(SelectionDAG *G)

Definition SelectionDAG.h:2679

pointer_iterator< SelectionDAG::allnodes_iterator > nodes_iterator

Definition SelectionDAG.h:2673

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

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.

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

DAGNodeDeletedListener(SelectionDAG &DAG, std::function< void(SDNode *, SDNode *)> Callback)

Definition SelectionDAG.h:347

void NodeDeleted(SDNode *N, SDNode *E) override

The node N that was deleted and, if E is not null, an equivalent node E that replaced it.

Definition SelectionDAG.h:351

std::function< void(SDNode *, SDNode *)> Callback

Definition SelectionDAG.h:345

std::function< void(SDNode *)> Callback

Definition SelectionDAG.h:358

void NodeInserted(SDNode *N) override

The node N that was inserted.

Definition SelectionDAG.h:364

DAGNodeInsertedListener(SelectionDAG &DAG, std::function< void(SDNode *)> Callback)

Definition SelectionDAG.h:360

Clients of various APIs that cause global effects on the DAG can optionally implement this interface.

Definition SelectionDAG.h:318

virtual ~DAGUpdateListener()

Definition SelectionDAG.h:327

DAGUpdateListener *const Next

Definition SelectionDAG.h:319

DAGUpdateListener(SelectionDAG &D)

Definition SelectionDAG.h:322

SelectionDAG & DAG

Definition SelectionDAG.h:320

static void deleteNode(SDNode *)

Definition SelectionDAG.h:147

Use delete by default for iplist and ilist.