LLVM: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_CODEGEN_SELECTIONDAG_SELECTIONDAGBUILDER_H

14#define LLVM_LIB_CODEGEN_SELECTIONDAG_SELECTIONDAGBUILDER_H

15

34#include

35#include

36#include

37#include

38#include

39#include

40

41namespace llvm {

42

43class AAResults;

44class AllocaInst;

45class AtomicCmpXchgInst;

46class AtomicRMWInst;

47class AssumptionCache;

49class BranchInst;

50class CallInst;

51class CallBrInst;

52class CatchPadInst;

53class CatchReturnInst;

54class CatchSwitchInst;

55class CleanupPadInst;

56class CleanupReturnInst;

58class ConstrainedFPIntrinsic;

59class DbgValueInst;

60class DataLayout;

61class DIExpression;

62class DILocalVariable;

63class DILocation;

64class FenceInst;

65class FunctionLoweringInfo;

66class GCFunctionInfo;

67class GCRelocateInst;

68class GCResultInst;

69class GCStatepointInst;

70class IndirectBrInst;

71class InvokeInst;

72class LandingPadInst;

73class LLVMContext;

74class LoadInst;

75class MachineBasicBlock;

76class PHINode;

77class ResumeInst;

78class ReturnInst;

79class SDDbgValue;

80class SelectionDAG;

81class StoreInst;

82class SwiftErrorValueTracking;

83class SwitchInst;

84class TargetLibraryInfo;

85class TargetMachine;

87class VAArgInst;

88class UnreachableInst;

92

93

94

95

96

98

100

102

103

104

106

107

108 class DanglingDebugInfo {

109 unsigned SDNodeOrder = 0;

110

111 public:

115 DanglingDebugInfo() = default;

117 unsigned SDNO)

118 : SDNodeOrder(SDNO), Variable(Var), Expression(Expr),

119 dl(std::move(DL)) {}

120

121 DILocalVariable *getVariable() const { return Variable; }

123 DebugLoc getDebugLoc() const { return dl; }

124 unsigned getSDNodeOrder() const { return SDNodeOrder; }

125

126

127

128

132 const DanglingDebugInfo &DDI;

135 OS << "DDI(var=" << *P.DDI.getVariable();

136 if (P.V)

137 OS << ", val=" << *P.V;

138 else

139 OS << ", val=nullptr";

140

141 OS << ", expr=" << *P.DDI.getExpression()

142 << ", order=" << P.DDI.getSDNodeOrder()

143 << ", loc=" << P.DDI.getDebugLoc() << ")";

144 return OS;

145 }

146 };

147 };

148

149

150

151

152 DanglingDebugInfo::Print printDDI(const Value *V,

153 const DanglingDebugInfo &DDI) {

154 return DanglingDebugInfo::Print(V, DDI);

155 }

156

157

158 typedef std::vector DanglingDebugInfoVector;

159

160

161

162 MapVector<const Value*, DanglingDebugInfoVector> DanglingDebugInfoMap;

163

164

165

166 bool AssignmentTrackingEnabled = false;

167

168public:

169

170

171

173

174

175

177

178private:

179

180

181

182

184

185

186

187

188

189

190

191

192

195

196

198

199

200

201 unsigned SDNodeOrder;

202

203

207

208

212

213

215 peelDominantCaseCluster(const SwitchInst &SI,

218

219private:

221

222public:

223

224

226

231

233 public:

236

240 SDB->addSuccessorWithProb(Src, Dst, Prob);

241 }

242

243 private:

245 };

246

247

248

249 std::unique_ptr SL;

250

251

252

254

255

256

258

259

261

262

264

265

267

268

270

271

272

274

276

282

285

286

287

288

289

290

292

293

294

295

296

298

299

300

301

303

304

305

306

307

309

310

311

312

314

316 return SDLoc(CurInst, SDNodeOrder);

317 }

318

321 }

322

325

328

329 void visit(unsigned Opcode, const User &I);

330

331

332

334

335

338 bool IsVariadic, DebugLoc DL, unsigned Order);

339

340

341

342

345

346

347

349

350

351

352

354

355

356

359 bool IsVariadic);

360

361

363 DebugLoc DbgLoc, unsigned Order);

364

367

368

370

372

375

378 assert(N.getNode() && "Already set a value for this node!");

379 N = NewN;

380 }

381

383 SDValue &N = UnusedArgNodeMap[V];

384 assert(N.getNode() && "Already set a value for this node!");

385 N = NewN;

386 }

387

392

403 bool InvertCond);

409 bool IsMustTailCall, const BasicBlock *EHPadBB = nullptr,

411

412

413

416

418 const CallBase *Call, unsigned ArgIdx,

419 unsigned NumArgs, SDValue Callee,

421 bool IsPatchPoint);

422

423 std::pair<SDValue, SDValue>

425 const BasicBlock *EHPadBB = nullptr);

426

427

428

430

431

432

434

435

438

439

441

442

444

445

447

448

449

451

452

454

455

457

458

459

461

462

464

465

467

468

469

471

473 };

474

475

477

478

479

481 const BasicBlock *EHPadBB = nullptr);

482

485

488

491 bool VarArgDisallowed,

492 bool ForceVoidReturnTy);

493

496

497

500 }

501

502private:

503

514

517 void addSuccessorWithProb(

520

521public:

535

536private:

537

540 void visitCallBrLandingPad(const CallInst &I);

542

543 void visitUnary(const User &I, unsigned Opcode);

544 void visitFNeg(const User &I) { visitUnary(I, ISD::FNEG); }

545

546 void visitBinary(const User &I, unsigned Opcode);

547 void visitShift(const User &I, unsigned Opcode);

548 void visitAdd(const User &I) { visitBinary(I, ISD::ADD); }

549 void visitFAdd(const User &I) { visitBinary(I, ISD::FADD); }

550 void visitSub(const User &I) { visitBinary(I, ISD::SUB); }

551 void visitFSub(const User &I) { visitBinary(I, ISD::FSUB); }

552 void visitMul(const User &I) { visitBinary(I, ISD::MUL); }

553 void visitFMul(const User &I) { visitBinary(I, ISD::FMUL); }

554 void visitURem(const User &I) { visitBinary(I, ISD::UREM); }

555 void visitSRem(const User &I) { visitBinary(I, ISD::SREM); }

556 void visitFRem(const User &I) { visitBinary(I, ISD::FREM); }

557 void visitUDiv(const User &I) { visitBinary(I, ISD::UDIV); }

558 void visitSDiv(const User &I);

559 void visitFDiv(const User &I) { visitBinary(I, ISD::FDIV); }

560 void visitAnd (const User &I) { visitBinary(I, ISD::AND); }

561 void visitOr (const User &I) { visitBinary(I, ISD::OR); }

562 void visitXor (const User &I) { visitBinary(I, ISD::XOR); }

563 void visitShl (const User &I) { visitShift(I, ISD::SHL); }

564 void visitLShr(const User &I) { visitShift(I, ISD::SRL); }

565 void visitAShr(const User &I) { visitShift(I, ISD::SRA); }

566 void visitICmp(const ICmpInst &I);

567 void visitFCmp(const FCmpInst &I);

568

569 void visitTrunc(const User &I);

570 void visitZExt(const User &I);

571 void visitSExt(const User &I);

572 void visitFPTrunc(const User &I);

573 void visitFPExt(const User &I);

574 void visitFPToUI(const User &I);

575 void visitFPToSI(const User &I);

576 void visitUIToFP(const User &I);

577 void visitSIToFP(const User &I);

578 void visitPtrToInt(const User &I);

579 void visitIntToPtr(const User &I);

580 void visitBitCast(const User &I);

581 void visitAddrSpaceCast(const User &I);

582

583 void visitExtractElement(const User &I);

584 void visitInsertElement(const User &I);

585 void visitShuffleVector(const User &I);

586

587 void visitExtractValue(const ExtractValueInst &I);

588 void visitInsertValue(const InsertValueInst &I);

589 void visitLandingPad(const LandingPadInst &LP);

590

591 void visitGetElementPtr(const User &I);

592 void visitSelect(const User &I);

593

594 void visitAlloca(const AllocaInst &I);

595 void visitLoad(const LoadInst &I);

596 void visitStore(const StoreInst &I);

597 void visitMaskedLoad(const CallInst &I, bool IsExpanding = false);

598 void visitMaskedStore(const CallInst &I, bool IsCompressing = false);

599 void visitMaskedGather(const CallInst &I);

600 void visitMaskedScatter(const CallInst &I);

601 void visitAtomicCmpXchg(const AtomicCmpXchgInst &I);

602 void visitAtomicRMW(const AtomicRMWInst &I);

603 void visitFence(const FenceInst &I);

604 void visitPHI(const PHINode &I);

605 void visitCall(const CallInst &I);

606 bool visitMemCmpBCmpCall(const CallInst &I);

607 bool visitMemPCpyCall(const CallInst &I);

608 bool visitMemChrCall(const CallInst &I);

609 bool visitStrCpyCall(const CallInst &I, bool isStpcpy);

610 bool visitStrCmpCall(const CallInst &I);

611 bool visitStrLenCall(const CallInst &I);

612 bool visitStrNLenCall(const CallInst &I);

613 bool visitUnaryFloatCall(const CallInst &I, unsigned Opcode);

614 bool visitBinaryFloatCall(const CallInst &I, unsigned Opcode);

615 void visitAtomicLoad(const LoadInst &I);

616 void visitAtomicStore(const StoreInst &I);

617 void visitLoadFromSwiftError(const LoadInst &I);

618 void visitStoreToSwiftError(const StoreInst &I);

619 void visitFreeze(const FreezeInst &I);

620

621 void visitInlineAsm(const CallBase &Call,

622 const BasicBlock *EHPadBB = nullptr);

623

624 bool visitEntryValueDbgValue(ArrayRef<const Value *> Values,

625 DILocalVariable *Variable, DIExpression *Expr,

626 DebugLoc DbgLoc);

627 void visitIntrinsicCall(const CallInst &I, unsigned Intrinsic);

628 void visitTargetIntrinsic(const CallInst &I, unsigned Intrinsic);

629 void visitConstrainedFPIntrinsic(const ConstrainedFPIntrinsic &FPI);

630 void visitConvergenceControl(const CallInst &I, unsigned Intrinsic);

631 void visitVectorHistogram(const CallInst &I, unsigned IntrinsicID);

632 void visitVectorExtractLastActive(const CallInst &I, unsigned Intrinsic);

633 void visitVPLoad(const VPIntrinsic &VPIntrin, EVT VT,

634 const SmallVectorImpl &OpValues);

635 void visitVPStore(const VPIntrinsic &VPIntrin,

636 const SmallVectorImpl &OpValues);

637 void visitVPGather(const VPIntrinsic &VPIntrin, EVT VT,

638 const SmallVectorImpl &OpValues);

639 void visitVPScatter(const VPIntrinsic &VPIntrin,

640 const SmallVectorImpl &OpValues);

641 void visitVPStridedLoad(const VPIntrinsic &VPIntrin, EVT VT,

642 const SmallVectorImpl &OpValues);

643 void visitVPStridedStore(const VPIntrinsic &VPIntrin,

644 const SmallVectorImpl &OpValues);

645 void visitVPCmp(const VPCmpIntrinsic &VPIntrin);

646 void visitVectorPredicationIntrinsic(const VPIntrinsic &VPIntrin);

647

648 void visitVAStart(const CallInst &I);

649 void visitVAArg(const VAArgInst &I);

650 void visitVAEnd(const CallInst &I);

651 void visitVACopy(const CallInst &I);

652 void visitStackmap(const CallInst &I);

653 void visitPatchpoint(const CallBase &CB, const BasicBlock *EHPadBB = nullptr);

654

655

656 void visitGCRelocate(const GCRelocateInst &Relocate);

657 void visitGCResult(const GCResultInst &I);

658

659 void visitVectorReduce(const CallInst &I, unsigned Intrinsic);

660 void visitVectorReverse(const CallInst &I);

661 void visitVectorSplice(const CallInst &I);

662 void visitVectorInterleave(const CallInst &I);

663 void visitVectorDeinterleave(const CallInst &I);

664 void visitStepVector(const CallInst &I);

665

666 void visitUserOp1(const Instruction &I) {

667 llvm_unreachable("UserOp1 should not exist at instruction selection time!");

668 }

669 void visitUserOp2(const Instruction &I) {

670 llvm_unreachable("UserOp2 should not exist at instruction selection time!");

671 }

672

673 void processIntegerCallValue(const Instruction &I,

674 SDValue Value, bool IsSigned);

675

676 void HandlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB);

677

678 void emitInlineAsmError(const CallBase &Call, const Twine &Message);

679

680

681

682

683 enum class FuncArgumentDbgValueKind {

684 Value,

685 Declare,

686 };

687

688

689

690

691 bool EmitFuncArgumentDbgValue(const Value *V, DILocalVariable *Variable,

692 DIExpression *Expr, DILocation *DL,

693 FuncArgumentDbgValueKind Kind,

694 const SDValue &N);

695

696

697 MachineBasicBlock *NextBlock(MachineBasicBlock *MBB);

698

699

700

701 void updateDAGForMaybeTailCall(SDValue MaybeTC);

702

703

704 SDDbgValue *getDbgValue(SDValue N, DILocalVariable *Variable,

705 DIExpression *Expr, const DebugLoc &dl,

706 unsigned DbgSDNodeOrder);

707

708

709 void lowerCallToExternalSymbol(const CallInst &I, const char *FunctionName);

710

711 SDValue lowerStartEH(SDValue Chain, const BasicBlock *EHPadBB,

712 MCSymbol *&BeginLabel);

713 SDValue lowerEndEH(SDValue Chain, const InvokeInst *II,

714 const BasicBlock *EHPadBB, MCSymbol *BeginLabel);

715};

716

717

718

719

720

721

722

723

724

725

727

728

730

731

732

733

734

735

736

737

738

740

741

742

743

745

746

748

749

750

752

755 std::optionalCallingConv::ID CC = std::nullopt);

758 std::optionalCallingConv::ID CC);

759

761

762

764 ValueVTs.append(RHS.ValueVTs.begin(), RHS.ValueVTs.end());

765 RegVTs.append(RHS.RegVTs.begin(), RHS.RegVTs.end());

766 Regs.append(RHS.Regs.begin(), RHS.Regs.end());

768 }

769

770

771

772

773

776 const Value *V = nullptr) const;

777

778

779

780

781

782

786

787

788

789

791 unsigned MatchingIdx, const SDLoc &dl,

792 SelectionDAG &DAG, std::vector &Ops) const;

793

794

797 }

798

799

801};

802

803}

804

805#endif

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

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

This file defines the DenseMap class.

This file implements a map that provides insertion order iteration.

uint64_t IntrinsicInst * II

const SmallVectorImpl< MachineOperand > MachineBasicBlock * TBB

const SmallVectorImpl< MachineOperand > & Cond

assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

This file defines the SmallVector class.

This file describes how to lower LLVM code to machine code.

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

A cache of @llvm.assume calls within a function.

LLVM Basic Block Representation.

Conditional or Unconditional Branch instruction.

static BranchProbability getUnknown()

Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...

CallBr instruction, tracking function calls that may not return control but instead transfer it to a ...

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

This class represents an Operation in the Expression.

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

Class representing an expression and its matching format.

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

Garbage collection metadata for a single function.

Represents a gc.statepoint intrinsic call.

Indirect Branch Instruction.

const DebugLoc & getDebugLoc() const

Return the debug location for this node as a DebugLoc.

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

Wrapper class representing virtual and physical registers.

Resume the propagation of an exception.

Return a value (possibly void), from a function.

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

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

SDAGSwitchLowering(SelectionDAGBuilder *sdb, FunctionLoweringInfo &funcinfo)

void addSuccessorWithProb(MachineBasicBlock *Src, MachineBasicBlock *Dst, BranchProbability Prob=BranchProbability::getUnknown()) override

SelectionDAGBuilder - This is the common target-independent lowering implementation that is parameter...

SDValue getValue(const Value *V)

getValue - Return an SDValue for the given Value.

void addDanglingDebugInfo(SmallVectorImpl< Value * > &Values, DILocalVariable *Var, DIExpression *Expr, bool IsVariadic, DebugLoc DL, unsigned Order)

Register a dbg_value which relies on a Value which we have not yet seen.

void visitDbgInfo(const Instruction &I)

void clearDanglingDebugInfo()

Clear the dangling debug information map.

StackProtectorDescriptor SPDescriptor

A StackProtectorDescriptor structure used to communicate stack protector information in between Selec...

void LowerCallTo(const CallBase &CB, SDValue Callee, bool IsTailCall, bool IsMustTailCall, const BasicBlock *EHPadBB=nullptr, const TargetLowering::PtrAuthInfo *PAI=nullptr)

void clear()

Clear out the current SelectionDAG and the associated state and prepare this SelectionDAGBuilder obje...

MVT getFrameIndexTy()

Returns the type of FrameIndex and TargetFrameIndex nodes.

void visitBitTestHeader(SwitchCG::BitTestBlock &B, MachineBasicBlock *SwitchBB)

visitBitTestHeader - This function emits necessary code to produce value suitable for "bit tests"

void LowerStatepoint(const GCStatepointInst &I, const BasicBlock *EHPadBB=nullptr)

std::unique_ptr< SDAGSwitchLowering > SL

SDValue lowerRangeToAssertZExt(SelectionDAG &DAG, const Instruction &I, SDValue Op)

bool HasTailCall

This is set to true if a call in the current block has been translated as a tail call.

bool ShouldEmitAsBranches(const std::vector< SwitchCG::CaseBlock > &Cases)

If the set of cases should be emitted as a series of branches, return true.

void EmitBranchForMergedCondition(const Value *Cond, MachineBasicBlock *TBB, MachineBasicBlock *FBB, MachineBasicBlock *CurBB, MachineBasicBlock *SwitchBB, BranchProbability TProb, BranchProbability FProb, bool InvertCond)

EmitBranchForMergedCondition - Helper method for FindMergedConditions.

void LowerDeoptimizeCall(const CallInst *CI)

void LowerCallSiteWithDeoptBundle(const CallBase *Call, SDValue Callee, const BasicBlock *EHPadBB)

SwiftErrorValueTracking & SwiftError

Information about the swifterror values used throughout the function.

SDValue getNonRegisterValue(const Value *V)

getNonRegisterValue - Return an SDValue for the given Value, but don't look in FuncInfo....

void CopyValueToVirtualRegister(const Value *V, unsigned Reg, ISD::NodeType ExtendType=ISD::ANY_EXTEND)

DenseMap< MachineBasicBlock *, SmallVector< unsigned, 4 > > LPadToCallSiteMap

Map a landing pad to the call site indexes.

void LowerCallSiteWithDeoptBundleImpl(const CallBase *Call, SDValue Callee, const BasicBlock *EHPadBB, bool VarArgDisallowed, bool ForceVoidReturnTy)

void handleDebugDeclare(Value *Address, DILocalVariable *Variable, DIExpression *Expression, DebugLoc DL)

void setUnusedArgValue(const Value *V, SDValue NewN)

bool shouldKeepJumpConditionsTogether(const FunctionLoweringInfo &FuncInfo, const BranchInst &I, Instruction::BinaryOps Opc, const Value *Lhs, const Value *Rhs, TargetLoweringBase::CondMergingParams Params) const

StatepointLoweringState StatepointLowering

State used while lowering a statepoint sequence (gc_statepoint, gc_relocate, and gc_result).

void init(GCFunctionInfo *gfi, AAResults *AA, AssumptionCache *AC, const TargetLibraryInfo *li)

void visitBitTestCase(SwitchCG::BitTestBlock &BB, MachineBasicBlock *NextMBB, BranchProbability BranchProbToNext, Register Reg, SwitchCG::BitTestCase &B, MachineBasicBlock *SwitchBB)

visitBitTestCase - this function produces one "bit test"

DenseMap< const Constant *, unsigned > ConstantsOut

SelectionDAGBuilder(SelectionDAG &dag, FunctionLoweringInfo &funcinfo, SwiftErrorValueTracking &swifterror, CodeGenOptLevel ol)

void populateCallLoweringInfo(TargetLowering::CallLoweringInfo &CLI, const CallBase *Call, unsigned ArgIdx, unsigned NumArgs, SDValue Callee, Type *ReturnTy, AttributeSet RetAttrs, bool IsPatchPoint)

Populate a CallLowerinInfo (into CLI) based on the properties of the call being lowered.

void salvageUnresolvedDbgValue(const Value *V, DanglingDebugInfo &DDI)

For the given dangling debuginfo record, perform last-ditch efforts to resolve the debuginfo to somet...

SmallVector< SDValue, 8 > PendingLoads

Loads are not emitted to the program immediately.

GCFunctionInfo * GFI

Garbage collection metadata for the function.

SDValue getRoot()

Similar to getMemoryRoot, but also flushes PendingConstrainedFP(Strict) items.

void ExportFromCurrentBlock(const Value *V)

ExportFromCurrentBlock - If this condition isn't known to be exported from the current basic block,...

DebugLoc getCurDebugLoc() const

void resolveOrClearDbgInfo()

Evict any dangling debug information, attempting to salvage it first.

std::pair< SDValue, SDValue > lowerInvokable(TargetLowering::CallLoweringInfo &CLI, const BasicBlock *EHPadBB=nullptr)

SDValue getMemoryRoot()

Return the current virtual root of the Selection DAG, flushing any PendingLoad items.

void resolveDanglingDebugInfo(const Value *V, SDValue Val)

If we saw an earlier dbg_value referring to V, generate the debug data structures now that we've seen...

SDLoc getCurSDLoc() const

void visit(const Instruction &I)

void dropDanglingDebugInfo(const DILocalVariable *Variable, const DIExpression *Expr)

If we have dangling debug info that describes Variable, or an overlapping part of variable considerin...

SDValue getCopyFromRegs(const Value *V, Type *Ty)

If there was virtual register allocated for the value V emit CopyFromReg of the specified type Ty.

void CopyToExportRegsIfNeeded(const Value *V)

CopyToExportRegsIfNeeded - If the given value has virtual registers created for it,...

void handleKillDebugValue(DILocalVariable *Var, DIExpression *Expr, DebugLoc DbgLoc, unsigned Order)

Create a record for a kill location debug intrinsic.

void visitJumpTable(SwitchCG::JumpTable &JT)

visitJumpTable - Emit JumpTable node in the current MBB

void visitJumpTableHeader(SwitchCG::JumpTable &JT, SwitchCG::JumpTableHeader &JTH, MachineBasicBlock *SwitchBB)

visitJumpTableHeader - This function emits necessary code to produce index in the JumpTable from swit...

void LowerCallSiteWithPtrAuthBundle(const CallBase &CB, const BasicBlock *EHPadBB)

static const unsigned LowestSDNodeOrder

Lowest valid SDNodeOrder.

void LowerDeoptimizingReturn()

FunctionLoweringInfo & FuncInfo

Information about the function as a whole.

void setValue(const Value *V, SDValue NewN)

void FindMergedConditions(const Value *Cond, MachineBasicBlock *TBB, MachineBasicBlock *FBB, MachineBasicBlock *CurBB, MachineBasicBlock *SwitchBB, Instruction::BinaryOps Opc, BranchProbability TProb, BranchProbability FProb, bool InvertCond)

const TargetLibraryInfo * LibInfo

bool isExportableFromCurrentBlock(const Value *V, const BasicBlock *FromBB)

void visitSPDescriptorParent(StackProtectorDescriptor &SPD, MachineBasicBlock *ParentBB)

Codegen a new tail for a stack protector check ParentMBB which has had its tail spliced into a stack ...

bool handleDebugValue(ArrayRef< const Value * > Values, DILocalVariable *Var, DIExpression *Expr, DebugLoc DbgLoc, unsigned Order, bool IsVariadic)

For a given list of Values, attempt to create and record a SDDbgValue in the SelectionDAG.

SDValue getControlRoot()

Similar to getRoot, but instead of flushing all the PendingLoad items, flush all the PendingExports (...

void UpdateSplitBlock(MachineBasicBlock *First, MachineBasicBlock *Last)

When an MBB was split during scheduling, update the references that need to refer to the last resulti...

SDValue getValueImpl(const Value *V)

getValueImpl - Helper function for getValue and getNonRegisterValue.

void visitSwitchCase(SwitchCG::CaseBlock &CB, MachineBasicBlock *SwitchBB)

visitSwitchCase - Emits the necessary code to represent a single node in the binary search tree resul...

SDValue LowerAsSTATEPOINT(StatepointLoweringInfo &SI)

Lower SLI into a STATEPOINT instruction.

void visitSPDescriptorFailure(StackProtectorDescriptor &SPD)

Codegen the failure basic block for a stack protector check.

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

const TargetLowering & getTargetLoweringInfo() const

const DataLayout & getDataLayout() const

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

void push_back(const T &Elt)

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

Encapsulates all of the information needed to generate a stack protector check, and signals to isel w...

This class tracks both per-statepoint and per-selectiondag information.

SwitchLowering(FunctionLoweringInfo &funcinfo)

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

MVT getFrameIndexTy(const DataLayout &DL) const

Return the type for frame index, which is determined by the alloca address space specified through th...

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.

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

This function has undefined behavior.

LLVM Value Representation.

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

#define llvm_unreachable(msg)

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

NodeType

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

@ ADD

Simple integer binary arithmetic operators.

@ ANY_EXTEND

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

@ FADD

Simple binary floating point operators.

@ FNEG

Perform various unary floating-point operations inspired by libm.

@ BasicBlock

Various leaf nodes.

@ SHL

Shift and rotation operations.

@ AND

Bitwise operators - logical and, logical or, logical xor.

std::vector< CaseCluster > CaseClusterVector

@ User

could "use" a pointer

NodeAddr< UseNode * > Use

This is an optimization pass for GlobalISel generic memory operations.

CodeGenOptLevel

Code generation optimization level.

@ First

Helpers to iterate all locations in the MemoryEffectsBase class.

StatepointFlags

The statepoint intrinsic accepts a set of flags as its third argument.

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

This struct represents the registers (physical or virtual) that a particular set of values is assigne...

SmallVector< std::pair< Register, TypeSize >, 4 > getRegsAndSizes() const

Return a list of registers and their sizes.

SmallVector< unsigned, 4 > RegCount

This list holds the number of registers for each value.

bool isABIMangled() const

SmallVector< EVT, 4 > ValueVTs

The value types of the values, which may not be legal, and may need be promoted or synthesized from o...

void append(const RegsForValue &RHS)

Add the specified values to this one.

SmallVector< Register, 4 > Regs

This list holds the registers assigned to the values.

void AddInlineAsmOperands(InlineAsm::Kind Code, bool HasMatching, unsigned MatchingIdx, const SDLoc &dl, SelectionDAG &DAG, std::vector< SDValue > &Ops) const

Add this value to the specified inlineasm node operand list.

SDValue getCopyFromRegs(SelectionDAG &DAG, FunctionLoweringInfo &FuncInfo, const SDLoc &dl, SDValue &Chain, SDValue *Glue, const Value *V=nullptr) const

Emit a series of CopyFromReg nodes that copies from this value and returns the result as a ValueVTs v...

SmallVector< MVT, 4 > RegVTs

The value types of the registers.

void getCopyToRegs(SDValue Val, SelectionDAG &DAG, const SDLoc &dl, SDValue &Chain, SDValue *Glue, const Value *V=nullptr, ISD::NodeType PreferredExtendType=ISD::ANY_EXTEND) const

Emit a series of CopyToReg nodes that copies the specified value into the registers specified by this...

std::optional< CallingConv::ID > CallConv

Records if this value needs to be treated in an ABI dependant manner, different to normal type legali...

bool occupiesMultipleRegs() const

Check if the total RegCount is greater than one.

Helper for printing DanglingDebugInfo.

Print(const Value *V, const DanglingDebugInfo &DDI)

const DanglingDebugInfo & DDI

friend raw_ostream & operator<<(raw_ostream &OS, const DanglingDebugInfo::Print &P)

Describes a gc.statepoint or a gc.statepoint like thing for the purposes of lowering into a STATEPOIN...

unsigned NumPatchBytes

The number of patchable bytes the call needs to get lowered into.

ArrayRef< const Use > GCTransitionArgs

The list of gc transition arguments present in the gc.statepoint being lowered.

ArrayRef< const Use > GCLives

The full list of gc-live arguments to the gc.statepoint being lowered.

const BasicBlock * EHPadBB

The exception handling unwind destination, in case this represents an invoke of gc....

ArrayRef< const Use > DeoptState

The deoptimization state associated with this gc.statepoint call, if any.

TargetLowering::CallLoweringInfo CLI

Information regarding the underlying call instruction.

SmallVector< const Value *, 16 > Ptrs

SmallVector< const GCRelocateInst *, 16 > GCRelocates

The set of gc.relocate calls associated with this gc.statepoint.

StatepointLoweringInfo(SelectionDAG &DAG)

const Instruction * StatepointInstr

The gc.statepoint instruction.

SmallVector< const Value *, 16 > Bases

Bases[i] is the base pointer for Ptrs[i].

This structure is used to communicate between SelectionDAGBuilder and SDISel for the code generation ...

This structure contains all information that is necessary for lowering calls.

This structure contains the information necessary for lowering pointer-authenticating indirect calls.