|
LLVM 24.0.0git
|
#include "llvm/SandboxIR/Context.h"
Classes | |
| class | CallbackID |
| An ID for a registered callback. More... | |
| struct | TypeDeleter |
| Type has a protected destructor to prohibit the user from managing the lifetime of the Type objects. More... | |
Public Types | |
| using | EraseInstrCallback = std::function<void(Instruction *)> |
| using | CreateInstrCallback = std::function<void(Instruction *)> |
| using | MoveInstrCallback |
| using | SetUseCallback = std::function<void(const Use &, Value *)> |
Public Member Functions | |
| Context (LLVMContext &LLVMCtx) | |
| virtual | ~Context () |
| void | clear () |
| Clears function-level state. | |
| Tracker & | getTracker () |
| void | save () |
| Convenience function for getTracker().save() | |
| void | revert (bool RevertAll=false) |
| Convenience function for getTracker().revert() | |
| void | accept (bool AcceptAll=false) |
| Convenience function for getTracker().accept() | |
| sandboxir::Value * | getValue (llvm::Value *V) const |
| const sandboxir::Value * | getValue (const llvm::Value *V) const |
| Module * | getModule (llvm::Module *LLVMM) const |
| Module * | getOrCreateModule (llvm::Module *LLVMM) |
| Type * | getType (llvm::Type *LLVMTy) |
| Function * | createFunction (llvm::Function *F) |
Create a sandboxir::Function for an existing LLVM IR F, including all blocks and instructions. | |
| Module * | createModule (llvm::Module *LLVMM) |
Create a sandboxir::Module corresponding to LLVMM. | |
| size_t | getNumValues () const |
| \Returns the number of values registered with Context. | |
| CallbackID | registerEraseInstrCallback (EraseInstrCallback CB, std::optional< CallbackID > BeforeID=std::nullopt) |
| Register a callback that gets called when a SandboxIR instruction is about to be removed from its parent. | |
| void | unregisterEraseInstrCallback (CallbackID ID) |
| CallbackID | registerCreateInstrCallback (CreateInstrCallback CB, std::optional< CallbackID > BeforeID=std::nullopt) |
| Register a callback that gets called right after a SandboxIR instruction is created. | |
| void | unregisterCreateInstrCallback (CallbackID ID) |
| CallbackID | registerMoveInstrCallback (MoveInstrCallback CB, std::optional< CallbackID > BeforeID=std::nullopt) |
| Register a callback that gets called when a SandboxIR instruction is about to be moved. | |
| void | unregisterMoveInstrCallback (CallbackID ID) |
| CallbackID | registerSetUseCallback (SetUseCallback CB, std::optional< CallbackID > BeforeID=std::nullopt) |
| Register a callback that gets called when a Use gets set. | |
| void | unregisterSetUseCallback (CallbackID ID) |
Friends | |
| class | Type |
| MessagePack types as defined in the standard, with the exception of Integer being divided into a signed Int and unsigned UInt variant in order to map directly to C++ types. | |
| class | PointerType |
| class | IntegerType |
| class | ByteType |
| class | StructType |
| class | Region |
| class | IRSnapshotChecker |
| class | Instruction |
| Iterator for Instructions in a `BasicBlock. | |
| class | EraseFromParent |
| class | ConstantDataSequential |
| class | Utils |
| class | User |
| class | Value |
| class | BasicBlock |
| Various leaf nodes. | |
| using llvm::sandboxir::Context::CreateInstrCallback = std::function<void(Instruction *)> |
| using llvm::sandboxir::Context::EraseInstrCallback = std::function<void(Instruction *)> |
| using llvm::sandboxir::Context::SetUseCallback = std::function<void(const Use &, Value *)> |
| llvm::sandboxir::Context::Context | ( | LLVMContext & | LLVMCtx | ) |
Definition at line 647 of file Context.cpp.
References IRTracker, LLVMCtx, and LLVMIRBuilder.
Referenced by llvm::sandboxir::SBVecContext::SBVecContext().
|
virtualdefault |
References clear().
|
inline |
Convenience function for getTracker().accept()
Definition at line 247 of file Context.h.
References IRTracker.
| void llvm::sandboxir::Context::clear | ( | ) |
Clears function-level state.
Definition at line 653 of file Context.cpp.
References LLVMValueToValueMap.
Referenced by ~Context().
|
protected |
Definition at line 620 of file Context.cpp.
References AllocaInst, llvm::cast(), I, and registerValue().
|
protected |
Definition at line 615 of file Context.cpp.
References AtomicCmpXchgInst, llvm::cast(), I, and registerValue().
|
protected |
Definition at line 610 of file Context.cpp.
References AtomicRMWInst, llvm::cast(), I, and registerValue().
|
protected |
Create a sandboxir::BasicBlock for an existing LLVM IR BB.
This will also create all contents of the block.
Definition at line 455 of file Context.cpp.
References assert(), BasicBlock, llvm::cast(), getValue(), and registerValue().
Referenced by createFunction().
|
protected |
Definition at line 606 of file Context.cpp.
References BinaryOperator, llvm::cast(), I, and registerValue().
|
protected |
Definition at line 552 of file Context.cpp.
References CallBrInst, llvm::cast(), I, and registerValue().
|
protected |
Definition at line 542 of file Context.cpp.
References CallInst, llvm::cast(), I, and registerValue().
|
protected |
Definition at line 624 of file Context.cpp.
References llvm::cast(), CastInst, I, and registerValue().
|
protected |
Definition at line 566 of file Context.cpp.
References llvm::cast(), CatchPadInst, I, and registerValue().
|
protected |
Definition at line 574 of file Context.cpp.
References llvm::cast(), CatchReturnInst, I, and registerValue().
|
protected |
Definition at line 590 of file Context.cpp.
References llvm::cast(), CatchSwitchInst, I, and registerValue().
|
protected |
Definition at line 570 of file Context.cpp.
References llvm::cast(), CleanupPadInst, I, and registerValue().
|
protected |
Definition at line 579 of file Context.cpp.
References llvm::cast(), CleanupReturnInst, I, and registerValue().
|
protected |
|
protected |
Definition at line 522 of file Context.cpp.
References llvm::cast(), CondBrInst, and registerValue().
|
protected |
Definition at line 485 of file Context.cpp.
References llvm::cast(), ExtractElementInst, and registerValue().
|
protected |
Definition at line 505 of file Context.cpp.
References llvm::cast(), ExtractValueInst, and registerValue().
|
protected |
Definition at line 636 of file Context.cpp.
References llvm::cast(), FCmpInst, I, and registerValue().
|
protected |
Definition at line 474 of file Context.cpp.
References llvm::cast(), FenceInst, and registerValue().
|
protected |
Definition at line 469 of file Context.cpp.
References llvm::cast(), FreezeInst, and registerValue().
| Function * llvm::sandboxir::Context::createFunction | ( | llvm::Function * | F | ) |
Create a sandboxir::Function for an existing LLVM IR F, including all blocks and instructions.
This is the main API function for creating Sandbox IR. Note: this will not fully populate its parent module. The only globals that will be available are those used within the function.
Definition at line 675 of file Context.cpp.
References llvm::cast(), llvm::cast_or_null(), createBasicBlock(), detach(), F, llvm::Function, getOrCreateArgument(), getOrCreateModule(), getValue(), and registerValue().
Referenced by createModule().
|
protected |
Definition at line 585 of file Context.cpp.
References llvm::cast(), GetElementPtrInst, I, and registerValue().
|
protected |
Definition at line 632 of file Context.cpp.
References llvm::cast(), I, ICmpInst, and registerValue().
|
protected |
Definition at line 492 of file Context.cpp.
References llvm::cast(), InsertElementInst, and registerValue().
|
protected |
Definition at line 511 of file Context.cpp.
References llvm::cast(), InsertValueInst, and registerValue().
|
protected |
Definition at line 547 of file Context.cpp.
References llvm::cast(), I, InvokeInst, and registerValue().
|
protected |
Definition at line 562 of file Context.cpp.
References llvm::cast(), I, LandingPadInst, and registerValue().
|
protected |
Definition at line 527 of file Context.cpp.
References llvm::cast(), LoadInst, and registerValue().
| Module * llvm::sandboxir::Context::createModule | ( | llvm::Module * | LLVMM | ) |
Create a sandboxir::Module corresponding to LLVMM.
Definition at line 696 of file Context.cpp.
References llvm::Module::aliases(), createFunction(), getOrCreateModule(), getOrCreateValue(), llvm::Global, llvm::Module::globals(), and llvm::Module::ifuncs().
|
protected |
Definition at line 628 of file Context.cpp.
References llvm::cast(), I, PHINode, and registerValue().
|
protected |
Definition at line 594 of file Context.cpp.
References llvm::cast(), I, registerValue(), and ResumeInst.
|
protected |
Definition at line 537 of file Context.cpp.
References llvm::cast(), I, registerValue(), and ReturnInst.
|
protected |
Definition at line 479 of file Context.cpp.
References llvm::cast(), registerValue(), and SelectInst.
|
protected |
Definition at line 499 of file Context.cpp.
References llvm::cast(), registerValue(), and ShuffleVectorInst.
|
protected |
Definition at line 532 of file Context.cpp.
References llvm::cast(), registerValue(), and StoreInst.
|
protected |
Definition at line 598 of file Context.cpp.
References llvm::cast(), I, registerValue(), and SwitchInst.
|
protected |
Definition at line 602 of file Context.cpp.
References llvm::cast(), I, registerValue(), and UnaryOperator.
|
protected |
Definition at line 517 of file Context.cpp.
References llvm::cast(), registerValue(), and UncondBrInst.
|
protected |
Definition at line 557 of file Context.cpp.
References llvm::cast(), registerValue(), and UnreachableInst.
|
protected |
Definition at line 464 of file Context.cpp.
References llvm::cast(), registerValue(), and VAArgInst.
Remove SBV from all SandboxIR maps and stop owning it.
This effectively detaches V from the underlying IR.
Definition at line 28 of file Context.cpp.
References assert(), detachLLVMValue(), and Value.
Referenced by createFunction().
|
protected |
Remove V from the maps and returns the unique_ptr.
Definition at line 17 of file Context.cpp.
References LLVMValueToValueMap.
Referenced by detach().
|
inlineprotected |
Definition at line 158 of file Context.h.
References LLVMIRBuilder.
| Module * llvm::sandboxir::Context::getModule | ( | llvm::Module * | LLVMM | ) | const |
Definition at line 659 of file Context.cpp.
References LLVMModuleToModuleMap.
|
inline |
\Returns the number of values registered with Context.
Definition at line 279 of file Context.h.
References LLVMValueToValueMap.
|
protected |
Get or create a sandboxir::Argument for an existing LLVM IR LLVMArg.
Definition at line 441 of file Context.cpp.
References llvm::cast(), and LLVMValueToValueMap.
Referenced by createFunction(), and EraseFromParent.
|
protected |
Get or create a sandboxir::Constant from an existing LLVM IR LLVMC.
Definition at line 451 of file Context.cpp.
References llvm::cast(), and getOrCreateValueInternal().
Referenced by llvm::sandboxir::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::sandboxir::ConstantPtrAuth::get(), llvm::sandboxir::NoCFIValue::get(), llvm::sandboxir::ConstantDataArray::getRaw(), llvm::sandboxir::ConstantDataVector::getRaw(), and llvm::sandboxir::ConstantDataVector::getSplat().
| Module * llvm::sandboxir::Context::getOrCreateModule | ( | llvm::Module * | LLVMM | ) |
Definition at line 666 of file Context.cpp.
References LLVMModuleToModuleMap, and llvm::Module.
Referenced by createFunction(), and createModule().
|
inlineprotected |
Get or create a sandboxir::Value for an existing LLVM IR LLVMV.
Definition at line 132 of file Context.h.
References getOrCreateValueInternal(), and Value.
Referenced by createModule(), and llvm::sandboxir::Utils::getMemInstructionBase().
|
protected |
This is the actual function that creates sandboxir values for V, and among others handles all instruction types.
Definition at line 56 of file Context.cpp.
References AllocaInst, assert(), AtomicCmpXchgInst, AtomicRMWInst, BinaryOperator, CallBrInst, CallInst, llvm::cast(), CastInst, CatchPadInst, CatchReturnInst, CatchSwitchInst, CleanupPadInst, CleanupReturnInst, CondBrInst, llvm::dyn_cast(), ExtractElementInst, ExtractValueInst, FCmpInst, FenceInst, FreezeInst, llvm::Function, GetElementPtrInst, getOrCreateValueInternal(), getValue(), ICmpInst, InsertElementInst, InsertValueInst, InvokeInst, llvm::isa(), LandingPadInst, llvm_unreachable, LLVMAlloca, LLVMAtomicCmpXchg, LLVMAtomicRMW, LLVMCall, LLVMCallBr, LLVMFCmp, LLVMFence, LLVMFreeze, LLVMICmp, LLVMInvoke, LLVMRet, LLVMUnreachable, LLVMVAArg, LLVMValueToValueMap, LoadInst, PHINode, ResumeInst, ReturnInst, SelectInst, llvm::seq(), ShuffleVectorInst, StoreInst, SwitchInst, UnaryOperator, UncondBrInst, UnreachableInst, VAArgInst, and Value.
Referenced by EraseFromParent, getOrCreateConstant(), getOrCreateValue(), and getOrCreateValueInternal().
|
inline |
Definition at line 241 of file Context.h.
References IRTracker.
Referenced by registerValue(), llvm::sandboxir::TransactionAcceptOrRevert::runOnRegion(), llvm::sandboxir::TransactionAlwaysAccept::runOnRegion(), and llvm::sandboxir::TransactionAlwaysRevert::runOnRegion().
|
inline |
Definition at line 258 of file Context.h.
References LLVMTypeToTypeMap, Type, and Type.
Referenced by llvm::sandboxir::VectorType::getDoubleElementsVectorType(), llvm::sandboxir::VectorType::getExtendedElementVectorType(), llvm::sandboxir::VectorType::getHalfElementsVectorType(), llvm::sandboxir::ExtractValueInst::getIndexedType(), llvm::sandboxir::VectorType::getSubdividedVectorType(), llvm::sandboxir::VectorType::getTruncatedElementVectorType(), and llvm::sandboxir::CmpInst::makeCmpResultType().
|
inline |
Definition at line 250 of file Context.h.
References getValue().
| Value * llvm::sandboxir::Context::getValue | ( | llvm::Value * | V | ) | const |
Definition at line 640 of file Context.cpp.
References LLVMValueToValueMap, and Value.
Referenced by createBasicBlock(), createFunction(), llvm::sandboxir::DSOLocalEquivalent::get(), and getOrCreateValueInternal().
| Context::CallbackID llvm::sandboxir::Context::registerCreateInstrCallback | ( | CreateInstrCallback | CB, |
| std::optional< CallbackID > | BeforeID = std::nullopt ) |
Register a callback that gets called right after a SandboxIR instruction is created.
Note that this will also be called when reverting the removal of an instruction. If BeforeID is specified, CB will be ordered just before BeforeID, so it will be called first once the callbacks get executed. \Returns a callback ID for later deregistration.
Definition at line 748 of file Context.cpp.
References CreateInstrCallbacks.
| Context::CallbackID llvm::sandboxir::Context::registerEraseInstrCallback | ( | EraseInstrCallback | CB, |
| std::optional< CallbackID > | BeforeID = std::nullopt ) |
Register a callback that gets called when a SandboxIR instruction is about to be removed from its parent.
Note that this will also be called when reverting the creation of an instruction. If BeforeID is specified, CB will be ordered just before BeforeID, so it will be called first once the callbacks get executed. \Returns a callback ID for later deregistration.
Definition at line 735 of file Context.cpp.
References EraseInstrCallbacks.
| Context::CallbackID llvm::sandboxir::Context::registerMoveInstrCallback | ( | MoveInstrCallback | CB, |
| std::optional< CallbackID > | BeforeID = std::nullopt ) |
Register a callback that gets called when a SandboxIR instruction is about to be moved.
Note that this will also be called when reverting a move. If BeforeID is specified, CB will be ordered just before BeforeID, so it will be called first once the callbacks get executed. \Returns a callback ID for later deregistration.
Definition at line 761 of file Context.cpp.
References MoveInstrCallbacks.
| Context::CallbackID llvm::sandboxir::Context::registerSetUseCallback | ( | SetUseCallback | CB, |
| std::optional< CallbackID > | BeforeID = std::nullopt ) |
Register a callback that gets called when a Use gets set.
If BeforeID is specified, CB will be ordered just before BeforeID, so it will be called first once the callbacks get executed. \Returns a callback ID for later deregistration.
Definition at line 774 of file Context.cpp.
References SetUseCallbacks.
Take ownership of VPtr and store it in LLVMValueToValueMap.
Definition at line 35 of file Context.cpp.
References assert(), llvm::dyn_cast(), llvm::sandboxir::Tracker::emplaceIfTracking(), getTracker(), I, LLVMValueToValueMap, runCreateInstrCallbacks(), and Value.
Referenced by createAllocaInst(), createAtomicCmpXchgInst(), createAtomicRMWInst(), createBasicBlock(), createBinaryOperator(), createCallBrInst(), createCallInst(), createCastInst(), createCatchPadInst(), createCatchReturnInst(), createCatchSwitchInst(), createCleanupPadInst(), createCleanupReturnInst(), createCondBrInst(), createExtractElementInst(), createExtractValueInst(), createFCmpInst(), createFenceInst(), createFreezeInst(), createFunction(), createGetElementPtrInst(), createICmpInst(), createInsertElementInst(), createInsertValueInst(), createInvokeInst(), createLandingPadInst(), createLoadInst(), createPHINode(), createResumeInst(), createReturnInst(), createSelectInst(), createShuffleVectorInst(), createStoreInst(), createSwitchInst(), createUnaryOperator(), createUncondBrInst(), createUnreachableInst(), createVAArgInst(), and Instruction.
|
inline |
Convenience function for getTracker().revert()
Definition at line 245 of file Context.h.
References IRTracker.
|
protected |
Definition at line 719 of file Context.cpp.
References CreateInstrCallbacks, I, and Instruction.
Referenced by registerValue(), and Utils.
|
protected |
Definition at line 714 of file Context.cpp.
References EraseInstrCallbacks, I, and Instruction.
Referenced by Utils.
|
protected |
Definition at line 724 of file Context.cpp.
References I, Instruction, and MoveInstrCallbacks.
Referenced by Utils.
Definition at line 729 of file Context.cpp.
References SetUseCallbacks, and Value.
Referenced by Utils.
|
inline |
Convenience function for getTracker().save()
Definition at line 243 of file Context.h.
References IRTracker.
Referenced by llvm::sandboxir::TransactionSave::runOnRegion().
| void llvm::sandboxir::Context::unregisterCreateInstrCallback | ( | CallbackID | ID | ) |
Definition at line 752 of file Context.cpp.
References assert(), CreateInstrCallbacks, and llvm::find_if().
| void llvm::sandboxir::Context::unregisterEraseInstrCallback | ( | CallbackID | ID | ) |
Definition at line 739 of file Context.cpp.
References assert(), EraseInstrCallbacks, and llvm::find_if().
| void llvm::sandboxir::Context::unregisterMoveInstrCallback | ( | CallbackID | ID | ) |
Definition at line 765 of file Context.cpp.
References assert(), llvm::find_if(), and MoveInstrCallbacks.
| void llvm::sandboxir::Context::unregisterSetUseCallback | ( | CallbackID | ID | ) |
Definition at line 778 of file Context.cpp.
References assert(), llvm::find_if(), and SetUseCallbacks.
|
friend |
Various leaf nodes.
Definition at line 155 of file Context.h.
References BasicBlock.
Referenced by BasicBlock, and createBasicBlock().
|
friend |
|
friend |
Definition at line 137 of file Context.h.
References ConstantDataSequential.
Referenced by ConstantDataSequential.
|
friend |
Definition at line 125 of file Context.h.
References EraseFromParent, getOrCreateArgument(), getOrCreateValueInternal(), and Value.
Referenced by EraseFromParent.
|
friend |
Iterator for Instructions in a `BasicBlock.
/ \Returns an sandboxir::Instruction & when derereferenced. class BBIterator { public: using difference_type = std::ptrdiff_t; using value_type = Instruction; using pointer = value_type *; using reference = value_type &; using iterator_category = std::bidirectional_iterator_tag;
private: llvm::BasicBlock *BB; llvm::BasicBlock::iterator It; Context *Ctx; LLVM_ABI pointer getInstr(llvm::BasicBlock::iterator It) const;
public: BBIterator() : BB(nullptr), Ctx(nullptr) {} BBIterator(llvm::BasicBlock <em>BB, llvm::BasicBlock::iterator It, Context *Ctx) : BB(BB), It(It), Ctx(Ctx) {} reference operator() const { return *getInstr(It); } LLVM_ABI BBIterator &operator++(); BBIterator operator++(int) { auto Copy = *this; ++*this; return Copy; } LLVM_ABI BBIterator &operator--(); BBIterator operator--(int) { auto Copy = *this; –*this; return Copy; } bool operator==(const BBIterator &Other) const { assert(Ctx == Other.Ctx && "BBIterators in different context!"); return It == Other.It; } bool operator!=(const BBIterator &Other) const { return !(*this == Other); } / \Returns the SBInstruction that corresponds to this iterator, or null if / the instruction is not found in the IR-to-SandboxIR tables. pointer get() const { return getInstr(It); } / \Returns the parent BB. LLVM_ABI BasicBlock *getNodeParent() const; };
/ Contains a list of sandboxir::Instruction's. class BasicBlock : public Value { / Builds a graph that contains all values in BB in their original form / i.e., no vectorization is taking place here. LLVM_ABI void buildBasicBlockFromLLVMIR(llvm::BasicBlock *LLVMBB); friend class Context; // For buildBasicBlockFromIR
Definition at line 122 of file Context.h.
References Instruction, registerValue(), and Value.
Referenced by Instruction, runCreateInstrCallbacks(), runEraseInstrCallbacks(), runMoveInstrCallbacks(), and Utils.
|
friend |
|
friend |
Definition at line 78 of file Context.h.
References IRSnapshotChecker.
Referenced by IRSnapshotChecker.
|
friend |
|
friend |
|
friend |
|
friend |
MessagePack types as defined in the standard, with the exception of Integer being divided into a signed Int and unsigned UInt variant in order to map directly to C++ types.
The types map onto corresponding union members of the Object struct.
Definition at line 72 of file Context.h.
References Type.
Referenced by getType(), llvm::sandboxir::Context::TypeDeleter::operator()(), and Type.
|
friend |
|
friend |
Definition at line 138 of file Context.h.
References I, Instruction, runCreateInstrCallbacks(), runEraseInstrCallbacks(), runMoveInstrCallbacks(), runSetUseCallbacks(), Utils, and Value.
Referenced by Utils.
|
friend |
Definition at line 146 of file Context.h.
References Value.
Referenced by detach(), EraseFromParent, getOrCreateValue(), getOrCreateValueInternal(), getValue(), Instruction, registerValue(), runSetUseCallbacks(), Utils, and Value.
|
protected |
Definition at line 221 of file Context.h.
Referenced by createAllocaInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 219 of file Context.h.
Referenced by createAtomicCmpXchgInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 217 of file Context.h.
Referenced by createAtomicRMWInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 215 of file Context.h.
Referenced by createBinaryOperator(), and getOrCreateValueInternal().
|
protected |
Definition at line 193 of file Context.h.
Referenced by createCallBrInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 189 of file Context.h.
Referenced by createCallInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 223 of file Context.h.
Referenced by createCastInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 197 of file Context.h.
Referenced by createCatchPadInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 201 of file Context.h.
Referenced by createCatchReturnInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 207 of file Context.h.
Referenced by createCatchSwitchInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 199 of file Context.h.
Referenced by createCleanupPadInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 203 of file Context.h.
Referenced by createCleanupReturnInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 229 of file Context.h.
Referenced by createCmpInst().
|
protected |
Definition at line 181 of file Context.h.
Referenced by createCondBrInst(), and getOrCreateValueInternal().
|
protected |
Callbacks called when an IR instruction is about to get created.
CallbackID is used as an identifier for deregistration.
Definition at line 104 of file Context.h.
Referenced by registerCreateInstrCallback(), runCreateInstrCallbacks(), and unregisterCreateInstrCallback().
|
protected |
Callbacks called when an IR instruction is about to get erased.
CallbackID is used as an identifier for deregistration.
Definition at line 101 of file Context.h.
Referenced by registerEraseInstrCallback(), runEraseInstrCallbacks(), and unregisterEraseInstrCallback().
|
protected |
Definition at line 171 of file Context.h.
Referenced by createExtractElementInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 175 of file Context.h.
Referenced by createExtractValueInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 233 of file Context.h.
Referenced by createFCmpInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 165 of file Context.h.
Referenced by createFenceInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 163 of file Context.h.
Referenced by createFreezeInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 205 of file Context.h.
Referenced by createGetElementPtrInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 231 of file Context.h.
Referenced by createICmpInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 169 of file Context.h.
Referenced by createInsertElementInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 177 of file Context.h.
Referenced by createInsertValueInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 191 of file Context.h.
Referenced by createInvokeInst(), and getOrCreateValueInternal().
|
protected |
|
protected |
Definition at line 195 of file Context.h.
Referenced by createLandingPadInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 71 of file Context.h.
Referenced by Context(), llvm::sandboxir::CmpInst::makeCmpResultType(), and llvm::sandboxir::SBVecContext::SBVecContext().
|
protected |
Definition at line 157 of file Context.h.
Referenced by Context(), and getLLVMIRBuilder().
|
protected |
Maps an LLVM Module to the corresponding sandboxir::Module.
Definition at line 87 of file Context.h.
Referenced by getModule(), and getOrCreateModule().
|
protected |
|
protected |
Maps LLVM Value to the corresponding sandboxir::Value.
Owns all SandboxIR objects.
Definition at line 84 of file Context.h.
Referenced by clear(), detachLLVMValue(), getNumValues(), getOrCreateArgument(), getOrCreateValueInternal(), getValue(), and registerValue().
|
protected |
Definition at line 183 of file Context.h.
Referenced by createLoadInst(), and getOrCreateValueInternal().
|
protected |
Callbacks called when an IR instruction is about to get moved.
CallbackID is used as an identifier for deregistration.
Definition at line 107 of file Context.h.
Referenced by registerMoveInstrCallback(), runMoveInstrCallbacks(), and unregisterMoveInstrCallback().
|
protected |
|
protected |
Definition at line 225 of file Context.h.
Referenced by createPHINode(), and getOrCreateValueInternal().
|
protected |
Definition at line 209 of file Context.h.
Referenced by createResumeInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 187 of file Context.h.
Referenced by createReturnInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 167 of file Context.h.
Referenced by createSelectInst(), and getOrCreateValueInternal().
|
protected |
Callbacks called when a Use gets its source set.
CallbackID is used as an identifier for deregistration.
Definition at line 110 of file Context.h.
Referenced by registerSetUseCallback(), runSetUseCallbacks(), and unregisterSetUseCallback().
|
protected |
Definition at line 173 of file Context.h.
Referenced by createShuffleVectorInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 185 of file Context.h.
Referenced by createStoreInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 211 of file Context.h.
Referenced by createSwitchInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 213 of file Context.h.
Referenced by createUnaryOperator(), and getOrCreateValueInternal().
|
protected |
Definition at line 179 of file Context.h.
Referenced by createUncondBrInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 227 of file Context.h.
Referenced by createUnreachableInst(), and getOrCreateValueInternal().
|
protected |
Definition at line 161 of file Context.h.
Referenced by createVAArgInst(), and getOrCreateValueInternal().