LLVM: llvm::sandboxir::Context Class Reference (original ) (raw )#include "[llvm/SandboxIR/Context.h](SandboxIR%5F2Context%5F8h%5Fsource.html)"
Definition at line 33 of file Context.h .
◆ CreateInstrCallback◆ EraseInstrCallback◆ MoveInstrCallbackInitial value:
std::function<void(Instruction *, const BBIterator &)>
friend class Instruction
Iterator for Instructions in a `BasicBlock.
Definition at line 41 of file Context.h .
◆ SetUseCallback
llvm::sandboxir::Context::Context
(
LLVMContext &
LLVMCtx
)
◆ ~Context()
llvm::sandboxir::Context::~Context ( )
default
◆ accept()
void llvm::sandboxir::Context::accept ( )
inline
◆ clear()
void llvm::sandboxir::Context::clear
(
)
◆ createAllocaInst()◆ createAtomicCmpXchgInst()◆ createAtomicRMWInst()◆ createBasicBlock()◆ createBinaryOperator()◆ createBranchInst()◆ createCallBrInst()◆ createCallInst()◆ createCastInst()◆ createCatchPadInst()◆ createCatchReturnInst()◆ createCatchSwitchInst()◆ createCleanupPadInst()◆ createCleanupReturnInst()◆ createCmpInst()◆ createFCmpInst()◆ createFenceInst()◆ createFreezeInst()◆ createFunction()◆ createGetElementPtrInst()◆ createICmpInst()◆ createInsertElementInst()◆ createInsertValueInst()◆ createInvokeInst()◆ createLandingPadInst()◆ createLoadInst()◆ createModule()◆ createPHINode()◆ createResumeInst()◆ createReturnInst()◆ createSelectInst()◆ createShuffleVectorInst()◆ createStoreInst()◆ createSwitchInst()◆ createUnaryOperator()◆ createUnreachableInst()◆ createVAArgInst()◆ detach()
std::unique_ptr< Value > llvm::sandboxir::Context::detach ( Value * V )
protected
◆ detachLLVMValue()
std::unique_ptr< Value > llvm::sandboxir::Context::detachLLVMValue ( llvm::Value * V )
protected
◆ getLLVMIRBuilder()
auto & llvm::sandboxir::Context::getLLVMIRBuilder ( )
inlineprotected
◆ getModule()◆ getNumValues()
size_t llvm::sandboxir::Context::getNumValues ( ) const
inline
◆ getOrCreateArgument()◆ getOrCreateConstant()◆ getOrCreateModule()◆ getOrCreateValue()
Value * llvm::sandboxir::Context::getOrCreateValue ( llvm::Value * LLVMV )
inlineprotected
◆ getOrCreateValueInternal()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 , BranchInst , CallBrInst , CallInst , llvm::cast() , CastInst , CatchPadInst , CatchReturnInst , CatchSwitchInst , CleanupPadInst , CleanupReturnInst , llvm::dyn_cast() , ExtractElementInst , ExtractValueInst , FCmpInst , FenceInst , FreezeInst , GetElementPtrInst , getOrCreateValueInternal() , getValue() , ICmpInst , InsertElementInst , InsertValueInst , InvokeInst , llvm::isa() , LandingPadInst , llvm_unreachable , LLVMAlloca , LLVMAtomicCmpXchg , LLVMAtomicRMW , LLVMBr , LLVMCall , LLVMCallBr , LLVMFCmp , LLVMFence , LLVMFreeze , LLVMICmp , LLVMInvoke , LLVMRet , LLVMUnreachable , LLVMVAArg , LLVMValueToValueMap , LoadInst , PHINode , ResumeInst , ReturnInst , SelectInst , llvm::seq() , ShuffleVectorInst , StoreInst , SwitchInst , UnaryOperator , UnreachableInst , VAArgInst , and Value .
Referenced by getOrCreateConstant() , getOrCreateValue() , and getOrCreateValueInternal() .
◆ getTracker()
Tracker & llvm::sandboxir::Context::getTracker ( )
inline
◆ getType()
Type * llvm::sandboxir::Context::getType ( llvm::Type * LLVMTy )
inline
◆ getValue() [1/2]◆ getValue() [2/2]◆ registerCreateInstrCallback()◆ registerEraseInstrCallback()◆ registerMoveInstrCallback()◆ registerSetUseCallback()◆ registerValue()
Value * llvm::sandboxir::Context::registerValue ( std::unique_ptr< Value > && VPtr )
protected
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() , createBranchInst() , createCallBrInst() , createCallInst() , createCastInst() , createCatchPadInst() , createCatchReturnInst() , createCatchSwitchInst() , createCleanupPadInst() , createCleanupReturnInst() , createExtractElementInst() , createExtractValueInst() , createFCmpInst() , createFenceInst() , createFreezeInst() , createFunction() , createGetElementPtrInst() , createICmpInst() , createInsertElementInst() , createInsertValueInst() , createInvokeInst() , createLandingPadInst() , createLoadInst() , createPHINode() , createResumeInst() , createReturnInst() , createSelectInst() , createShuffleVectorInst() , createStoreInst() , createSwitchInst() , createUnaryOperator() , createUnreachableInst() , and createVAArgInst() .
◆ revert()
void llvm::sandboxir::Context::revert ( )
inline
◆ runCreateInstrCallbacks()
void llvm::sandboxir::Context::runCreateInstrCallbacks ( Instruction * I )
protected
◆ runEraseInstrCallbacks()
void llvm::sandboxir::Context::runEraseInstrCallbacks ( Instruction * I )
protected
◆ runMoveInstrCallbacks()
void llvm::sandboxir::Context::runMoveInstrCallbacks ( Instruction * I , const BBIterator & Where )
protected
◆ runSetUseCallbacks()
void llvm::sandboxir::Context::runSetUseCallbacks ( const Use & U , Value * NewSrc )
protected
◆ save()
void llvm::sandboxir::Context::save ( )
inline
◆ unregisterCreateInstrCallback()
void llvm::sandboxir::Context::unregisterCreateInstrCallback
(
CallbackID
ID
)
◆ unregisterEraseInstrCallback()
void llvm::sandboxir::Context::unregisterEraseInstrCallback
(
CallbackID
ID
)
◆ unregisterMoveInstrCallback()
void llvm::sandboxir::Context::unregisterMoveInstrCallback
(
CallbackID
ID
)
◆ unregisterSetUseCallback()
void llvm::sandboxir::Context::unregisterSetUseCallback
(
CallbackID
ID
)
◆ BasicBlock◆ ConstantDataSequential◆ EraseFromParent◆ InstructionIterator for Instruction s 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 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 120 of file Context.h .
References Instruction , LLVM_ABI , and Value .
Referenced by Instruction , runCreateInstrCallbacks() , runEraseInstrCallbacks() , runMoveInstrCallbacks() , and Utils .
◆ IntegerType◆ IRSnapshotChecker◆ PointerType◆ Region◆ StructType◆ Type◆ User◆ Utils◆ Value◆ AllocaInst
friend llvm::sandboxir::Context::AllocaInst
protected
◆ AtomicCmpXchgInst
friend llvm::sandboxir::Context::AtomicCmpXchgInst
protected
◆ AtomicRMWInst
friend llvm::sandboxir::Context::AtomicRMWInst
protected
◆ BinaryOperator
friend llvm::sandboxir::Context::BinaryOperator
protected
◆ BranchInst
friend llvm::sandboxir::Context::BranchInst
protected
◆ CallBrInst
friend llvm::sandboxir::Context::CallBrInst
protected
◆ CallInst
friend llvm::sandboxir::Context::CallInst
protected
◆ CastInst
friend llvm::sandboxir::Context::CastInst
protected
◆ CatchPadInst
friend llvm::sandboxir::Context::CatchPadInst
protected
◆ CatchReturnInst
friend llvm::sandboxir::Context::CatchReturnInst
protected
◆ CatchSwitchInst
friend llvm::sandboxir::Context::CatchSwitchInst
protected
◆ CleanupPadInst
friend llvm::sandboxir::Context::CleanupPadInst
protected
◆ CleanupReturnInst
friend llvm::sandboxir::Context::CleanupReturnInst
protected
◆ CmpInst
friend llvm::sandboxir::Context::CmpInst
protected
◆ CreateInstrCallbacks◆ EraseInstrCallbacks
friend llvm::sandboxir::Context::ExtractElementInst
protected
friend llvm::sandboxir::Context::ExtractValueInst
protected
◆ FCmpInst
friend llvm::sandboxir::Context::FCmpInst
protected
◆ FenceInst
friend llvm::sandboxir::Context::FenceInst
protected
◆ FreezeInst
friend llvm::sandboxir::Context::FreezeInst
protected
◆ GetElementPtrInst
friend llvm::sandboxir::Context::GetElementPtrInst
protected
◆ ICmpInst
friend llvm::sandboxir::Context::ICmpInst
protected
◆ InsertElementInst
friend llvm::sandboxir::Context::InsertElementInst
protected
◆ InsertValueInst
friend llvm::sandboxir::Context::InsertValueInst
protected
◆ InvokeInst
friend llvm::sandboxir::Context::InvokeInst
protected
◆ IRTracker
Tracker llvm::sandboxir::Context::IRTracker
protected
◆ LandingPadInst
friend llvm::sandboxir::Context::LandingPadInst
protected
◆ LLVMCtx◆ LLVMIRBuilder◆ LLVMModuleToModuleMap◆ LLVMTypeToTypeMap◆ LLVMValueToValueMap◆ LoadInst
friend llvm::sandboxir::Context::LoadInst
protected
◆ MoveInstrCallbacks◆ NextCallbackID◆ PHINode
friend llvm::sandboxir::Context::PHINode
protected
◆ ResumeInst
friend llvm::sandboxir::Context::ResumeInst
protected
◆ ReturnInst
friend llvm::sandboxir::Context::ReturnInst
protected
◆ SelectInst
friend llvm::sandboxir::Context::SelectInst
protected
◆ SetUseCallbacks◆ ShuffleVectorInst
friend llvm::sandboxir::Context::ShuffleVectorInst
protected
◆ StoreInst
friend llvm::sandboxir::Context::StoreInst
protected
◆ SwitchInst
friend llvm::sandboxir::Context::SwitchInst
protected
◆ UnaryOperator
friend llvm::sandboxir::Context::UnaryOperator
protected
◆ UnreachableInst
friend llvm::sandboxir::Context::UnreachableInst
protected
◆ VAArgInst
friend llvm::sandboxir::Context::VAArgInst
protected
The documentation for this class was generated from the following files: