LLVM: lib/SandboxIR/Instruction.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

11

13

15 switch (Opc) {

16#define OP(OPC) \

17 case Opcode::OPC: \

18 return #OPC;

19#define OPCODES(...) __VA_ARGS__

20#define DEF_INSTR(ID, OPC, CLASS) OPC

21#include "llvm/SandboxIR/Values.def"

22 }

24}

25

28 if (Prev == nullptr) {

29

31 }

32

33

36}

37

42

46

47

50 assert(LLVMI->getParent() != nullptr && "LLVM IR instr is detached!");

51 auto *NextLLVMI = LLVMI->getNextNode();

53 if (NextI == nullptr)

54 return nullptr;

55 return NextI;

56}

57

63 return nullptr;

64}

65

68

69

71 I->removeFromParent();

72}

73

75 assert(users().empty() && "Still connected to users, can't erase!");

76

77 Ctx.runEraseInstrCallbacks(this);

78 std::unique_ptr Detached = Ctx.detach(this);

80

82 if (Tracker.isTracking()) {

83 Tracker.track(std::make_unique(std::move(Detached)));

84

85

86

88 I->removeFromParent();

89

90

92 I->dropAllReferences();

93 } else {

94

96 I->eraseFromParent();

97 }

98}

99

102

103 return;

104

105 Ctx.runMoveInstrCallbacks(this, WhereIt);

106 Ctx.getTracker().emplaceIfTracking(this);

107

110 if (WhereIt == BB.end()) {

111 It = LLVMBB->end();

112 } else {

114 It = WhereI->getTopmostLLVMInstruction()->getIterator();

115 }

116

118 [](auto *I1, auto *I2) { return I1->comesBefore(I2); }) &&

119 "Expected program order!");

120

122 I->moveBefore(*LLVMBB, It);

123}

124

126 llvm::Instruction *BeforeTopI = BeforeI->getTopmostLLVMInstruction();

127

128 Ctx.getTracker().emplaceIfTracking(this);

129

130

138

144 if (WhereIt != BB->end()) {

145 BeforeI = &*WhereIt;

147 LLVMBeforeIt = LLVMBeforeI->getIterator();

148 } else {

149 BeforeI = nullptr;

150 LLVMBeforeI = nullptr;

151 LLVMBeforeIt = LLVMBB->end();

152 }

153

154 Ctx.getTracker().emplaceIfTracking(this);

155

156

158 I->insertInto(LLVMBB, LLVMBeforeIt);

159}

160

162

163

165 if (BB == nullptr)

166 return nullptr;

168}

169

172#define DEF_INSTR(ID, OPC, CLASS) \

173 case ClassID::ID: \

174 return true;

175#include "llvm/SandboxIR/Values.def"

176 default:

177 return false;

178 }

179}

180

182 Ctx.getTracker()

185 this);

187}

190 Ctx.getTracker()

194}

195

197 Ctx.getTracker()

198 .emplaceIfTracking<

199 GenericSetter<&Instruction::isFast, &Instruction::setFast>>(this);

201}

202

204 Ctx.getTracker()

205 .emplaceIfTracking<

209

216

218 Ctx.getTracker()

219 .emplaceIfTracking<

221 this);

224

226 Ctx.getTracker()

227 .emplaceIfTracking<

228 GenericSetter<&Instruction::hasNoInfs, &Instruction::setHasNoInfs>>(

229 this);

231}

232

234 Ctx.getTracker()

237 this);

239}

240

242 Ctx.getTracker()

245 this);

247}

248

250 Ctx.getTracker()

253 this);

255}

256

258 Ctx.getTracker()

262}

263

265 Ctx.getTracker()

269}

270

274

276 Ctx.getTracker()

280}

281

282#ifndef NDEBUG

284 OS << "Unimplemented! Please override dump().";

285}

286#endif

287

289 Context &Ctx, const Twine &Name) {

291 auto *LLVMI =

293 return Ctx.createVAArgInst(LLVMI);

295

299

301 const Twine &Name) {

304 return Ctx.createFreezeInst(LLVMI);

305}

306

310 llvm::FenceInst *LLVMI = Builder.CreateFence(Ordering, SSID);

311 return Ctx.createFenceInst(LLVMI);

312}

313

315 Ctx.getTracker()

316 .emplaceIfTracking<

318 this);

320}

321

323 Ctx.getTracker()

327}

328

333 Builder.CreateSelect(Cond->Val, True->Val, False->Val, Name);

335 return Ctx.createSelectInst(NewSI);

345

349

351 Context &Ctx) {

355 return Ctx.createBranchInst(NewBr);

357

364 return Ctx.createBranchInst(NewBr);

365}

366

370

375

378 "Successor # out of range for Branch!");

381}

382

384 assert((Idx == 0 || Idx == 1) && "Out of bounds!");

386}

390}

392BranchInst::ConstLLVMBBToSBBB::operator()(const llvm::BasicBlock *BB) const {

394}

395

397 Ctx.getTracker()

398 .emplaceIfTracking<

399 GenericSetter<&LoadInst::isVolatile, &LoadInst::setVolatile>>(this);

401}

402

408 Builder.CreateAlignedLoad(Ty->LLVMTy, Ptr->Val, Align, IsVolatile, Name);

409 auto *NewSBI = Ctx.createLoadInst(NewLI);

410 return NewSBI;

411}

412

422 Ctx.getTracker()

423 .emplaceIfTracking<

424 GenericSetter<&StoreInst::isVolatile, &StoreInst::setVolatile>>(this);

426}

427

430 Context &Ctx) {

432 auto *NewSI = Builder.CreateAlignedStore(V->Val, Ptr->Val, Align, IsVolatile);

433 auto *NewSBI = Ctx.createStoreInst(NewSI);

434 return NewSBI;

435}

436

439}

440

444

448

452 return Ctx.createUnreachableInst(NewUI);

453}

454

458

462 if (RetVal != nullptr)

463 NewRI = Builder.CreateRet(RetVal->Val);

464 else

465 NewRI = Builder.CreateRetVoid();

466 return Ctx.createReturnInst(NewRI);

467}

468

472 return createCommon(RetVal, Builder, Ctx);

473}

474

477 return LLVMRetVal != nullptr ? Ctx.getValue(LLVMRetVal) : nullptr;

478}

479

484

491 return Use(LLVMUse, cast(Ctx.getValue(LLVMUse->getUser())), Ctx);

492}

493

501

503

504

505

506

507

508

513}

520 LLVMArgs.reserve(Args.size());

521 for (Value *Arg : Args)

525 return Ctx.createCallInst(NewCI);

526}

527

531 Context &Ctx, const Twine &NameStr) {

534 LLVMArgs.reserve(Args.size());

535 for (Value *Arg : Args)

541 return Ctx.createInvokeInst(Invoke);

542}

543

569

577 LLVMIndirectDests.reserve(IndirectDests.size());

578 for (BasicBlock *IndDest : IndirectDests)

580

582 LLVMArgs.reserve(Args.size());

583 for (Value *Arg : Args)

585

589 LLVMIndirectDests, LLVMArgs, NameStr);

590 return Ctx.createCallBrInst(CallBr);

591}

592

597 return Ctx.getValue(

599}

613 return BBs;

614}

616 Ctx.getTracker()

622 Ctx.getTracker()

636 const Twine &Name) {

639 Builder.CreateLandingPad(RetTy->LLVMTy, NumReservedClauses, Name);

640 return Ctx.createLandingPadInst(LLVMI);

641}

642

649

654

660 Ctx.getTracker()

669

677

682

685 const Twine &Name) {

689 for (auto *Arg : Args)

692 Builder.CreateCatchPad(ParentPad->Val, LLVMArgs, Name);

693 return Ctx.createCatchPadInst(LLVMI);

694}

695

698 const Twine &Name) {

701 LLVMArgs.reserve(Args.size());

702 for (auto *Arg : Args)

705 Builder.CreateCleanupPad(ParentPad->Val, LLVMArgs, Name);

706 return Ctx.createCleanupPadInst(LLVMI);

707}

708

714 return Ctx.createCatchReturnInst(LLVMI);

715}

716

721

723 Ctx.getTracker()

728}

729

734

736 Ctx.getTracker()

741}

742

744 return Ctx.getValue(

746}

747

752 auto *LLVMUnwindBB =

756 return Ctx.createCleanupReturnInst(LLVMI);

757}

758

763

765 Ctx.getTracker()

768 this);

771}

772

777

779 Ctx.getTracker()

782 this);

785}

786

793 for (Value *Idx : IdxList)

796 Builder.CreateGEP(Ty->LLVMTy, Ptr->Val, LLVMIdxList, NameStr);

798 return Ctx.createGetElementPtrInst(NewGEP);

801}

802

804 return Ctx.getType(

806}

807

809 return Ctx.getType(

811}

812

816

818 return Ctx.getType(

820}

821

824}

825

830 Builder.CreatePHI(Ty->LLVMTy, NumReservedValues, Name);

831 return Ctx.createPHINode(NewPHI);

832}

833

837

842 Ctx.getTracker()

845 Idx);

847}

858

859 constexpr BasicBlock *(PHINode::*GetIncomingBlockFn)(unsigned) const =

861 Ctx.getTracker()

862 .emplaceIfTracking<

864 this, Idx);

867}

869 auto &Tracker = Ctx.getTracker();

870 Tracker.emplaceIfTracking(this);

871

874}

880 false);

881 return Ctx.getValue(LLVMV);

882}

886

890 false);

891 return Ctx.getValue(LLVMV);

892}

901 return Ctx.getValue(LLVMV);

902}

905 return LLVMV != nullptr ? Ctx.getValue(LLVMV) : nullptr;

906}

908 assert(New && Old && "Sandbox IR PHI node got a null basic block!");

910 Idx != NumOps; ++Idx)

913}

915

916

917

918

919

920

922 while (Idx > 0) {

923 if (Predicate(Idx - 1))

925 --Idx;

926 }

927}

928

932 auto *LLVMV = Builder.CreateCmp(P, S1->Val, S2->Val, Name);

933

935 return Ctx.getOrCreateConstant(LLVMC);

939}

940

946 return C;

948 return V;

949}

950

958 }

960}

961

963 Ctx.getTracker()

964 .emplaceIfTracking<

967}

968

971 IC->swapOperands();

972 else

974}

975

980

985

986#ifndef NDEBUG

991

996#endif

997

999 switch (Opc) {

1000 case Instruction::Opcode::ZExt:

1002 case Instruction::Opcode::SExt:

1004 case Instruction::Opcode::FPToUI:

1006 case Instruction::Opcode::FPToSI:

1008 case Instruction::Opcode::FPExt:

1010 case Instruction::Opcode::PtrToAddr:

1012 llvm::Instruction::PtrToAddr);

1013 case Instruction::Opcode::PtrToInt:

1015 case Instruction::Opcode::IntToPtr:

1017 case Instruction::Opcode::SIToFP:

1019 case Instruction::Opcode::UIToFP:

1021 case Instruction::Opcode::Trunc:

1023 case Instruction::Opcode::FPTrunc:

1025 case Instruction::Opcode::BitCast:

1027 case Instruction::Opcode::AddrSpaceCast:

1029 llvm::Instruction::AddrSpaceCast);

1030 default:

1032 }

1033}

1034

1035

1037 switch (Opc) {

1038 case Instruction::Opcode::FNeg:

1040 default:

1042 }

1043}

1044

1046 unsigned NumHandlers,

1048 const Twine &Name) {

1052 return Ctx.createCatchSwitchInst(LLVMCSI);

1053}

1054

1058

1060 Ctx.getTracker()

1064}

1065

1069}

1070

1072 Ctx.getTracker()

1077}

1078

1083}

1084

1088 return Ctx.createResumeInst(LLVMI);

1089}

1090

1097 const Twine &Name) {

1102}

1103

1107

1109 Ctx.getTracker()

1110 .emplaceIfTracking<

1112 this);

1114}

1115

1120

1122 Ctx.getTracker()

1127}

1128

1129template <typename LLVMCaseItT, typename BlockT, typename ConstT>

1130ConstT *

1132 const auto &LLVMCaseHandle = *LLVMCaseIt;

1133 auto *LLVMC = Ctx.getValue(LLVMCaseHandle.getCaseValue());

1135}

1137template <typename LLVMCaseItT, typename BlockT, typename ConstT>

1138BlockT *

1140 const {

1141 const auto &LLVMCaseHandle = *LLVMCaseIt;

1142 auto *LLVMBB = LLVMCaseHandle.getCaseSuccessor();

1144}

1145

1154

1160

1167

1170

1172 unsigned CaseNum = It - case_begin();

1174 auto LLVMCaseIt = LLVMSwitch->removeCase(LLVMIt);

1175 unsigned Num = LLVMCaseIt - LLVMSwitch->case_begin();

1176 return CaseIt(this, Num);

1177}

1178

1183

1185 Ctx.getTracker()

1188 Idx);

1191}

1192

1195 const Twine &Name) {

1197 auto *NewLLVMV = Builder.CreateUnOp(getLLVMUnaryOp(Op), OpV->Val, Name);

1199 return Ctx.createUnaryOperator(NewUnOpV);

1200 }

1203}

1204

1207 Context &Ctx, const Twine &Name) {

1208 auto *NewV = create(Op, OpV, Pos, Ctx, Name);

1210 UnI->copyIRFlags(CopyFrom->Val);

1211 return NewV;

1212}

1213

1214

1216 switch (Opc) {

1217 case Instruction::Opcode::Add:

1219 case Instruction::Opcode::FAdd:

1221 case Instruction::Opcode::Sub:

1223 case Instruction::Opcode::FSub:

1225 case Instruction::Opcode::Mul:

1227 case Instruction::Opcode::FMul:

1229 case Instruction::Opcode::UDiv:

1231 case Instruction::Opcode::SDiv:

1233 case Instruction::Opcode::FDiv:

1235 case Instruction::Opcode::URem:

1237 case Instruction::Opcode::SRem:

1239 case Instruction::Opcode::FRem:

1241 case Instruction::Opcode::Shl:

1243 case Instruction::Opcode::LShr:

1245 case Instruction::Opcode::AShr:

1247 case Instruction::Opcode::And:

1249 case Instruction::Opcode::Or:

1251 case Instruction::Opcode::Xor:

1253 default:

1255 }

1256}

1259 const Twine &Name) {

1264 return Ctx.createBinaryOperator(NewBinOp);

1267}

1268

1272 const Twine &Name) {

1273

1277 return NewV;

1278}

1279

1281 Ctx.getTracker()

1289 Ctx.getTracker()

1293}

1294

1296 Ctx.getTracker()

1300}

1303 Ctx.getTracker()

1307}

1308

1310 Ctx.getTracker()

1330 Builder.CreateAtomicRMW(Op, Ptr->Val, Val->Val, Align, Ordering, SSID);

1333}

1334

1336 Ctx.getTracker()

1339 this);

1341}

1342

1346

1350

1354

1362 Builder.CreateAtomicCmpXchg(Ptr->Val, Cmp->Val, New->Val, Align,

1363 SuccessOrdering, FailureOrdering, SSID);

1366}

1367

1369 Ctx.getTracker()

1373}

1374

1376 Ctx.getTracker()

1380}

1381

1383 Ctx.getTracker()

1387}

1388

1390 Ctx.getTracker()

1393 this);

1395}

1396

1398 Ctx.getTracker()

1401 this);

1403}

1404

1407 const Twine &Name) {

1409 auto *NewAlloca =

1410 Builder.CreateAlloca(Ty->LLVMTy, AddrSpace, ArraySize->Val, Name);

1411 return Ctx.createAllocaInst(NewAlloca);

1412}

1413

1417

1419 Ctx.getTracker()

1423}

1424

1426 Ctx.getTracker()

1427 .emplaceIfTracking<

1429 this);

1431}

1432

1434 Ctx.getTracker()

1438}

1439

1443

1447

1452 auto *NewV =

1455 return Ctx.createCastInst(NewCI);

1458}

1459

1463

1467

1471

1473 Ctx.getTracker()

1477}

1478

1481 const Twine &Name) {

1484 Builder.CreateInsertElement(Vec->Val, NewElt->Val, Idx->Val, Name);

1486 return Ctx.createInsertElementInst(NewInsert);

1489}

1490

1494 llvm::Value *NewV = Builder.CreateExtractElement(Vec->Val, Idx->Val, Name);

1496 return Ctx.createExtractElementInst(NewExtract);

1499}

1500

1503 const Twine &Name) {

1506 Builder.CreateShuffleVector(V1->Val, V2->Val, Mask->Val, Name);

1508 return Ctx.createShuffleVectorInst(NewShuffle);

1511}

1512

1515 const Twine &Name) {

1517 llvm::Value *NewV = Builder.CreateShuffleVector(V1->Val, V2->Val, Mask, Name);

1519 return Ctx.createShuffleVectorInst(NewShuffle);

1522}

1523

1528

1533

1540

1542 return Ctx.getOrCreateConstant(

1544}

1545

1547 Type *ResultTy) {

1551}

1552

1556

1559 const Twine &Name) {

1561 llvm::Value *NewV = Builder.CreateExtractValue(Agg->Val, Idxs, Name);

1563 return Ctx.createExtractValueInst(NewExtractValueInst);

1566}

1567

1572

1575 const Twine &Name) {

1577 llvm::Value *NewV = Builder.CreateInsertValue(Agg->Val, Val->Val, Idxs, Name);

1579 return Ctx.createInsertValueInst(NewInsertValueInst);

1582}

1583

1588

1589}

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

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

const size_t AbstractManglingParser< Derived, Alloc >::NumOps

const SmallVectorImpl< MachineOperand > & Cond

static Value * getParentPad(Value *EHPad)

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

size_t size() const

size - Get the array size.

void setSyncScopeID(SyncScope::ID SSID)

Sets the synchronization scope ID of this cmpxchg instruction.

SyncScope::ID getSyncScopeID() const

Returns the synchronization scope ID of this cmpxchg instruction.

Align getAlign() const

Return the alignment of the memory that is being allocated by the instruction.

void setAlignment(Align Align)

LLVM Basic Block Representation.

const Function * getParent() const

Return the enclosing method, or null if none.

InstListType::iterator iterator

Instruction iterators...

Conditional or Unconditional Branch instruction.

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

BasicBlock * getIndirectDest(unsigned i) const

void setDefaultDest(BasicBlock *B)

void setIndirectDest(unsigned i, BasicBlock *B)

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

BasicBlock * getSuccessor() const

void setSuccessor(BasicBlock *NewSucc)

void setUnwindDest(BasicBlock *UnwindDest)

BasicBlock * getUnwindDest() const

void setUnwindDest(BasicBlock *NewDest)

static LLVM_ABI ConstantTokenNone * get(LLVMContext &Context)

Return the ConstantTokenNone.

Convenience struct for specifying and reasoning about fast-math flags.

An instruction for ordering other memory operations.

void setArgOperand(unsigned i, Value *v)

This provides a uniform API for creating instructions and inserting them into a basic block: either a...

LLVM_ABI void copyFastMathFlags(FastMathFlags FMF)

Convenience function for transferring all fast-math flag values to this instruction,...

Definition Instruction.cpp:638

LLVM_ABI FastMathFlags getFastMathFlags() const LLVM_READONLY

Convenience function for getting all the fast-math flags, which must be an operator which supports th...

Definition Instruction.cpp:683

Instruction(const Instruction &)=delete

friend class BasicBlock

Various leaf nodes.

The landingpad instruction holds all of the information necessary to generate correct exception handl...

bool isCleanup() const

Return 'true' if this landingpad instruction is a cleanup.

void setCleanup(bool V)

Indicate that this landingpad instruction is a cleanup.

void setIsDisjoint(bool B)

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

static LLVM_ABI Constant * convertShuffleMaskForBitcode(ArrayRef< int > Mask, Type *ResultTy)

void reserve(size_type N)

void push_back(const T &Elt)

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

CaseIteratorImpl< ConstCaseHandle > ConstCaseIt

CaseIteratorImpl< CaseHandle > CaseIt

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.

LLVMContext & getContext() const

Return the LLVMContext in which this type was uniqued.

static LLVM_ABI IntegerType * getInt1Ty(LLVMContext &C)

This function has undefined behavior.

A Use represents the edge between a Value definition and its users.

LLVM Value Representation.

static LLVM_ABI VectorType * get(Type *ElementType, ElementCount EC)

This static method is the primary way to construct an VectorType.

An efficient, type-erasing, non-owning reference to a callable.

self_iterator getIterator()

NodeTy * getNextNode()

Get the next node, or nullptr for the list tail.

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

bool isUsedWithInAlloca() const

Return true if this alloca is used as an inalloca argument to a call.

LLVM_ABI Type * getAllocatedType() const

Return the type that is being allocated by the instruction.

Definition Instruction.cpp:1414

LLVM_ABI void setAllocatedType(Type *Ty)

for use only in special circumstances that need to generically transform a whole instruction (eg: IR ...

Definition Instruction.cpp:1418

LLVM_ABI Value * getArraySize()

Get the number of elements allocated.

Definition Instruction.cpp:1440

LLVM_ABI PointerType * getType() const

Overload to return most specific pointer type.

Definition Instruction.cpp:1444

LLVM_ABI void setUsedWithInAlloca(bool V)

Specify whether this alloca is used to represent the arguments to a call.

Definition Instruction.cpp:1433

LLVM_ABI void setAlignment(Align Align)

Definition Instruction.cpp:1425

static LLVM_ABI AllocaInst * create(Type *Ty, unsigned AddrSpace, InsertPosition Pos, Context &Ctx, Value *ArraySize=nullptr, const Twine &Name="")

Definition Instruction.cpp:1405

LLVM_ABI Value * getPointerOperand()

Definition Instruction.cpp:1343

LLVM_ABI void setSuccessOrdering(AtomicOrdering Ordering)

Definition Instruction.cpp:1389

LLVM_ABI void setWeak(bool IsWeak)

Definition Instruction.cpp:1382

LLVM_ABI void setVolatile(bool V)

Specify whether this is a volatile cmpxchg.

Definition Instruction.cpp:1375

LLVM_ABI void setFailureOrdering(AtomicOrdering Ordering)

Definition Instruction.cpp:1397

AtomicOrdering getFailureOrdering() const

LLVM_ABI void setAlignment(Align Align)

Definition Instruction.cpp:1368

LLVM_ABI Value * getCompareOperand()

Definition Instruction.cpp:1347

static LLVM_ABI AtomicCmpXchgInst * create(Value *Ptr, Value *Cmp, Value *New, MaybeAlign Align, AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, InsertPosition Pos, Context &Ctx, SyncScope::ID SSID=SyncScope::System, const Twine &Name="")

Definition Instruction.cpp:1356

bool isVolatile() const

Return true if this is a cmpxchg from a volatile memory location.

LLVM_ABI void setSyncScopeID(SyncScope::ID SSID)

Definition Instruction.cpp:1335

AtomicOrdering getSuccessOrdering() const

LLVM_ABI Value * getNewValOperand()

Definition Instruction.cpp:1351

Align getAlign() const

Return the alignment of the memory that is being allocated by the instruction.

bool isWeak() const

Return true if this cmpxchg may spuriously fail.

LLVM_ABI Value * getValOperand()

Definition Instruction.cpp:1320

static LLVM_ABI AtomicRMWInst * create(BinOp Op, Value *Ptr, Value *Val, MaybeAlign Align, AtomicOrdering Ordering, InsertPosition Pos, Context &Ctx, SyncScope::ID SSID=SyncScope::System, const Twine &Name="")

Definition Instruction.cpp:1324

LLVM_ABI void setSyncScopeID(SyncScope::ID SSID)

Definition Instruction.cpp:1309

llvm::AtomicRMWInst::BinOp BinOp

LLVM_ABI void setOrdering(AtomicOrdering Ordering)

Definition Instruction.cpp:1302

SyncScope::ID getSyncScopeID() const

LLVM_ABI void setVolatile(bool V)

Definition Instruction.cpp:1295

AtomicOrdering getOrdering() const

LLVM_ABI Value * getPointerOperand()

Definition Instruction.cpp:1316

LLVM_ABI void setAlignment(Align Align)

Definition Instruction.cpp:1288

static LLVM_ABI Value * create(Instruction::Opcode Op, Value *LHS, Value *RHS, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1257

static LLVM_ABI Value * createWithCopiedFlags(Instruction::Opcode Op, Value *LHS, Value *RHS, Value *CopyFrom, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1269

LLVM_ABI BasicBlock * getSuccessor(unsigned SuccIdx) const

Definition Instruction.cpp:376

LLVM_ABI Value * getCondition() const

Definition Instruction.cpp:371

LLVM_ABI void setSuccessor(unsigned Idx, BasicBlock *NewSucc)

Definition Instruction.cpp:383

unsigned getNumSuccessors() const

static LLVM_ABI BranchInst * create(BasicBlock *IfTrue, InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:350

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:367

bool isConditional() const

LLVM_ABI Function * getCalledFunction() const

Definition Instruction.cpp:494

LLVM_ABI Use getCalledOperandUse() const

Definition Instruction.cpp:489

LLVM_ABI FunctionType * getFunctionType() const

Definition Instruction.cpp:480

LLVM_ABI void setCalledFunction(Function *F)

Definition Instruction.cpp:502

LLVM_ABI Function * getCaller()

Definition Instruction.cpp:498

LLVM_ABI Value * getCalledOperand() const

Definition Instruction.cpp:485

void setCalledOperand(Value *V)

LLVM_ABI Value * getIndirectDestLabelUse(unsigned Idx) const

Definition Instruction.cpp:596

static LLVM_ABI CallBrInst * create(FunctionType *FTy, Value *Func, BasicBlock *DefaultDest, ArrayRef< BasicBlock * > IndirectDests, ArrayRef< Value * > Args, InsertPosition Pos, Context &Ctx, const Twine &NameStr="")

Definition Instruction.cpp:570

LLVM_ABI Value * getIndirectDestLabel(unsigned Idx) const

Definition Instruction.cpp:593

LLVM_ABI BasicBlock * getSuccessor(unsigned Idx) const

Definition Instruction.cpp:629

LLVM_ABI void setIndirectDest(unsigned Idx, BasicBlock *BB)

Definition Instruction.cpp:621

LLVM_ABI BasicBlock * getDefaultDest() const

Definition Instruction.cpp:600

LLVM_ABI BasicBlock * getIndirectDest(unsigned Idx) const

Definition Instruction.cpp:604

LLVM_ABI SmallVector< BasicBlock *, 16 > getIndirectDests() const

Definition Instruction.cpp:608

LLVM_ABI void setDefaultDest(BasicBlock *BB)

Definition Instruction.cpp:615

static LLVM_ABI CallInst * create(FunctionType *FTy, Value *Func, ArrayRef< Value * > Args, InsertPosition Pos, Context &Ctx, const Twine &NameStr="")

Definition Instruction.cpp:515

LLVM_ABI Type * getSrcTy() const

Definition Instruction.cpp:1464

static LLVM_ABI Value * create(Type *DestTy, Opcode Op, Value *Operand, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1448

LLVM_ABI Type * getDestTy() const

Definition Instruction.cpp:1468

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:1460

static LLVM_ABI CatchPadInst * create(Value *ParentPad, ArrayRef< Value * > Args, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:683

LLVM_ABI CatchSwitchInst * getCatchSwitch() const

Definition Instruction.cpp:678

LLVM_ABI CatchPadInst * getCatchPad() const

Definition Instruction.cpp:717

LLVM_ABI BasicBlock * getSuccessor() const

Definition Instruction.cpp:730

LLVM_ABI void setSuccessor(BasicBlock *NewSucc)

Definition Instruction.cpp:735

LLVM_ABI void setCatchPad(CatchPadInst *CatchPad)

Definition Instruction.cpp:722

LLVM_ABI Value * getCatchSwitchParentPad() const

Definition Instruction.cpp:743

static LLVM_ABI CatchReturnInst * create(CatchPadInst *CatchPad, BasicBlock *BB, InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:709

LLVM_ABI void addHandler(BasicBlock *Dest)

Definition Instruction.cpp:1079

LLVM_ABI void setParentPad(Value *ParentPad)

Definition Instruction.cpp:1059

LLVM_ABI void setUnwindDest(BasicBlock *UnwindDest)

Definition Instruction.cpp:1071

static LLVM_ABI CatchSwitchInst * create(Value *ParentPad, BasicBlock *UnwindBB, unsigned NumHandlers, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1045

LLVM_ABI BasicBlock * getUnwindDest() const

Definition Instruction.cpp:1066

LLVM_ABI Value * getParentPad() const

Definition Instruction.cpp:1055

static LLVM_ABI CleanupPadInst * create(Value *ParentPad, ArrayRef< Value * > Args, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:696

LLVM_ABI CleanupPadInst * getCleanupPad() const

Definition Instruction.cpp:759

LLVM_ABI void setUnwindDest(BasicBlock *NewDest)

Definition Instruction.cpp:778

static LLVM_ABI CleanupReturnInst * create(CleanupPadInst *CleanupPad, BasicBlock *UnwindBB, InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:748

LLVM_ABI BasicBlock * getUnwindDest() const

Definition Instruction.cpp:773

LLVM_ABI void setCleanupPad(CleanupPadInst *CleanupPad)

Definition Instruction.cpp:764

llvm::CmpInst::Predicate Predicate

void dumpOS(raw_ostream &OS) const override

Definition Instruction.cpp:987

LLVM_DUMP_METHOD void dump() const

Definition Instruction.cpp:992

static LLVM_ABI Value * createWithCopiedFlags(Predicate Pred, Value *S1, Value *S2, const Instruction *FlagsSource, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:941

static LLVM_ABI Type * makeCmpResultType(Type *OpndType)

Create a result type for fcmp/icmp.

Definition Instruction.cpp:951

static LLVM_ABI Value * create(Predicate Pred, Value *S1, Value *S2, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:929

LLVM_ABI void setPredicate(Predicate P)

Definition Instruction.cpp:962

LLVM_ABI void swapOperands()

Definition Instruction.cpp:969

static LLVM_ABI ConstantTokenNone * get(Context &Ctx)

Return the ConstantTokenNone.

Definition Instruction.cpp:1584

Type * getType(llvm::Type *LLVMTy)

LLVM_ABI Constant * getOrCreateConstant(llvm::Constant *LLVMC)

Get or create a sandboxir::Constant from an existing LLVM IR LLVMC.

Value * getVectorOperand()

static LLVM_ABI Value * create(Value *Vec, Value *Idx, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1491

LLVM_ABI VectorType * getVectorOperandType() const

Definition Instruction.cpp:1553

static LLVM_ABI Value * create(Value *Agg, ArrayRef< unsigned > Idxs, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1557

static LLVM_ABI Type * getIndexedType(Type *Agg, ArrayRef< unsigned > Idxs)

Returns the type of the element that would be extracted with an extractvalue instruction with the spe...

Definition Instruction.cpp:1568

LLVM_ABI void swapOperands()

Definition Instruction.cpp:981

static LLVM_ABI FenceInst * create(AtomicOrdering Ordering, InsertPosition Pos, Context &Ctx, SyncScope::ID SSID=SyncScope::System)

Definition Instruction.cpp:307

LLVM_ABI void setOrdering(AtomicOrdering Ordering)

Sets the ordering constraint of this fence instruction.

Definition Instruction.cpp:314

SyncScope::ID getSyncScopeID() const

Returns the synchronization scope ID of this fence instruction.

LLVM_ABI void setSyncScopeID(SyncScope::ID SSID)

Sets the synchronization scope ID of this fence instruction.

Definition Instruction.cpp:322

static LLVM_ABI FreezeInst * create(Value *V, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:300

LLVM_ABI Value * getArgOperand(unsigned Idx) const

Return the Idx-th funcletpad argument.

Definition Instruction.cpp:666

LLVM_ABI Value * getParentPad() const

Return the outer EH-pad this funclet is nested within.

Definition Instruction.cpp:655

LLVM_ABI void setParentPad(Value *ParentPad)

Definition Instruction.cpp:659

LLVM_ABI void setArgOperand(unsigned Idx, Value *V)

Set the Idx-th funcletpad argument.

Definition Instruction.cpp:670

Similar to GenericSetter but the setters/getters have an index as their first argument.

This class can be used for tracking most instruction setters.

LLVM_ABI Type * getResultElementType() const

Definition Instruction.cpp:808

LLVM_ABI Type * getPointerOperandType() const

Definition Instruction.cpp:817

LLVM_ABI Type * getSourceElementType() const

Definition Instruction.cpp:803

LLVM_ABI Value * getPointerOperand() const

Definition Instruction.cpp:813

static LLVM_ABI Value * create(Type *Ty, Value *Ptr, ArrayRef< Value * > IdxList, InsertPosition Pos, Context &Ctx, const Twine &NameStr="")

Definition Instruction.cpp:787

LLVM_ABI void swapOperands()

Definition Instruction.cpp:976

static LLVM_ABI Value * create(Value *Vec, Value *NewElt, Value *Idx, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1479

static LLVM_ABI Value * create(Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1573

A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction ...

bool hasNoUnsignedWrap() const

Determine whether the no signed wrap flag is set.

static IRBuilder & setInsertPos(InsertPosition Pos)

Helper function for create().

LLVM_ABI void setFastMathFlags(FastMathFlags FMF)

Convenience function for setting multiple fast-math flags on this instruction, which must be an opera...

Definition Instruction.cpp:257

bool hasAllowReassoc() const

Determine whether the allow-reassociation flag is set.

LLVM_ABI void setHasAllowReassoc(bool B)

Set or clear the reassociation flag on this instruction, which must be an operator which supports thi...

Definition Instruction.cpp:210

bool hasNoSignedZeros() const

Determine whether the no-signed-zeros flag is set.

const char * getOpcodeName() const

LLVM_ABI void setHasNoSignedWrap(bool B=true)

Set or clear the nsw flag on this instruction, which must be an operator which supports this flag.

Definition Instruction.cpp:189

LLVM_ABI void insertAfter(Instruction *AfterI)

Insert this detached instruction after AfterI.

Definition Instruction.cpp:135

LLVM_ABI void moveBefore(BasicBlock &BB, const BBIterator &WhereIt)

Move this instruction to WhereIt.

Definition Instruction.cpp:100

bool hasAllowContract() const

Determine whether the allow-contract flag is set.

LLVM_ABI void setIsExact(bool B=true)

Set or clear the exact flag on this instruction, which must be an operator which supports this flag.

Definition Instruction.cpp:203

bool hasApproxFunc() const

Determine whether the approximate-math-functions flag is set.

bool hasNoSignedWrap() const

Determine whether the no signed wrap flag is set.

LLVM_ABI void setHasNoUnsignedWrap(bool B=true)

Set or clear the nuw flag on this instruction, which must be an operator which supports this flag.

Definition Instruction.cpp:181

void dumpOS(raw_ostream &OS) const override

Definition Instruction.cpp:283

LLVM_ABI BBIterator getIterator() const

\Returns a BasicBlock::iterator for this Instruction.

Definition Instruction.cpp:38

LLVM_ABI void setFast(bool B)

Set or clear all fast-math-flags on this instruction, which must be an operator which supports this f...

Definition Instruction.cpp:196

LLVM_ABI void setHasApproxFunc(bool B)

Set or clear the approximate-math-functions flag on this instruction, which must be an operator which...

Definition Instruction.cpp:275

LLVM_ABI void setHasNoNaNs(bool B)

Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag...

Definition Instruction.cpp:217

LLVM_ABI void copyFastMathFlags(FastMathFlags FMF)

Convenience function for transferring all fast-math flag values to this instruction,...

Definition Instruction.cpp:264

LLVM_ABI void setHasNoSignedZeros(bool B)

Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports t...

Definition Instruction.cpp:233

LLVM_ABI void insertInto(BasicBlock *BB, const BBIterator &WhereIt)

Insert this detached instruction into BB at WhereIt.

Definition Instruction.cpp:139

LLVM_ABI llvm::Instruction * getTopmostLLVMInstruction() const

A SandboxIR Instruction may map to multiple LLVM IR Instruction.

Definition Instruction.cpp:26

LLVM_ABI void setHasAllowContract(bool B)

Set or clear the allow-contract flag on this instruction, which must be an operator which supports th...

Definition Instruction.cpp:249

virtual SmallVector< llvm::Instruction *, 1 > getLLVMInstrs() const =0

\Returns the LLVM IR Instructions that this SandboxIR maps to in program order.

LLVM_ABI Type * getAccessType() const

Definition Instruction.cpp:271

Instruction(ClassID ID, Opcode Opc, llvm::Instruction *I, sandboxir::Context &SBCtx)

FastMathFlags getFastMathFlags() const

Convenience function for getting all the fast-math flags, which must be an operator which supports th...

LLVM_ABI Instruction * getNextNode() const

\Returns the next sandboxir::Instruction in the block, or nullptr if at the end of the block.

Definition Instruction.cpp:43

LLVM_ABI void removeFromParent()

Detach this from its parent BasicBlock without deleting it.

Definition Instruction.cpp:66

LLVM_ABI Instruction * getPrevNode() const

\Returns the previous sandboxir::Instruction in the block, or nullptr if at the beginning of the bloc...

Definition Instruction.cpp:58

bool hasAllowReciprocal() const

Determine whether the allow-reciprocal flag is set.

LLVM_ABI void insertBefore(Instruction *BeforeI)

Insert this detached instruction before BeforeI.

Definition Instruction.cpp:125

LLVM_ABI void eraseFromParent()

Detach this Value from its parent and delete it.

Definition Instruction.cpp:74

LLVM_ABI void setHasAllowReciprocal(bool B)

Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports ...

Definition Instruction.cpp:241

LLVM_ABI void setHasNoInfs(bool B)

Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag...

Definition Instruction.cpp:225

LLVM_ABI BasicBlock * getParent() const

\Returns the BasicBlock containing this Instruction, or null if it is detached.

Definition Instruction.cpp:161

static LLVM_ABI bool classof(const sandboxir::Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:170

LLVM_ABI BasicBlock * getUnwindDest() const

Definition Instruction.cpp:548

static LLVM_ABI InvokeInst * create(FunctionType *FTy, Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef< Value * > Args, InsertPosition Pos, Context &Ctx, const Twine &NameStr="")

Definition Instruction.cpp:528

LLVM_ABI void setNormalDest(BasicBlock *BB)

Definition Instruction.cpp:552

LLVM_ABI void setUnwindDest(BasicBlock *BB)

Definition Instruction.cpp:556

LLVM_ABI BasicBlock * getSuccessor(unsigned SuccIdx) const

Definition Instruction.cpp:565

LLVM_ABI BasicBlock * getNormalDest() const

Definition Instruction.cpp:544

LLVM_ABI LandingPadInst * getLandingPadInst() const

Definition Instruction.cpp:560

LLVM_ABI void setCleanup(bool V)

Indicate that this landingpad instruction is a cleanup.

Definition Instruction.cpp:643

LLVM_ABI Constant * getClause(unsigned Idx) const

Get the value of the clause at index Idx.

Definition Instruction.cpp:650

static LLVM_ABI LandingPadInst * create(Type *RetTy, unsigned NumReservedClauses, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:634

static LLVM_ABI LoadInst * create(Type *Ty, Value *Ptr, MaybeAlign Align, InsertPosition Pos, bool IsVolatile, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:403

LLVM_ABI void setVolatile(bool V)

Specify whether this is a volatile load or not.

Definition Instruction.cpp:396

LLVM_ABI Value * getPointerOperand() const

Definition Instruction.cpp:417

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:413

LLVM_ABI Value * hasConstantValue() const

Definition Instruction.cpp:903

LLVM_ABI int getBasicBlockIndex(const BasicBlock *BB) const

Definition Instruction.cpp:893

unsigned getNumIncomingValues() const

LLVM_ABI Value * getIncomingValue(unsigned Idx) const

Definition Instruction.cpp:838

LLVM_ABI void setIncomingBlock(unsigned Idx, BasicBlock *BB)

Definition Instruction.cpp:857

LLVM_ABI void removeIncomingValueIf(function_ref< bool(unsigned)> Predicate)

Definition Instruction.cpp:914

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:834

static LLVM_ABI PHINode * create(Type *Ty, unsigned NumReservedValues, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:826

LLVM_ABI Value * removeIncomingValue(unsigned Idx)

Definition Instruction.cpp:875

LLVM_ABI void setIncomingValue(unsigned Idx, Value *V)

Definition Instruction.cpp:841

LLVM_ABI BasicBlock * getIncomingBlock(unsigned Idx) const

Definition Instruction.cpp:848

LLVM_ABI void replaceIncomingBlockWith(const BasicBlock *Old, BasicBlock *New)

Definition Instruction.cpp:907

LLVM_ABI Value * getIncomingValueForBlock(const BasicBlock *BB) const

Definition Instruction.cpp:897

LLVM_ABI void addIncoming(Value *V, BasicBlock *BB)

Definition Instruction.cpp:868

LLVM_ABI void setIsDisjoint(bool B)

Definition Instruction.cpp:1280

LLVM_ABI void setNonNeg(bool B)

Definition Instruction.cpp:1472

static LLVM_ABI ResumeInst * create(Value *Exn, InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:1085

LLVM_ABI Value * getValue() const

Definition Instruction.cpp:1091

static LLVM_ABI ReturnInst * create(Value *RetVal, InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:469

LLVM_ABI Value * getReturnValue() const

\Returns null if there is no return value.

Definition Instruction.cpp:475

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:346

LLVM_ABI void swapValues()

Definition Instruction.cpp:340

static LLVM_ABI Value * create(Value *Cond, Value *True, Value *False, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:329

LLVM_ABI VectorType * getType() const

Overload to return most specific vector type.

Definition Instruction.cpp:1529

LLVM_ABI Constant * getShuffleMaskForBitcode() const

Return the mask for this instruction, for use in bitcode.

Definition Instruction.cpp:1541

LLVM_ABI void commute()

Swap the operands and adjust the mask to preserve the semantics of the instruction.

Definition Instruction.cpp:1534

static LLVM_ABI Value * create(Value *V1, Value *V2, Value *Mask, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1501

static LLVM_ABI Constant * convertShuffleMaskForBitcode(ArrayRef< int > Mask, Type *ResultTy)

Definition Instruction.cpp:1546

LLVM_ABI void setShuffleMask(ArrayRef< int > Mask)

Definition Instruction.cpp:1524

void dumpOS(raw_ostream &OS) const override

LLVM_ABI void setVolatile(bool V)

Specify whether this is a volatile store or not.

Definition Instruction.cpp:421

static LLVM_ABI bool classof(const Value *From)

For isa/dyn_cast.

Definition Instruction.cpp:437

static LLVM_ABI StoreInst * create(Value *V, Value *Ptr, MaybeAlign Align, InsertPosition Pos, bool IsVolatile, Context &Ctx)

Definition Instruction.cpp:428

LLVM_ABI Value * getPointerOperand() const

Definition Instruction.cpp:445

LLVM_ABI Value * getValueOperand() const

Definition Instruction.cpp:441

BlockT * getCaseSuccessor() const

Definition Instruction.cpp:1139

ConstT * getCaseValue() const

Definition Instruction.cpp:1131

static LLVM_ABI SwitchInst * create(Value *V, BasicBlock *Dest, unsigned NumCases, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1095

LLVM_ABI void addCase(ConstantInt *OnVal, BasicBlock *Dest)

Definition Instruction.cpp:1161

LLVM_ABI BasicBlock * getSuccessor(unsigned Idx) const

Definition Instruction.cpp:1179

LLVM_ABI void setDefaultDest(BasicBlock *DefaultCase)

Definition Instruction.cpp:1121

LLVM_ABI BasicBlock * getDefaultDest() const

Definition Instruction.cpp:1116

CaseItImpl< llvm::SwitchInst::CaseIt, BasicBlock, ConstantInt > CaseIt

LLVM_ABI Value * getCondition() const

Definition Instruction.cpp:1104

LLVM_ABI void setSuccessor(unsigned Idx, BasicBlock *NewSucc)

Definition Instruction.cpp:1184

LLVM_ABI void setCondition(Value *V)

Definition Instruction.cpp:1108

LLVM_ABI ConstantInt * findCaseDest(BasicBlock *BB)

Definition Instruction.cpp:1155

LLVM_ABI CaseIt removeCase(CaseIt It)

This method removes the specified case and its successor from the switch instruction.

Definition Instruction.cpp:1168

The tracker collects all the change objects and implements the main API for saving / reverting / acce...

bool emplaceIfTracking(ArgsT... Args)

A convenience wrapper for track() that constructs and tracks the Change object if tracking is enabled...

Just like llvm::Type these are immutable, unique, never get freed and can only be created via static ...

static LLVM_ABI Type * getInt1Ty(Context &Ctx)

Context & getContext() const

static LLVM_ABI Value * createWithCopiedFlags(Instruction::Opcode Op, Value *OpV, Value *CopyFrom, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1205

static LLVM_ABI Value * create(Instruction::Opcode Op, Value *OpV, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:1193

static LLVM_ABI UnreachableInst * create(InsertPosition Pos, Context &Ctx)

Definition Instruction.cpp:449

static LLVM_ABI bool classof(const Value *From)

Definition Instruction.cpp:455

Tracks swapping a Use with another Use.

Represents a Def-use/Use-def edge in SandboxIR.

virtual void setOperand(unsigned OperandIdx, Value *Operand)

virtual unsigned getNumOperands() const

Use getOperandUse(unsigned OpIdx) const

\Returns the operand edge for OpIdx.

LLVM_ABI Value * getPointerOperand()

Definition Instruction.cpp:296

static LLVM_ABI VAArgInst * create(Value *List, Type *Ty, InsertPosition Pos, Context &Ctx, const Twine &Name="")

Definition Instruction.cpp:288

A SandboxIR Value has users. This is the base class.

llvm::Value * Val

The LLVM Value that corresponds to this SandboxIR Value.

ClassID getSubclassID() const

void dumpCommonSuffix(raw_ostream &OS) const

Context & Ctx

All values point to the context.

LLVM_ABI Type * getType() const

iterator_range< user_iterator > users()

void dumpCommonPrefix(raw_ostream &OS) const

#define llvm_unreachable(msg)

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

@ C

The default llvm calling convention, compatible with C.

static llvm::Instruction::CastOps getLLVMCastOp(Instruction::Opcode Opc)

Definition Instruction.cpp:998

BasicBlock(llvm::BasicBlock *BB, Context &SBCtx)

static llvm::Instruction::UnaryOps getLLVMUnaryOp(Instruction::Opcode Opc)

\Returns the LLVM opcode that corresponds to Opc.

Definition Instruction.cpp:1036

LLVM_ABI iterator begin() const

static llvm::Instruction::BinaryOps getLLVMBinaryOp(Instruction::Opcode Opc)

\Returns the LLVM opcode that corresponds to Opc.

Definition Instruction.cpp:1215

decltype(auto) dyn_cast(const From &Val)

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

auto cast_or_null(const Y &Val)

const Value * getPointerOperand(const Value *V)

A helper function that returns the pointer operand of a load, store or GEP instruction.

auto reverse(ContainerTy &&C)

LLVM_ABI raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

bool is_sorted(R &&Range, Compare C)

Wrapper function around std::is_sorted to check if elements in a range R are sorted with respect to a...

bool isa(const From &Val)

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

AtomicOrdering

Atomic ordering for LLVM's memory model.

DWARFExpression::Operation Op

decltype(auto) cast(const From &Val)

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

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

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