#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 &)> |
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. | |
usingllvm::sandboxir::Context::CreateInstrCallback = std::function<void(Instruction *)> |
usingllvm::sandboxir::Context::EraseInstrCallback = std::function<void(Instruction *)> |
usingllvm::sandboxir::Context::MoveInstrCallback = std::function<void(Instruction *,constBBIterator &)> |
llvm::sandboxir::Context::Context | ( | LLVMContext & | LLVMCtx | ) |
Definition at line608 of fileContext.cpp.
llvm::sandboxir::Context::~Context | ( | ) |
Definition at line612 of fileContext.cpp.
| inline |
Convenience function forgetTracker().accept()
Definition at line228 of fileContext.h.
Referencesllvm::sandboxir::Tracker::accept(), andIRTracker.
| protected |
Definition at line581 of fileContext.cpp.
ReferencesAllocaInst,I, andregisterValue().
Referenced byllvm::sandboxir::AllocaInst::create().
| protected |
Definition at line576 of fileContext.cpp.
ReferencesAtomicCmpXchgInst,I, andregisterValue().
Referenced byllvm::sandboxir::AtomicCmpXchgInst::create().
| protected |
Definition at line571 of fileContext.cpp.
ReferencesAtomicRMWInst,I, andregisterValue().
| 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().
| protected |
Definition at line567 of fileContext.cpp.
ReferencesBinaryOperator,I, andregisterValue().
| protected |
Definition at line483 of fileContext.cpp.
ReferencesBranchInst, andregisterValue().
Referenced byllvm::sandboxir::BranchInst::create().
| protected |
Definition at line513 of fileContext.cpp.
ReferencesCallBrInst,I, andregisterValue().
| protected |
Definition at line503 of fileContext.cpp.
ReferencesCallInst,I, andregisterValue().
Referenced byllvm::Instruction::dropPoisonGeneratingReturnAttributes().
| protected |
Definition at line585 of fileContext.cpp.
ReferencesCastInst,I, andregisterValue().
Referenced byllvm::sandboxir::CastInst::create().
| protected |
Definition at line527 of fileContext.cpp.
ReferencesCatchPadInst,I, andregisterValue().
Referenced byllvm::sandboxir::CatchPadInst::create().
| protected |
Definition at line535 of fileContext.cpp.
ReferencesCatchReturnInst,I, andregisterValue().
Referenced byllvm::sandboxir::CatchReturnInst::create().
| protected |
Definition at line551 of fileContext.cpp.
ReferencesCatchSwitchInst,I, andregisterValue().
| protected |
Definition at line531 of fileContext.cpp.
ReferencesCleanupPadInst,I, andregisterValue().
| protected |
Definition at line540 of fileContext.cpp.
ReferencesCleanupReturnInst,I, andregisterValue().
Referenced byllvm::Instruction::getOpcodeName().
| protected |
| protected |
Definition at line451 of fileContext.cpp.
ReferencesExtractElementInst, andregisterValue().
Referenced byllvm::sandboxir::ExtractElementInst::create().
| protected |
Definition at line471 of fileContext.cpp.
ReferencesExtractValueInst, andregisterValue().
Referenced byllvm::sandboxir::ExtractValueInst::create().
| protected |
Definition at line597 of fileContext.cpp.
ReferencesFCmpInst,I, andregisterValue().
Referenced byllvm::sandboxir::CmpInst::create().
| protected |
Definition at line440 of fileContext.cpp.
ReferencesFenceInst, andregisterValue().
Referenced byllvm::sandboxir::FenceInst::create().
| protected |
Definition at line435 of fileContext.cpp.
ReferencesFreezeInst, andregisterValue().
Referenced byllvm::sandboxir::FreezeInst::create().
Function * llvm::sandboxir::Context::createFunction | ( | llvm::Function * | F | ) |
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().
| protected |
Definition at line546 of fileContext.cpp.
ReferencesGetElementPtrInst,I, andregisterValue().
Referenced byllvm::sandboxir::GetElementPtrInst::create().
| protected |
Definition at line593 of fileContext.cpp.
ReferencesI,ICmpInst, andregisterValue().
Referenced byllvm::sandboxir::CmpInst::create().
| protected |
Definition at line458 of fileContext.cpp.
ReferencesInsertElementInst, andregisterValue().
Referenced byllvm::sandboxir::InsertElementInst::create().
| protected |
Definition at line477 of fileContext.cpp.
ReferencesInsertValueInst, andregisterValue().
Referenced byllvm::sandboxir::InsertValueInst::create().
| protected |
Definition at line508 of fileContext.cpp.
ReferencesI,InvokeInst, andregisterValue().
Referenced byllvm::sandboxir::InvokeInst::create().
| protected |
Definition at line523 of fileContext.cpp.
ReferencesI,LandingPadInst, andregisterValue().
Referenced byllvm::Instruction::hasAllowReciprocal().
| protected |
Definition at line488 of fileContext.cpp.
ReferencesLoadInst, andregisterValue().
Referenced byllvm::sandboxir::LoadInst::create().
Module * llvm::sandboxir::Context::createModule | ( | llvm::Module * | LLVMM | ) |
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().
| protected |
Definition at line589 of fileContext.cpp.
ReferencesI,PHINode, andregisterValue().
Referenced byllvm::sandboxir::PHINode::create().
| protected |
Definition at line555 of fileContext.cpp.
ReferencesI,registerValue(), andResumeInst.
Referenced byllvm::sandboxir::ResumeInst::create().
| protected |
Definition at line498 of fileContext.cpp.
ReferencesI,registerValue(), andReturnInst.
| protected |
Definition at line445 of fileContext.cpp.
ReferencesregisterValue(), andSelectInst.
| protected |
Definition at line465 of fileContext.cpp.
ReferencesregisterValue(), andShuffleVectorInst.
Referenced byllvm::sandboxir::ShuffleVectorInst::create().
| protected |
Definition at line493 of fileContext.cpp.
ReferencesregisterValue(), andStoreInst.
Referenced byllvm::sandboxir::StoreInst::create().
| protected |
Definition at line559 of fileContext.cpp.
ReferencesI,registerValue(), andSwitchInst.
Referenced byllvm::sandboxir::SwitchInst::create().
| protected |
Definition at line563 of fileContext.cpp.
ReferencesI,registerValue(), andUnaryOperator.
Referenced byllvm::sandboxir::UnaryOperator::create().
| protected |
Definition at line518 of fileContext.cpp.
ReferencesregisterValue(), andUnreachableInst.
Referenced byllvm::sandboxir::UnreachableInst::create().
| protected |
Definition at line430 of fileContext.cpp.
ReferencesregisterValue(), andVAArgInst.
Referenced byllvm::sandboxir::VAArgInst::create().
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().
| protected |
RemoveV
from the maps and returns the unique_ptr.
Definition at line16 of fileContext.cpp.
ReferencesLLVMValueToValueMap.
Referenced bydetach().
| inlineprotected |
Definition at line143 of fileContext.h.
ReferencesLLVMIRBuilder.
Referenced byllvm::sandboxir::Instruction::setInsertPos().
Module * llvm::sandboxir::Context::getModule | ( | llvm::Module * | LLVMM | ) | const |
Definition at line614 of fileContext.cpp.
ReferencesLLVMModuleToModuleMap.
Referenced byllvm::sandboxir::Function::getParent().
| inline |
\Returns the number of values registered withContext.
Definition at line260 of fileContext.h.
ReferencesLLVMValueToValueMap.
Referenced byllvm::sandboxir::Value::Value().
| protected |
Get or create asandboxir::Argument for an existing LLVM IRLLVMArg
.
Definition at line407 of fileContext.cpp.
ReferencesLLVMValueToValueMap.
Referenced bycreateFunction().
| 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().
Module * llvm::sandboxir::Context::getOrCreateModule | ( | llvm::Module * | LLVMM | ) |
Definition at line621 of fileContext.cpp.
ReferencesLLVMModuleToModuleMap.
Referenced bycreateFunction(), andcreateModule().
| 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().
| 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().
| 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().
| 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().
| inline |
Definition at line231 of fileContext.h.
ReferencesgetValue().
Value * llvm::sandboxir::Context::getValue | ( | llvm::Value * | V | ) | 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().
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().
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().
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().
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().
| inline |
Convenience function forgetTracker().revert()
Definition at line226 of fileContext.h.
ReferencesIRTracker, andllvm::sandboxir::Tracker::revert().
| protected |
Definition at line674 of fileContext.cpp.
ReferencesCreateInstrCallbacks, andI.
Referenced byregisterValue().
| protected |
Definition at line669 of fileContext.cpp.
ReferencesEraseInstrCallbacks, andI.
| protected |
Definition at line679 of fileContext.cpp.
ReferencesI, andMoveInstrCallbacks.
| inline |
Convenience function forgetTracker().save()
Definition at line224 of fileContext.h.
ReferencesIRTracker, andllvm::sandboxir::Tracker::save().
void llvm::sandboxir::Context::unregisterCreateInstrCallback | ( | CallbackID | ID | ) |
Definition at line710 of fileContext.cpp.
Referencesassert(), andCreateInstrCallbacks.
Referenced byllvm::sandboxir::DependencyGraph::~DependencyGraph(), andllvm::sandboxir::Region::~Region().
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().
void llvm::sandboxir::Context::unregisterMoveInstrCallback | ( | CallbackID | ID | ) |
Definition at line723 of fileContext.cpp.
Referencesassert(), andMoveInstrCallbacks.
Referenced byllvm::sandboxir::DependencyGraph::~DependencyGraph().
| friend |
| friend |
| friend |
| friend |
| 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 theObject
struct.
Definition at line66 of fileContext.h.
Referenced bygetType().
| protected |
Definition at line204 of fileContext.h.
Referenced bycreateAllocaInst(), andgetOrCreateValueInternal().
| protected |
Definition at line202 of fileContext.h.
Referenced bycreateAtomicCmpXchgInst(), andgetOrCreateValueInternal().
| protected |
Definition at line200 of fileContext.h.
Referenced bycreateAtomicRMWInst(), andgetOrCreateValueInternal().
| protected |
Definition at line198 of fileContext.h.
Referenced bycreateBinaryOperator(), andgetOrCreateValueInternal().
| protected |
Definition at line164 of fileContext.h.
Referenced bycreateBranchInst(), andgetOrCreateValueInternal().
| protected |
Definition at line176 of fileContext.h.
Referenced bycreateCallBrInst(), andgetOrCreateValueInternal().
| protected |
Definition at line172 of fileContext.h.
Referenced bycreateCallInst(), andgetOrCreateValueInternal().
| protected |
Definition at line206 of fileContext.h.
Referenced bycreateCastInst(), andgetOrCreateValueInternal().
| protected |
Definition at line180 of fileContext.h.
Referenced bycreateCatchPadInst(), andgetOrCreateValueInternal().
| protected |
Definition at line184 of fileContext.h.
Referenced bycreateCatchReturnInst(), andgetOrCreateValueInternal().
| protected |
Definition at line190 of fileContext.h.
Referenced bycreateCatchSwitchInst(), andgetOrCreateValueInternal().
| protected |
Definition at line182 of fileContext.h.
Referenced bycreateCleanupPadInst(), andgetOrCreateValueInternal().
| protected |
Definition at line186 of fileContext.h.
Referenced bycreateCleanupReturnInst(), andgetOrCreateValueInternal().
| 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().
| 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().
| protected |
Definition at line156 of fileContext.h.
Referenced bycreateExtractElementInst(), andgetOrCreateValueInternal().
| protected |
Definition at line160 of fileContext.h.
Referenced bycreateExtractValueInst(), andgetOrCreateValueInternal().
| protected |
Definition at line216 of fileContext.h.
Referenced bycreateFCmpInst(), andgetOrCreateValueInternal().
| protected |
Definition at line150 of fileContext.h.
Referenced bycreateFenceInst(), andgetOrCreateValueInternal().
| protected |
Definition at line148 of fileContext.h.
Referenced bycreateFreezeInst(), andgetOrCreateValueInternal().
| protected |
Definition at line188 of fileContext.h.
Referenced bycreateGetElementPtrInst(), andgetOrCreateValueInternal().
| protected |
Definition at line214 of fileContext.h.
Referenced bycreateICmpInst(), andgetOrCreateValueInternal().
| protected |
Definition at line154 of fileContext.h.
Referenced bycreateInsertElementInst(), andgetOrCreateValueInternal().
| protected |
Definition at line162 of fileContext.h.
Referenced bycreateInsertValueInst(), andgetOrCreateValueInternal().
| protected |
Definition at line174 of fileContext.h.
Referenced bycreateInvokeInst(), andgetOrCreateValueInternal().
| protected |
| protected |
Definition at line178 of fileContext.h.
Referenced bycreateLandingPadInst(), andgetOrCreateValueInternal().
| 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().
| protected |
Definition at line142 of fileContext.h.
Referenced bygetLLVMIRBuilder().
| protected |
Maps an LLVMModule to the correspondingsandboxir::Module.
Definition at line80 of fileContext.h.
Referenced bygetModule(), andgetOrCreateModule().
| protected |
| protected |
Maps LLVMValue to the correspondingsandboxir::Value.
Owns all SandboxIR objects.
Definition at line77 of fileContext.h.
Referenced bydetachLLVMValue(),getNumValues(),getOrCreateArgument(),getOrCreateValueInternal(),getValue(), andregisterValue().
| protected |
Definition at line166 of fileContext.h.
Referenced bycreateLoadInst(), andgetOrCreateValueInternal().
| 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().
| 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().
| protected |
Definition at line208 of fileContext.h.
Referenced bycreatePHINode(), andgetOrCreateValueInternal().
| protected |
Definition at line192 of fileContext.h.
Referenced bycreateResumeInst(), andgetOrCreateValueInternal().
| protected |
Definition at line170 of fileContext.h.
Referenced bycreateReturnInst(), andgetOrCreateValueInternal().
| protected |
Definition at line152 of fileContext.h.
Referenced bycreateSelectInst(), andgetOrCreateValueInternal().
| protected |
Definition at line158 of fileContext.h.
Referenced bycreateShuffleVectorInst(), andgetOrCreateValueInternal().
| protected |
Definition at line168 of fileContext.h.
Referenced bycreateStoreInst(), andgetOrCreateValueInternal().
| protected |
Definition at line194 of fileContext.h.
Referenced bycreateSwitchInst(), andgetOrCreateValueInternal().
| protected |
Definition at line196 of fileContext.h.
Referenced bycreateUnaryOperator(), andgetOrCreateValueInternal().
| protected |
Definition at line210 of fileContext.h.
Referenced bycreateUnreachableInst(), andgetOrCreateValueInternal().
| protected |
Definition at line146 of fileContext.h.
Referenced bycreateVAArgInst(), andgetOrCreateValueInternal().