Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Classes |Public Types |Public Member Functions |Protected Member Functions |Protected Attributes |Friends |List of all members
llvm::sandboxir::Context Class Reference

#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 theType objects.More...
 

Public Types

using EraseInstrCallback = std::function< void(Instruction *)>
 
using CreateInstrCallback = std::function< void(Instruction *)>
 
using MoveInstrCallback = std::function< void(Instruction *,constBBIterator &)>
 

Public Member Functions

 Context (LLVMContext &LLVMCtx)
 
 ~Context ()
 
TrackergetTracker ()
 
void save ()
 Convenience function forgetTracker().save()
 
void revert ()
 Convenience function forgetTracker().revert()
 
void accept ()
 Convenience function forgetTracker().accept()
 
sandboxir::ValuegetValue (llvm::Value *V)const
 
constsandboxir::ValuegetValue (constllvm::Value *V)const
 
ModulegetModule (llvm::Module *LLVMM)const
 
ModulegetOrCreateModule (llvm::Module *LLVMM)
 
TypegetType (llvm::Type *LLVMTy)
 
FunctioncreateFunction (llvm::Function *F)
 Create asandboxir::Function for an existing LLVM IRF, including all blocks and instructions.
 
ModulecreateModule (llvm::Module *LLVMM)
 Create asandboxir::Module corresponding toLLVMM.
 
size_t getNumValues ()const
 \Returns the number of values registered withContext.
 
CallbackID registerEraseInstrCallback (EraseInstrCallback CB)
 Register a callback that gets called when a SandboxIR instruction is about to be removed from its parent.
 
void unregisterEraseInstrCallback (CallbackIDID)
 
CallbackID registerCreateInstrCallback (CreateInstrCallback CB)
 Register a callback that gets called right after a SandboxIR instruction is created.
 
void unregisterCreateInstrCallback (CallbackIDID)
 
CallbackID registerMoveInstrCallback (MoveInstrCallback CB)
 Register a callback that gets called when a SandboxIR instruction is about to be moved.
 
void unregisterMoveInstrCallback (CallbackIDID)
 

Protected Member Functions

std::unique_ptr<ValuedetachLLVMValue (llvm::Value *V)
 RemoveV from the maps and returns the unique_ptr.
 
std::unique_ptr<Valuedetach (Value *V)
 RemoveSBV from all SandboxIR maps and stop owning it.
 
ValueregisterValue (std::unique_ptr<Value > &&VPtr)
 Take ownership of VPtr and store it inLLVMValueToValueMap.
 
ValuegetOrCreateValueInternal (llvm::Value *V,llvm::User *U=nullptr)
 This is the actual function that creates sandboxir values forV, and among others handles all instruction types.
 
ArgumentgetOrCreateArgument (llvm::Argument *LLVMArg)
 Get or create asandboxir::Argument for an existing LLVM IRLLVMArg.
 
ValuegetOrCreateValue (llvm::Value *LLVMV)
 Get or create asandboxir::Value for an existing LLVM IRLLVMV.
 
ConstantgetOrCreateConstant (llvm::Constant *LLVMC)
 Get or create asandboxir::Constant from an existing LLVM IRLLVMC.
 
void runEraseInstrCallbacks (Instruction *I)
 
void runCreateInstrCallbacks (Instruction *I)
 
void runMoveInstrCallbacks (Instruction *I,constBBIterator &Where)
 
BasicBlockcreateBasicBlock (llvm::BasicBlock *BB)
 Create asandboxir::BasicBlock for an existing LLVM IRBB.
 
auto & getLLVMIRBuilder ()
 
VAArgInstcreateVAArgInst (llvm::VAArgInst *SI)
 
FreezeInstcreateFreezeInst (llvm::FreezeInst *SI)
 
FenceInstcreateFenceInst (llvm::FenceInst *SI)
 
SelectInstcreateSelectInst (llvm::SelectInst *SI)
 
InsertElementInstcreateInsertElementInst (llvm::InsertElementInst *IEI)
 
ExtractElementInstcreateExtractElementInst (llvm::ExtractElementInst *EEI)
 
ShuffleVectorInstcreateShuffleVectorInst (llvm::ShuffleVectorInst *SVI)
 
ExtractValueInstcreateExtractValueInst (llvm::ExtractValueInst *IVI)
 
InsertValueInstcreateInsertValueInst (llvm::InsertValueInst *IVI)
 
BranchInstcreateBranchInst (llvm::BranchInst *I)
 
LoadInstcreateLoadInst (llvm::LoadInst *LI)
 
StoreInstcreateStoreInst (llvm::StoreInst *SI)
 
ReturnInstcreateReturnInst (llvm::ReturnInst *I)
 
CallInstcreateCallInst (llvm::CallInst *I)
 
InvokeInstcreateInvokeInst (llvm::InvokeInst *I)
 
CallBrInstcreateCallBrInst (llvm::CallBrInst *I)
 
LandingPadInstcreateLandingPadInst (llvm::LandingPadInst *I)
 
CatchPadInstcreateCatchPadInst (llvm::CatchPadInst *I)
 
CleanupPadInstcreateCleanupPadInst (llvm::CleanupPadInst *I)
 
CatchReturnInstcreateCatchReturnInst (llvm::CatchReturnInst *I)
 
CleanupReturnInstcreateCleanupReturnInst (llvm::CleanupReturnInst *I)
 
GetElementPtrInstcreateGetElementPtrInst (llvm::GetElementPtrInst *I)
 
CatchSwitchInstcreateCatchSwitchInst (llvm::CatchSwitchInst *I)
 
ResumeInstcreateResumeInst (llvm::ResumeInst *I)
 
SwitchInstcreateSwitchInst (llvm::SwitchInst *I)
 
UnaryOperatorcreateUnaryOperator (llvm::UnaryOperator *I)
 
BinaryOperatorcreateBinaryOperator (llvm::BinaryOperator *I)
 
AtomicRMWInstcreateAtomicRMWInst (llvm::AtomicRMWInst *I)
 
AtomicCmpXchgInstcreateAtomicCmpXchgInst (llvm::AtomicCmpXchgInst *I)
 
AllocaInstcreateAllocaInst (llvm::AllocaInst *I)
 
CastInstcreateCastInst (llvm::CastInst *I)
 
PHINodecreatePHINode (llvm::PHINode *I)
 
UnreachableInstcreateUnreachableInst (llvm::UnreachableInst *UI)
 
CmpInstcreateCmpInst (llvm::CmpInst *I)
 
ICmpInstcreateICmpInst (llvm::ICmpInst *I)
 
FCmpInstcreateFCmpInst (llvm::FCmpInst *I)
 

Protected Attributes

LLVMContextLLVMCtx
 
Tracker IRTracker
 
DenseMap<llvm::Value *, std::unique_ptr<Value > > LLVMValueToValueMap
 Maps LLVMValue to the correspondingsandboxir::Value.
 
DenseMap<llvm::Module *, std::unique_ptr<Module > > LLVMModuleToModuleMap
 Maps an LLVMModule to the correspondingsandboxir::Module.
 
DenseMap<llvm::Type *, std::unique_ptr<Type,TypeDeleter > > LLVMTypeToTypeMap
 Maps LLVMType to the corresondingsandboxir::Type.
 
MapVector<CallbackID,EraseInstrCallbackEraseInstrCallbacks
 Callbacks called when an IR instruction is about to get erased.
 
MapVector<CallbackID,CreateInstrCallbackCreateInstrCallbacks
 Callbacks called when an IR instruction is about to get created.
 
MapVector<CallbackID,MoveInstrCallbackMoveInstrCallbacks
 Callbacks called when an IR instruction is about to get moved.
 
CallbackID::ValTy NextCallbackID = 1
 A counter used for assigning callback IDs during registration.
 
IRBuilder<ConstantFolderLLVMIRBuilder
 
friend VAArgInst
 
friend FreezeInst
 
friend FenceInst
 
friend SelectInst
 
friend InsertElementInst
 
friend ExtractElementInst
 
friend ShuffleVectorInst
 
friend ExtractValueInst
 
friend InsertValueInst
 
friend BranchInst
 
friend LoadInst
 
friend StoreInst
 
friend ReturnInst
 
friend CallInst
 
friend InvokeInst
 
friend CallBrInst
 
friend LandingPadInst
 
friend CatchPadInst
 
friend CleanupPadInst
 
friend CatchReturnInst
 
friend CleanupReturnInst
 
friend GetElementPtrInst
 
friend CatchSwitchInst
 
friend ResumeInst
 
friend SwitchInst
 
friend UnaryOperator
 
friend BinaryOperator
 
friend AtomicRMWInst
 
friend AtomicCmpXchgInst
 
friend AllocaInst
 
friend CastInst
 
friend PHINode
 
friend UnreachableInst
 
friend CmpInst
 
friend ICmpInst
 
friend FCmpInst
 

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 StructType
 
class Region
 
class IRSnapshotChecker
 
class Instruction
 
class EraseFromParent
 
class Utils
 
class BasicBlock
 Various leaf nodes.
 

Detailed Description

Definition at line30 of fileContext.h.

Member Typedef Documentation

◆ CreateInstrCallback

usingllvm::sandboxir::Context::CreateInstrCallback = std::function<void(Instruction *)>

Definition at line35 of fileContext.h.

◆ EraseInstrCallback

usingllvm::sandboxir::Context::EraseInstrCallback = std::function<void(Instruction *)>

Definition at line33 of fileContext.h.

◆ MoveInstrCallback

usingllvm::sandboxir::Context::MoveInstrCallback = std::function<void(Instruction *,constBBIterator &)>

Definition at line38 of fileContext.h.

Constructor & Destructor Documentation

◆ Context()

llvm::sandboxir::Context::Context(LLVMContextLLVMCtx)

Definition at line608 of fileContext.cpp.

◆ ~Context()

llvm::sandboxir::Context::~Context()

Definition at line612 of fileContext.cpp.

Member Function Documentation

◆ accept()

void llvm::sandboxir::Context::accept()
inline

Convenience function forgetTracker().accept()

Definition at line228 of fileContext.h.

Referencesllvm::sandboxir::Tracker::accept(), andIRTracker.

◆ createAllocaInst()

AllocaInst * llvm::sandboxir::Context::createAllocaInst(llvm::AllocaInstI)
protected

Definition at line581 of fileContext.cpp.

ReferencesAllocaInst,I, andregisterValue().

Referenced byllvm::sandboxir::AllocaInst::create().

◆ createAtomicCmpXchgInst()

AtomicCmpXchgInst * llvm::sandboxir::Context::createAtomicCmpXchgInst(llvm::AtomicCmpXchgInstI)
protected

Definition at line576 of fileContext.cpp.

ReferencesAtomicCmpXchgInst,I, andregisterValue().

Referenced byllvm::sandboxir::AtomicCmpXchgInst::create().

◆ createAtomicRMWInst()

AtomicRMWInst * llvm::sandboxir::Context::createAtomicRMWInst(llvm::AtomicRMWInstI)
protected

Definition at line571 of fileContext.cpp.

ReferencesAtomicRMWInst,I, andregisterValue().

◆ createBasicBlock()

BasicBlock * llvm::sandboxir::Context::createBasicBlock(llvm::BasicBlockBB)
protected

Create asandboxir::BasicBlock for an existing LLVM IRBB.

This will also create all contents of the block.

Definition at line421 of fileContext.cpp.

Referencesassert(),BasicBlock,getValue(), andregisterValue().

Referenced bycreateFunction().

◆ createBinaryOperator()

BinaryOperator * llvm::sandboxir::Context::createBinaryOperator(llvm::BinaryOperatorI)
protected

Definition at line567 of fileContext.cpp.

ReferencesBinaryOperator,I, andregisterValue().

◆ createBranchInst()

BranchInst * llvm::sandboxir::Context::createBranchInst(llvm::BranchInstI)
protected

Definition at line483 of fileContext.cpp.

ReferencesBranchInst, andregisterValue().

Referenced byllvm::sandboxir::BranchInst::create().

◆ createCallBrInst()

CallBrInst * llvm::sandboxir::Context::createCallBrInst(llvm::CallBrInstI)
protected

Definition at line513 of fileContext.cpp.

ReferencesCallBrInst,I, andregisterValue().

◆ createCallInst()

CallInst * llvm::sandboxir::Context::createCallInst(llvm::CallInstI)
protected

Definition at line503 of fileContext.cpp.

ReferencesCallInst,I, andregisterValue().

Referenced byllvm::Instruction::dropPoisonGeneratingReturnAttributes().

◆ createCastInst()

CastInst * llvm::sandboxir::Context::createCastInst(llvm::CastInstI)
protected

Definition at line585 of fileContext.cpp.

ReferencesCastInst,I, andregisterValue().

Referenced byllvm::sandboxir::CastInst::create().

◆ createCatchPadInst()

CatchPadInst * llvm::sandboxir::Context::createCatchPadInst(llvm::CatchPadInstI)
protected

Definition at line527 of fileContext.cpp.

ReferencesCatchPadInst,I, andregisterValue().

Referenced byllvm::sandboxir::CatchPadInst::create().

◆ createCatchReturnInst()

CatchReturnInst * llvm::sandboxir::Context::createCatchReturnInst(llvm::CatchReturnInstI)
protected

Definition at line535 of fileContext.cpp.

ReferencesCatchReturnInst,I, andregisterValue().

Referenced byllvm::sandboxir::CatchReturnInst::create().

◆ createCatchSwitchInst()

CatchSwitchInst * llvm::sandboxir::Context::createCatchSwitchInst(llvm::CatchSwitchInstI)
protected

Definition at line551 of fileContext.cpp.

ReferencesCatchSwitchInst,I, andregisterValue().

◆ createCleanupPadInst()

CleanupPadInst * llvm::sandboxir::Context::createCleanupPadInst(llvm::CleanupPadInstI)
protected

Definition at line531 of fileContext.cpp.

ReferencesCleanupPadInst,I, andregisterValue().

◆ createCleanupReturnInst()

CleanupReturnInst * llvm::sandboxir::Context::createCleanupReturnInst(llvm::CleanupReturnInstI)
protected

Definition at line540 of fileContext.cpp.

ReferencesCleanupReturnInst,I, andregisterValue().

Referenced byllvm::Instruction::getOpcodeName().

◆ createCmpInst()

CmpInst * llvm::sandboxir::Context::createCmpInst(llvm::CmpInstI)
protected

◆ createExtractElementInst()

ExtractElementInst * llvm::sandboxir::Context::createExtractElementInst(llvm::ExtractElementInstEEI)
protected

Definition at line451 of fileContext.cpp.

ReferencesExtractElementInst, andregisterValue().

Referenced byllvm::sandboxir::ExtractElementInst::create().

◆ createExtractValueInst()

ExtractValueInst * llvm::sandboxir::Context::createExtractValueInst(llvm::ExtractValueInstIVI)
protected

Definition at line471 of fileContext.cpp.

ReferencesExtractValueInst, andregisterValue().

Referenced byllvm::sandboxir::ExtractValueInst::create().

◆ createFCmpInst()

FCmpInst * llvm::sandboxir::Context::createFCmpInst(llvm::FCmpInstI)
protected

Definition at line597 of fileContext.cpp.

ReferencesFCmpInst,I, andregisterValue().

Referenced byllvm::sandboxir::CmpInst::create().

◆ createFenceInst()

FenceInst * llvm::sandboxir::Context::createFenceInst(llvm::FenceInstSI)
protected

Definition at line440 of fileContext.cpp.

ReferencesFenceInst, andregisterValue().

Referenced byllvm::sandboxir::FenceInst::create().

◆ createFreezeInst()

FreezeInst * llvm::sandboxir::Context::createFreezeInst(llvm::FreezeInstSI)
protected

Definition at line435 of fileContext.cpp.

ReferencesFreezeInst, andregisterValue().

Referenced byllvm::sandboxir::FreezeInst::create().

◆ createFunction()

Function * llvm::sandboxir::Context::createFunction(llvm::FunctionF)

Create asandboxir::Function for an existing LLVM IRF, 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 line630 of fileContext.cpp.

ReferencescreateBasicBlock(),detach(),F,getOrCreateArgument(),getOrCreateModule(),getValue(), andregisterValue().

Referenced bycreateModule().

◆ createGetElementPtrInst()

GetElementPtrInst * llvm::sandboxir::Context::createGetElementPtrInst(llvm::GetElementPtrInstI)
protected

Definition at line546 of fileContext.cpp.

ReferencesGetElementPtrInst,I, andregisterValue().

Referenced byllvm::sandboxir::GetElementPtrInst::create().

◆ createICmpInst()

ICmpInst * llvm::sandboxir::Context::createICmpInst(llvm::ICmpInstI)
protected

Definition at line593 of fileContext.cpp.

ReferencesI,ICmpInst, andregisterValue().

Referenced byllvm::sandboxir::CmpInst::create().

◆ createInsertElementInst()

InsertElementInst * llvm::sandboxir::Context::createInsertElementInst(llvm::InsertElementInstIEI)
protected

Definition at line458 of fileContext.cpp.

ReferencesInsertElementInst, andregisterValue().

Referenced byllvm::sandboxir::InsertElementInst::create().

◆ createInsertValueInst()

InsertValueInst * llvm::sandboxir::Context::createInsertValueInst(llvm::InsertValueInstIVI)
protected

Definition at line477 of fileContext.cpp.

ReferencesInsertValueInst, andregisterValue().

Referenced byllvm::sandboxir::InsertValueInst::create().

◆ createInvokeInst()

InvokeInst * llvm::sandboxir::Context::createInvokeInst(llvm::InvokeInstI)
protected

Definition at line508 of fileContext.cpp.

ReferencesI,InvokeInst, andregisterValue().

Referenced byllvm::sandboxir::InvokeInst::create().

◆ createLandingPadInst()

LandingPadInst * llvm::sandboxir::Context::createLandingPadInst(llvm::LandingPadInstI)
protected

Definition at line523 of fileContext.cpp.

ReferencesI,LandingPadInst, andregisterValue().

Referenced byllvm::Instruction::hasAllowReciprocal().

◆ createLoadInst()

LoadInst * llvm::sandboxir::Context::createLoadInst(llvm::LoadInstLI)
protected

Definition at line488 of fileContext.cpp.

ReferencesLoadInst, andregisterValue().

Referenced byllvm::sandboxir::LoadInst::create().

◆ createModule()

Module * llvm::sandboxir::Context::createModule(llvm::ModuleLLVMM)

Create asandboxir::Module corresponding toLLVMM.

Definition at line651 of fileContext.cpp.

Referencesllvm::Module::aliases(),createFunction(),getOrCreateModule(),getOrCreateValue(),llvm::Global,llvm::Module::globals(), andllvm::Module::ifuncs().

◆ createPHINode()

PHINode * llvm::sandboxir::Context::createPHINode(llvm::PHINodeI)
protected

Definition at line589 of fileContext.cpp.

ReferencesI,PHINode, andregisterValue().

Referenced byllvm::sandboxir::PHINode::create().

◆ createResumeInst()

ResumeInst * llvm::sandboxir::Context::createResumeInst(llvm::ResumeInstI)
protected

Definition at line555 of fileContext.cpp.

ReferencesI,registerValue(), andResumeInst.

Referenced byllvm::sandboxir::ResumeInst::create().

◆ createReturnInst()

ReturnInst * llvm::sandboxir::Context::createReturnInst(llvm::ReturnInstI)
protected

Definition at line498 of fileContext.cpp.

ReferencesI,registerValue(), andReturnInst.

◆ createSelectInst()

SelectInst * llvm::sandboxir::Context::createSelectInst(llvm::SelectInstSI)
protected

Definition at line445 of fileContext.cpp.

ReferencesregisterValue(), andSelectInst.

◆ createShuffleVectorInst()

ShuffleVectorInst * llvm::sandboxir::Context::createShuffleVectorInst(llvm::ShuffleVectorInstSVI)
protected

Definition at line465 of fileContext.cpp.

ReferencesregisterValue(), andShuffleVectorInst.

Referenced byllvm::sandboxir::ShuffleVectorInst::create().

◆ createStoreInst()

StoreInst * llvm::sandboxir::Context::createStoreInst(llvm::StoreInstSI)
protected

Definition at line493 of fileContext.cpp.

ReferencesregisterValue(), andStoreInst.

Referenced byllvm::sandboxir::StoreInst::create().

◆ createSwitchInst()

SwitchInst * llvm::sandboxir::Context::createSwitchInst(llvm::SwitchInstI)
protected

Definition at line559 of fileContext.cpp.

ReferencesI,registerValue(), andSwitchInst.

Referenced byllvm::sandboxir::SwitchInst::create().

◆ createUnaryOperator()

UnaryOperator * llvm::sandboxir::Context::createUnaryOperator(llvm::UnaryOperatorI)
protected

Definition at line563 of fileContext.cpp.

ReferencesI,registerValue(), andUnaryOperator.

Referenced byllvm::sandboxir::UnaryOperator::create().

◆ createUnreachableInst()

UnreachableInst * llvm::sandboxir::Context::createUnreachableInst(llvm::UnreachableInstUI)
protected

Definition at line518 of fileContext.cpp.

ReferencesregisterValue(), andUnreachableInst.

Referenced byllvm::sandboxir::UnreachableInst::create().

◆ createVAArgInst()

VAArgInst * llvm::sandboxir::Context::createVAArgInst(llvm::VAArgInstSI)
protected

Definition at line430 of fileContext.cpp.

ReferencesregisterValue(), andVAArgInst.

Referenced byllvm::sandboxir::VAArgInst::create().

◆ detach()

std::unique_ptr<Value > llvm::sandboxir::Context::detach(ValueV)
protected

RemoveSBV from all SandboxIR maps and stop owning it.

This effectively detachesV from the underlying IR.

Definition at line27 of fileContext.cpp.

Referencesassert(), anddetachLLVMValue().

Referenced bycreateFunction().

◆ detachLLVMValue()

std::unique_ptr<Value > llvm::sandboxir::Context::detachLLVMValue(llvm::ValueV)
protected

RemoveV from the maps and returns the unique_ptr.

Definition at line16 of fileContext.cpp.

ReferencesLLVMValueToValueMap.

Referenced bydetach().

◆ getLLVMIRBuilder()

auto & llvm::sandboxir::Context::getLLVMIRBuilder()
inlineprotected

Definition at line143 of fileContext.h.

ReferencesLLVMIRBuilder.

Referenced byllvm::sandboxir::Instruction::setInsertPos().

◆ getModule()

Module * llvm::sandboxir::Context::getModule(llvm::ModuleLLVMM) const

Definition at line614 of fileContext.cpp.

ReferencesLLVMModuleToModuleMap.

Referenced byllvm::sandboxir::Function::getParent().

◆ getNumValues()

size_t llvm::sandboxir::Context::getNumValues() const
inline

\Returns the number of values registered withContext.

Definition at line260 of fileContext.h.

ReferencesLLVMValueToValueMap.

Referenced byllvm::sandboxir::Value::Value().

◆ getOrCreateArgument()

Argument * llvm::sandboxir::Context::getOrCreateArgument(llvm::ArgumentLLVMArg)
protected

Get or create asandboxir::Argument for an existing LLVM IRLLVMArg.

Definition at line407 of fileContext.cpp.

ReferencesLLVMValueToValueMap.

Referenced bycreateFunction().

◆ getOrCreateConstant()

Constant * llvm::sandboxir::Context::getOrCreateConstant(llvm::ConstantLLVMC)
protected

Get or create asandboxir::Constant from an existing LLVM IRLLVMC.

Definition at line417 of fileContext.cpp.

ReferencesgetOrCreateValueInternal().

Referenced byllvm::sandboxir::ShuffleVectorInst::convertShuffleMaskForBitcode(),llvm::sandboxir::UnaryOperator::create(),llvm::sandboxir::CmpInst::create(),llvm::sandboxir::CastInst::create(),llvm::sandboxir::GetElementPtrInst::create(),llvm::sandboxir::ExtractValueInst::create(),llvm::sandboxir::InsertValueInst::create(),llvm::sandboxir::ShuffleVectorInst::create(),llvm::sandboxir::ExtractElementInst::create(),llvm::sandboxir::InsertElementInst::create(),llvm::sandboxir::ConstantArray::get(),llvm::sandboxir::BlockAddress::get(),llvm::sandboxir::ConstantTokenNone::get(),llvm::sandboxir::NoCFIValue::get(),llvm::sandboxir::ConstantPointerNull::get(),llvm::sandboxir::ConstantStruct::get(),llvm::sandboxir::ConstantAggregateZero::get(),llvm::sandboxir::ConstantFP::get(),llvm::sandboxir::ConstantInt::get(),llvm::sandboxir::ConstantPtrAuth::getAddrDiscriminator(),llvm::sandboxir::GlobalAlias::getAliasee(),llvm::sandboxir::GlobalAlias::getAliaseeObject(),llvm::sandboxir::ConstantInt::getBool(),llvm::sandboxir::ConstantPtrAuth::getDiscriminator(),llvm::sandboxir::UndefValue::getElementValue(),llvm::sandboxir::PoisonValue::getElementValue(),llvm::sandboxir::ConstantInt::getFalse(),llvm::sandboxir::NoCFIValue::getGlobalValue(),llvm::sandboxir::ConstantFP::getInfinity(),llvm::sandboxir::GlobalVariable::getInitializer(),llvm::sandboxir::ConstantPtrAuth::getKey(),llvm::sandboxir::ConstantFP::getNaN(),llvm::sandboxir::ConstantFP::getNegativeZero(),llvm::sandboxir::ConstantPtrAuth::getPointer(),llvm::sandboxir::ConstantFP::getQNaN(),llvm::sandboxir::GlobalIFunc::getResolver(),llvm::sandboxir::GlobalIFunc::getResolverFunction(),llvm::sandboxir::UndefValue::getSequentialElement(),llvm::sandboxir::PoisonValue::getSequentialElement(),llvm::sandboxir::ShuffleVectorInst::getShuffleMaskForBitcode(),llvm::sandboxir::ConstantInt::getSigned(),llvm::sandboxir::ConstantFP::getSNaN(),llvm::sandboxir::UndefValue::getStructElement(),llvm::sandboxir::PoisonValue::getStructElement(),llvm::sandboxir::ConstantInt::getTrue(),llvm::sandboxir::ConstantPtrAuth::getWithSameSchema(), andllvm::sandboxir::ConstantFP::getZero().

◆ getOrCreateModule()

Module * llvm::sandboxir::Context::getOrCreateModule(llvm::ModuleLLVMM)

Definition at line621 of fileContext.cpp.

ReferencesLLVMModuleToModuleMap.

Referenced bycreateFunction(), andcreateModule().

◆ getOrCreateValue()

Value * llvm::sandboxir::Context::getOrCreateValue(llvm::ValueLLVMV)
inlineprotected

Get or create asandboxir::Value for an existing LLVM IRLLVMV.

Definition at line122 of fileContext.h.

ReferencesgetOrCreateValueInternal().

Referenced byllvm::BasicBlock::createMarker(),createModule(), andllvm::sandboxir::Utils::getMemInstructionBase().

◆ getOrCreateValueInternal()

Value * llvm::sandboxir::Context::getOrCreateValueInternal(llvm::ValueV,
llvm::UserU =nullptr 
)
protected

This is the actual function that creates sandboxir values forV, and among others handles all instruction types.

Definition at line55 of fileContext.cpp.

ReferencesAllocaInst,assert(),AtomicCmpXchgInst,AtomicRMWInst,BinaryOperator,BranchInst,llvm::CallingConv::C,CallBrInst,CallInst,CastInst,CatchPadInst,CatchReturnInst,CatchSwitchInst,CleanupPadInst,CleanupReturnInst,ExtractElementInst,ExtractValueInst,FCmpInst,FenceInst,FreezeInst,GetElementPtrInst,getOpcode(),getOrCreateValueInternal(),getValue(),ICmpInst,InsertElementInst,InsertValueInst,InvokeInst,LandingPadInst,LLVMAlloca,LLVMAtomicCmpXchg,LLVMAtomicRMW,LLVMBr,LLVMCall,LLVMCallBr,LLVMFCmp,LLVMFence,LLVMFreeze,LLVMICmp,LLVMInvoke,LLVMRet,LLVMUnreachable,LLVMVAArg,LLVMValueToValueMap,LoadInst,PHINode,ResumeInst,ReturnInst,SelectInst,ShuffleVectorInst,StoreInst,SwitchInst,UnaryOperator,UnreachableInst, andVAArgInst.

Referenced bygetOrCreateConstant(),getOrCreateValue(), andgetOrCreateValueInternal().

◆ getTracker()

Tracker & llvm::sandboxir::Context::getTracker()
inline

Definition at line222 of fileContext.h.

ReferencesIRTracker.

Referenced byllvm::sandboxir::SwitchInst::addCase(),llvm::sandboxir::CatchSwitchInst::addHandler(),llvm::sandboxir::PHINode::addIncoming(),llvm::Instruction::cloneDebugInfoFrom(),llvm::sandboxir::ShuffleVectorInst::commute(),llvm::sandboxir::Instruction::copyFastMathFlags(),llvm::Instruction::copyMetadata(),llvm::Instruction::hasNoNaNs(),llvm::sandboxir::Instruction::insertBefore(),llvm::sandboxir::Instruction::insertInto(),registerValue(),llvm::sandboxir::SwitchInst::removeCase(),llvm::sandboxir::Instruction::removeFromParent(),llvm::sandboxir::PHINode::removeIncomingValue(),llvm::sandboxir::Value::replaceAllUsesWith(),llvm::sandboxir::Use::set(),llvm::sandboxir::GlobalAlias::setAliasee(),llvm::sandboxir::AtomicRMWInst::setAlignment(),llvm::sandboxir::AtomicCmpXchgInst::setAlignment(),llvm::sandboxir::AllocaInst::setAlignment(),llvm::sandboxir::GlobalObject::setAlignment(),llvm::sandboxir::AllocaInst::setAllocatedType(),llvm::sandboxir::FuncletPadInst::setArgOperand(),llvm::sandboxir::CatchReturnInst::setCatchPad(),llvm::sandboxir::LandingPadInst::setCleanup(),llvm::sandboxir::CleanupReturnInst::setCleanupPad(),llvm::sandboxir::SwitchInst::setCondition(),llvm::sandboxir::GlobalVariable::setConstant(),llvm::sandboxir::SwitchInst::setDefaultDest(),llvm::sandboxir::GlobalVariable::setExternallyInitialized(),llvm::sandboxir::AtomicCmpXchgInst::setFailureOrdering(),llvm::sandboxir::Instruction::setFast(),llvm::sandboxir::Instruction::setFastMathFlags(),llvm::sandboxir::GlobalObject::setGlobalObjectSubClassData(),llvm::sandboxir::Instruction::setHasAllowReciprocal(),llvm::sandboxir::Instruction::setHasApproxFunc(),llvm::sandboxir::Instruction::setHasNoInfs(),llvm::sandboxir::Instruction::setHasNoNaNs(),llvm::sandboxir::Instruction::setHasNoSignedWrap(),llvm::sandboxir::Instruction::setHasNoSignedZeros(),llvm::sandboxir::Instruction::setHasNoUnsignedWrap(),llvm::sandboxir::PHINode::setIncomingBlock(),llvm::sandboxir::PHINode::setIncomingValue(),llvm::sandboxir::GlobalVariable::setInitializer(),llvm::sandboxir::Instruction::setIsExact(),llvm::sandboxir::PossiblyNonNegInst::setNonNeg(),llvm::sandboxir::User::setOperand(),llvm::sandboxir::FenceInst::setOrdering(),llvm::sandboxir::AtomicRMWInst::setOrdering(),llvm::sandboxir::CatchSwitchInst::setParentPad(),llvm::sandboxir::CmpInst::setPredicate(),llvm::sandboxir::GlobalIFunc::setResolver(),llvm::sandboxir::GlobalObject::setSection(),llvm::sandboxir::ShuffleVectorInst::setShuffleMask(),llvm::sandboxir::CatchReturnInst::setSuccessor(),llvm::sandboxir::SwitchInst::setSuccessor(),llvm::sandboxir::AtomicCmpXchgInst::setSuccessOrdering(),llvm::sandboxir::FenceInst::setSyncScopeID(),llvm::sandboxir::AtomicRMWInst::setSyncScopeID(),llvm::sandboxir::AtomicCmpXchgInst::setSyncScopeID(),llvm::sandboxir::GlobalValue::setUnnamedAddr(),llvm::sandboxir::CleanupReturnInst::setUnwindDest(),llvm::sandboxir::CatchSwitchInst::setUnwindDest(),llvm::sandboxir::AllocaInst::setUsedWithInAlloca(),llvm::sandboxir::GlobalValue::setVisibility(),llvm::sandboxir::AtomicRMWInst::setVolatile(),llvm::sandboxir::AtomicCmpXchgInst::setWeak(),llvm::sandboxir::Use::swap(),llvm::sandboxir::ICmpInst::swapOperands(),llvm::sandboxir::FCmpInst::swapOperands(),llvm::sandboxir::SelectInst::swapValues(), andllvm::Value::Value().

◆ getType()

Type * llvm::sandboxir::Context::getType(llvm::TypeLLVMTy)
inline

Definition at line239 of fileContext.h.

ReferencesLLVMTypeToTypeMap, andType.

Referenced byllvm::sandboxir::StructType::get(),llvm::sandboxir::PointerType::get(),llvm::sandboxir::Instruction::getAccessType(),llvm::sandboxir::AllocaInst::getAllocatedType(),llvm::sandboxir::CastInst::getDestTy(),llvm::sandboxir::VectorType::getDoubleElementsVectorType(),llvm::sandboxir::VectorType::getElementType(),llvm::sandboxir::VectorType::getExtendedElementVectorType(),llvm::sandboxir::Function::getFunctionType(),llvm::sandboxir::CallBase::getFunctionType(),llvm::sandboxir::VectorType::getHalfElementsVectorType(),llvm::sandboxir::ExtractValueInst::getIndexedType(),llvm::sandboxir::VectorType::getInteger(),llvm::sandboxir::ConstantInt::getIntegerType(),llvm::sandboxir::GetElementPtrInst::getPointerOperandType(),llvm::sandboxir::GetElementPtrInst::getResultElementType(),llvm::sandboxir::GetElementPtrInst::getSourceElementType(),llvm::sandboxir::CastInst::getSrcTy(),llvm::sandboxir::VectorType::getSubdividedVectorType(),llvm::sandboxir::VectorType::getTruncatedElementVectorType(),llvm::sandboxir::ConstantArray::getType(),llvm::sandboxir::ConstantPointerNull::getType(),llvm::sandboxir::NoCFIValue::getType(),llvm::sandboxir::ShuffleVectorInst::getType(),llvm::sandboxir::AllocaInst::getType(),llvm::sandboxir::Value::getType(),llvm::sandboxir::ExtractElementInst::getVectorOperandType(), andllvm::sandboxir::CmpInst::makeCmpResultType().

◆ getValue()[1/2]

constsandboxir::Value * llvm::sandboxir::Context::getValue(constllvm::ValueV) const
inline

Definition at line231 of fileContext.h.

ReferencesgetValue().

◆ getValue()[2/2]

Value * llvm::sandboxir::Context::getValue(llvm::ValueV) const

Definition at line601 of fileContext.cpp.

ReferencesLLVMValueToValueMap.

Referenced byllvm::sandboxir::BasicBlock::begin(),createBasicBlock(),createFunction(),llvm::sandboxir::BasicBlock::dumpOS(),llvm::sandboxir::Function::dumpOS(),llvm::sandboxir::SwitchInst::findCaseDest(),llvm::sandboxir::Use::get(),llvm::sandboxir::DSOLocalEquivalent::get(),llvm::sandboxir::Function::getArg(),llvm::sandboxir::FuncletPadInst::getArgOperand(),llvm::sandboxir::AllocaInst::getArraySize(),llvm::sandboxir::BlockAddress::getBasicBlock(),llvm::sandboxir::CallBase::getCalledFunction(),llvm::sandboxir::CallBase::getCalledOperand(),llvm::sandboxir::CallBase::getCalledOperandUse(),llvm::sandboxir::CallBase::getCaller(),llvm::sandboxir::CatchReturnInst::getCatchPad(),llvm::sandboxir::CatchPadInst::getCatchSwitch(),llvm::sandboxir::CatchReturnInst::getCatchSwitchParentPad(),llvm::sandboxir::CleanupReturnInst::getCleanupPad(),llvm::sandboxir::AtomicCmpXchgInst::getCompareOperand(),llvm::sandboxir::BranchInst::getCondition(),llvm::sandboxir::SwitchInst::getCondition(),llvm::sandboxir::SwitchInst::getDefaultDest(),llvm::sandboxir::ConstantAggregateZero::getElementValue(),llvm::sandboxir::BlockAddress::getFunction(),llvm::sandboxir::DSOLocalEquivalent::getGlobalValue(),llvm::sandboxir::PHINode::getIncomingBlock(),llvm::sandboxir::PHINode::getIncomingValue(),llvm::sandboxir::PHINode::getIncomingValueForBlock(),llvm::sandboxir::CallBrInst::getIndirectDestLabel(),llvm::sandboxir::CallBrInst::getIndirectDestLabelUse(),llvm::sandboxir::BBIterator::getNodeParent(),llvm::sandboxir::InvokeInst::getNormalDest(),getOrCreateValueInternal(),llvm::sandboxir::BasicBlock::getParent(),llvm::sandboxir::Instruction::getParent(),llvm::sandboxir::CatchSwitchInst::getParentPad(),llvm::sandboxir::VAArgInst::getPointerOperand(),llvm::sandboxir::AtomicCmpXchgInst::getPointerOperand(),llvm::sandboxir::LoadInst::getPointerOperand(),llvm::sandboxir::StoreInst::getPointerOperand(),llvm::sandboxir::GetElementPtrInst::getPointerOperand(),llvm::sandboxir::ReturnInst::getReturnValue(),llvm::sandboxir::ConstantAggregateZero::getSequentialElement(),llvm::sandboxir::ConstantAggregateZero::getStructElement(),llvm::sandboxir::CatchReturnInst::getSuccessor(),llvm::sandboxir::SwitchInst::getSuccessor(),llvm::sandboxir::BasicBlock::getTerminator(),llvm::sandboxir::InvokeInst::getUnwindDest(),llvm::sandboxir::CleanupReturnInst::getUnwindDest(),llvm::sandboxir::CatchSwitchInst::getUnwindDest(),llvm::sandboxir::AtomicRMWInst::getValOperand(),llvm::sandboxir::ResumeInst::getValue(),getValue(),llvm::sandboxir::StoreInst::getValueOperand(),llvm::sandboxir::PHINode::hasConstantValue(),llvm::sandboxir::BlockAddress::lookup(),llvm::sandboxir::BBIterator::operator++(),llvm::sandboxir::PHINode::removeIncomingValue(),llvm::sandboxir::Value::use_begin(),llvm::Value::Value(), andllvm::sandboxir::User::verifyUserOfLLVMUse().

◆ registerCreateInstrCallback()

Context::CallbackID llvm::sandboxir::Context::registerCreateInstrCallback(CreateInstrCallback CB)

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. \Returns a callback ID for later deregistration.

Definition at line703 of fileContext.cpp.

Referencesassert(),CreateInstrCallbacks,llvm::sandboxir::MaxRegisteredCallbacks, andNextCallbackID.

Referenced byllvm::sandboxir::DependencyGraph::DependencyGraph(), andllvm::sandboxir::Region::Region().

◆ registerEraseInstrCallback()

Context::CallbackID llvm::sandboxir::Context::registerEraseInstrCallback(EraseInstrCallback CB)

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. \Returns a callback ID for later deregistration.

Definition at line689 of fileContext.cpp.

Referencesassert(),EraseInstrCallbacks,llvm::sandboxir::MaxRegisteredCallbacks, andNextCallbackID.

Referenced byllvm::sandboxir::DependencyGraph::DependencyGraph(),llvm::sandboxir::InstrMaps::InstrMaps(),llvm::sandboxir::Region::Region(), andllvm::sandboxir::SeedCollector::SeedCollector().

◆ registerMoveInstrCallback()

Context::CallbackID llvm::sandboxir::Context::registerMoveInstrCallback(MoveInstrCallback CB)

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. \Returns a callback ID for later deregistration.

Definition at line716 of fileContext.cpp.

Referencesassert(),llvm::sandboxir::MaxRegisteredCallbacks,MoveInstrCallbacks, andNextCallbackID.

Referenced byllvm::sandboxir::DependencyGraph::DependencyGraph().

◆ registerValue()

Value * llvm::sandboxir::Context::registerValue(std::unique_ptr<Value > && VPtr)
protected

Take ownership of VPtr and store it inLLVMValueToValueMap.

Definition at line34 of fileContext.cpp.

Referencesassert(),llvm::sandboxir::Tracker::emplaceIfTracking(),getTracker(),I,LLVMValueToValueMap, andrunCreateInstrCallbacks().

Referenced bycreateAllocaInst(),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(),createVAArgInst(), andllvm::sandboxir::EraseFromParent::revert().

◆ revert()

void llvm::sandboxir::Context::revert()
inline

Convenience function forgetTracker().revert()

Definition at line226 of fileContext.h.

ReferencesIRTracker, andllvm::sandboxir::Tracker::revert().

◆ runCreateInstrCallbacks()

void llvm::sandboxir::Context::runCreateInstrCallbacks(InstructionI)
protected

Definition at line674 of fileContext.cpp.

ReferencesCreateInstrCallbacks, andI.

Referenced byregisterValue().

◆ runEraseInstrCallbacks()

void llvm::sandboxir::Context::runEraseInstrCallbacks(InstructionI)
protected

Definition at line669 of fileContext.cpp.

ReferencesEraseInstrCallbacks, andI.

◆ runMoveInstrCallbacks()

void llvm::sandboxir::Context::runMoveInstrCallbacks(InstructionI,
constBBIteratorWhere 
)
protected

Definition at line679 of fileContext.cpp.

ReferencesI, andMoveInstrCallbacks.

◆ save()

void llvm::sandboxir::Context::save()
inline

Convenience function forgetTracker().save()

Definition at line224 of fileContext.h.

ReferencesIRTracker, andllvm::sandboxir::Tracker::save().

◆ unregisterCreateInstrCallback()

void llvm::sandboxir::Context::unregisterCreateInstrCallback(CallbackID ID)

Definition at line710 of fileContext.cpp.

Referencesassert(), andCreateInstrCallbacks.

Referenced byllvm::sandboxir::DependencyGraph::~DependencyGraph(), andllvm::sandboxir::Region::~Region().

◆ unregisterEraseInstrCallback()

void llvm::sandboxir::Context::unregisterEraseInstrCallback(CallbackID ID)

Definition at line696 of fileContext.cpp.

Referencesassert(), andEraseInstrCallbacks.

Referenced byllvm::sandboxir::DependencyGraph::~DependencyGraph(),llvm::sandboxir::InstrMaps::~InstrMaps(),llvm::sandboxir::Region::~Region(), andllvm::sandboxir::SeedCollector::~SeedCollector().

◆ unregisterMoveInstrCallback()

void llvm::sandboxir::Context::unregisterMoveInstrCallback(CallbackID ID)

Definition at line723 of fileContext.cpp.

Referencesassert(), andMoveInstrCallbacks.

Referenced byllvm::sandboxir::DependencyGraph::~DependencyGraph().

Friends And Related Function Documentation

◆ BasicBlock

friend classBasicBlock
friend

Various leaf nodes.

Definition at line140 of fileContext.h.

Referenced bycreateBasicBlock().

◆ EraseFromParent

friend classEraseFromParent
friend

Definition at line115 of fileContext.h.

◆ Instruction

friend classInstruction
friend

Definition at line112 of fileContext.h.

◆ IntegerType

friend classIntegerType
friend

Definition at line68 of fileContext.h.

◆ IRSnapshotChecker

friend classIRSnapshotChecker
friend

Definition at line71 of fileContext.h.

◆ PointerType

friend classPointerType
friend

Definition at line67 of fileContext.h.

◆ Region

friend classRegion
friend

Definition at line70 of fileContext.h.

◆ StructType

friend classStructType
friend

Definition at line69 of fileContext.h.

◆ Type

friend classType
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 theObject struct.

Definition at line66 of fileContext.h.

Referenced bygetType().

◆ Utils

friend classUtils
friend

Definition at line127 of fileContext.h.

Member Data Documentation

◆ AllocaInst

friend llvm::sandboxir::Context::AllocaInst
protected

Definition at line204 of fileContext.h.

Referenced bycreateAllocaInst(), andgetOrCreateValueInternal().

◆ AtomicCmpXchgInst

friend llvm::sandboxir::Context::AtomicCmpXchgInst
protected

Definition at line202 of fileContext.h.

Referenced bycreateAtomicCmpXchgInst(), andgetOrCreateValueInternal().

◆ AtomicRMWInst

friend llvm::sandboxir::Context::AtomicRMWInst
protected

Definition at line200 of fileContext.h.

Referenced bycreateAtomicRMWInst(), andgetOrCreateValueInternal().

◆ BinaryOperator

friend llvm::sandboxir::Context::BinaryOperator
protected

Definition at line198 of fileContext.h.

Referenced bycreateBinaryOperator(), andgetOrCreateValueInternal().

◆ BranchInst

friend llvm::sandboxir::Context::BranchInst
protected

Definition at line164 of fileContext.h.

Referenced bycreateBranchInst(), andgetOrCreateValueInternal().

◆ CallBrInst

friend llvm::sandboxir::Context::CallBrInst
protected

Definition at line176 of fileContext.h.

Referenced bycreateCallBrInst(), andgetOrCreateValueInternal().

◆ CallInst

friend llvm::sandboxir::Context::CallInst
protected

Definition at line172 of fileContext.h.

Referenced bycreateCallInst(), andgetOrCreateValueInternal().

◆ CastInst

friend llvm::sandboxir::Context::CastInst
protected

Definition at line206 of fileContext.h.

Referenced bycreateCastInst(), andgetOrCreateValueInternal().

◆ CatchPadInst

friend llvm::sandboxir::Context::CatchPadInst
protected

Definition at line180 of fileContext.h.

Referenced bycreateCatchPadInst(), andgetOrCreateValueInternal().

◆ CatchReturnInst

friend llvm::sandboxir::Context::CatchReturnInst
protected

Definition at line184 of fileContext.h.

Referenced bycreateCatchReturnInst(), andgetOrCreateValueInternal().

◆ CatchSwitchInst

friend llvm::sandboxir::Context::CatchSwitchInst
protected

Definition at line190 of fileContext.h.

Referenced bycreateCatchSwitchInst(), andgetOrCreateValueInternal().

◆ CleanupPadInst

friend llvm::sandboxir::Context::CleanupPadInst
protected

Definition at line182 of fileContext.h.

Referenced bycreateCleanupPadInst(), andgetOrCreateValueInternal().

◆ CleanupReturnInst

friend llvm::sandboxir::Context::CleanupReturnInst
protected

Definition at line186 of fileContext.h.

Referenced bycreateCleanupReturnInst(), andgetOrCreateValueInternal().

◆ CmpInst

friend llvm::sandboxir::Context::CmpInst
protected

Definition at line212 of fileContext.h.

◆ CreateInstrCallbacks

MapVector<CallbackID,CreateInstrCallback> llvm::sandboxir::Context::CreateInstrCallbacks
protected

Callbacks called when an IR instruction is about to get created.

Keys are used as IDs for deregistration.

Definition at line97 of fileContext.h.

Referenced byregisterCreateInstrCallback(),runCreateInstrCallbacks(), andunregisterCreateInstrCallback().

◆ EraseInstrCallbacks

MapVector<CallbackID,EraseInstrCallback> llvm::sandboxir::Context::EraseInstrCallbacks
protected

Callbacks called when an IR instruction is about to get erased.

Keys are used as IDs for deregistration.

Definition at line94 of fileContext.h.

Referenced byregisterEraseInstrCallback(),runEraseInstrCallbacks(), andunregisterEraseInstrCallback().

◆ ExtractElementInst

friend llvm::sandboxir::Context::ExtractElementInst
protected

Definition at line156 of fileContext.h.

Referenced bycreateExtractElementInst(), andgetOrCreateValueInternal().

◆ ExtractValueInst

friend llvm::sandboxir::Context::ExtractValueInst
protected

Definition at line160 of fileContext.h.

Referenced bycreateExtractValueInst(), andgetOrCreateValueInternal().

◆ FCmpInst

friend llvm::sandboxir::Context::FCmpInst
protected

Definition at line216 of fileContext.h.

Referenced bycreateFCmpInst(), andgetOrCreateValueInternal().

◆ FenceInst

friend llvm::sandboxir::Context::FenceInst
protected

Definition at line150 of fileContext.h.

Referenced bycreateFenceInst(), andgetOrCreateValueInternal().

◆ FreezeInst

friend llvm::sandboxir::Context::FreezeInst
protected

Definition at line148 of fileContext.h.

Referenced bycreateFreezeInst(), andgetOrCreateValueInternal().

◆ GetElementPtrInst

friend llvm::sandboxir::Context::GetElementPtrInst
protected

Definition at line188 of fileContext.h.

Referenced bycreateGetElementPtrInst(), andgetOrCreateValueInternal().

◆ ICmpInst

friend llvm::sandboxir::Context::ICmpInst
protected

Definition at line214 of fileContext.h.

Referenced bycreateICmpInst(), andgetOrCreateValueInternal().

◆ InsertElementInst

friend llvm::sandboxir::Context::InsertElementInst
protected

Definition at line154 of fileContext.h.

Referenced bycreateInsertElementInst(), andgetOrCreateValueInternal().

◆ InsertValueInst

friend llvm::sandboxir::Context::InsertValueInst
protected

Definition at line162 of fileContext.h.

Referenced bycreateInsertValueInst(), andgetOrCreateValueInternal().

◆ InvokeInst

friend llvm::sandboxir::Context::InvokeInst
protected

Definition at line174 of fileContext.h.

Referenced bycreateInvokeInst(), andgetOrCreateValueInternal().

◆ IRTracker

Tracker llvm::sandboxir::Context::IRTracker
protected

Definition at line73 of fileContext.h.

Referenced byaccept(),getTracker(),revert(), andsave().

◆ LandingPadInst

friend llvm::sandboxir::Context::LandingPadInst
protected

Definition at line178 of fileContext.h.

Referenced bycreateLandingPadInst(), andgetOrCreateValueInternal().

◆ LLVMCtx

LLVMContext& llvm::sandboxir::Context::LLVMCtx
protected

Definition at line65 of fileContext.h.

Referenced byllvm::sandboxir::ConstantFP::get(),llvm::sandboxir::ConstantTokenNone::get(),llvm::sandboxir::StructType::get(),llvm::sandboxir::ConstantInt::get(),llvm::sandboxir::PointerType::get(),llvm::sandboxir::ConstantInt::getBool(),llvm::sandboxir::ConstantInt::getFalse(),llvm::sandboxir::ConstantInt::getTrue(),llvm::sandboxir::CmpInst::makeCmpResultType(), andllvm::sandboxir::Region::Region().

◆ LLVMIRBuilder

IRBuilder<ConstantFolder> llvm::sandboxir::Context::LLVMIRBuilder
protected

Definition at line142 of fileContext.h.

Referenced bygetLLVMIRBuilder().

◆ LLVMModuleToModuleMap

DenseMap<llvm::Module *, std::unique_ptr<Module> > llvm::sandboxir::Context::LLVMModuleToModuleMap
protected

Maps an LLVMModule to the correspondingsandboxir::Module.

Definition at line80 of fileContext.h.

Referenced bygetModule(), andgetOrCreateModule().

◆ LLVMTypeToTypeMap

DenseMap<llvm::Type *, std::unique_ptr<Type,TypeDeleter> > llvm::sandboxir::Context::LLVMTypeToTypeMap
protected

Maps LLVMType to the corresondingsandboxir::Type.

Owns all Sandbox IRType objects.

Definition at line90 of fileContext.h.

Referenced bygetType().

◆ LLVMValueToValueMap

DenseMap<llvm::Value *, std::unique_ptr<Value> > llvm::sandboxir::Context::LLVMValueToValueMap
protected

Maps LLVMValue to the correspondingsandboxir::Value.

Owns all SandboxIR objects.

Definition at line77 of fileContext.h.

Referenced bydetachLLVMValue(),getNumValues(),getOrCreateArgument(),getOrCreateValueInternal(),getValue(), andregisterValue().

◆ LoadInst

friend llvm::sandboxir::Context::LoadInst
protected

Definition at line166 of fileContext.h.

Referenced bycreateLoadInst(), andgetOrCreateValueInternal().

◆ MoveInstrCallbacks

MapVector<CallbackID,MoveInstrCallback> llvm::sandboxir::Context::MoveInstrCallbacks
protected

Callbacks called when an IR instruction is about to get moved.

Keys are used as IDs for deregistration.

Definition at line100 of fileContext.h.

Referenced byregisterMoveInstrCallback(),runMoveInstrCallbacks(), andunregisterMoveInstrCallback().

◆ NextCallbackID

CallbackID::ValTy llvm::sandboxir::Context::NextCallbackID = 1
protected

A counter used for assigning callback IDs during registration.

The same counter is used for all kinds of callbacks so we can detect mismatched registration/deregistration.

Definition at line105 of fileContext.h.

Referenced byregisterCreateInstrCallback(),registerEraseInstrCallback(), andregisterMoveInstrCallback().

◆ PHINode

friend llvm::sandboxir::Context::PHINode
protected

Definition at line208 of fileContext.h.

Referenced bycreatePHINode(), andgetOrCreateValueInternal().

◆ ResumeInst

friend llvm::sandboxir::Context::ResumeInst
protected

Definition at line192 of fileContext.h.

Referenced bycreateResumeInst(), andgetOrCreateValueInternal().

◆ ReturnInst

friend llvm::sandboxir::Context::ReturnInst
protected

Definition at line170 of fileContext.h.

Referenced bycreateReturnInst(), andgetOrCreateValueInternal().

◆ SelectInst

friend llvm::sandboxir::Context::SelectInst
protected

Definition at line152 of fileContext.h.

Referenced bycreateSelectInst(), andgetOrCreateValueInternal().

◆ ShuffleVectorInst

friend llvm::sandboxir::Context::ShuffleVectorInst
protected

Definition at line158 of fileContext.h.

Referenced bycreateShuffleVectorInst(), andgetOrCreateValueInternal().

◆ StoreInst

friend llvm::sandboxir::Context::StoreInst
protected

Definition at line168 of fileContext.h.

Referenced bycreateStoreInst(), andgetOrCreateValueInternal().

◆ SwitchInst

friend llvm::sandboxir::Context::SwitchInst
protected

Definition at line194 of fileContext.h.

Referenced bycreateSwitchInst(), andgetOrCreateValueInternal().

◆ UnaryOperator

friend llvm::sandboxir::Context::UnaryOperator
protected

Definition at line196 of fileContext.h.

Referenced bycreateUnaryOperator(), andgetOrCreateValueInternal().

◆ UnreachableInst

friend llvm::sandboxir::Context::UnreachableInst
protected

Definition at line210 of fileContext.h.

Referenced bycreateUnreachableInst(), andgetOrCreateValueInternal().

◆ VAArgInst

friend llvm::sandboxir::Context::VAArgInst
protected

Definition at line146 of fileContext.h.

Referenced bycreateVAArgInst(), andgetOrCreateValueInternal().


The documentation for this class was generated from the following files:

Generated on Sun Jul 20 2025 22:36:14 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp