LLVM 23.0.0git
llvm::sandboxir::SBVecContext Class Reference

#include "llvm/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizerIR.h"

Inheritance diagram for llvm::sandboxir::SBVecContext:
[legend]

Public Member Functions

 SBVecContext (llvm::LLVMContext &LLVMCtx)
Public Member Functions inherited from llvm::sandboxir::Context
 Context (LLVMContext &LLVMCtx)
virtual ~Context ()
void clear ()
 Clears function-level state.
TrackergetTracker ()
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::ValuegetValue (llvm::Value *V) const
const sandboxir::ValuegetValue (const llvm::Value *V) const
ModulegetModule (llvm::Module *LLVMM) const
ModulegetOrCreateModule (llvm::Module *LLVMM)
TypegetType (llvm::Type *LLVMTy)
FunctioncreateFunction (llvm::Function *F)
 Create a sandboxir::Function for an existing LLVM IR F, including all blocks and instructions.
ModulecreateModule (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)
 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)
 Register a callback that gets called right after a SandboxIR instruction is created.
void unregisterCreateInstrCallback (CallbackID ID)
CallbackID registerMoveInstrCallback (MoveInstrCallback CB)
 Register a callback that gets called when a SandboxIR instruction is about to be moved.
void unregisterMoveInstrCallback (CallbackID ID)
CallbackID registerSetUseCallback (SetUseCallback CB)
 Register a callback that gets called when a Use gets set.
void unregisterSetUseCallback (CallbackID ID)

Friends

class PackInst

Additional Inherited Members

Public Types inherited from llvm::sandboxir::Context
using EraseInstrCallback = std::function<void(Instruction *)>
using CreateInstrCallback = std::function<void(Instruction *)>
using MoveInstrCallback
using SetUseCallback = std::function<void(const Use &, Value *)>
Protected Member Functions inherited from llvm::sandboxir::Context
std::unique_ptr< ValuedetachLLVMValue (llvm::Value *V)
 Remove V from the maps and returns the unique_ptr.
std::unique_ptr< Valuedetach (Value *V)
 Remove SBV from all SandboxIR maps and stop owning it.
ValueregisterValue (std::unique_ptr< Value > &&VPtr)
 Take ownership of VPtr and store it in LLVMValueToValueMap.
ValuegetOrCreateValueInternal (llvm::Value *V, llvm::User *U=nullptr)
 This is the actual function that creates sandboxir values for V, and among others handles all instruction types.
ArgumentgetOrCreateArgument (llvm::Argument *LLVMArg)
 Get or create a sandboxir::Argument for an existing LLVM IR LLVMArg.
ValuegetOrCreateValue (llvm::Value *LLVMV)
 Get or create a sandboxir::Value for an existing LLVM IR LLVMV.
ConstantgetOrCreateConstant (llvm::Constant *LLVMC)
 Get or create a sandboxir::Constant from an existing LLVM IR LLVMC.
void runEraseInstrCallbacks (Instruction *I)
void runCreateInstrCallbacks (Instruction *I)
void runMoveInstrCallbacks (Instruction *I, const BBIterator &Where)
void runSetUseCallbacks (const Use &U, Value *NewSrc)
BasicBlockcreateBasicBlock (llvm::BasicBlock *BB)
 Create a sandboxir::BasicBlock for an existing LLVM IR BB.
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)
UncondBrInstcreateUncondBrInst (llvm::UncondBrInst *UBI)
CondBrInstcreateCondBrInst (llvm::CondBrInst *CBI)
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 inherited from llvm::sandboxir::Context
LLVMContextLLVMCtx
Tracker IRTracker
DenseMap< llvm::Value *, std::unique_ptr< Value > > LLVMValueToValueMap
 Maps LLVM Value to the corresponding sandboxir::Value.
DenseMap< llvm::Module *, std::unique_ptr< Module > > LLVMModuleToModuleMap
 Maps an LLVM Module to the corresponding sandboxir::Module.
DenseMap< llvm::Type *, std::unique_ptr< Type, TypeDeleter > > LLVMTypeToTypeMap
 Maps LLVM Type to the corresonding sandboxir::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.
MapVector< CallbackID, SetUseCallbackSetUseCallbacks
 Callbacks called when a Use gets its source set.
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 UncondBrInst
friend CondBrInst
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

Detailed Description

Definition at line 48 of file SandboxVectorizerIR.h.

Constructor & Destructor Documentation

◆ SBVecContext()

llvm::sandboxir::SBVecContext::SBVecContext ( llvm::LLVMContext & LLVMCtx)
inline

◆ PackInst

friend class PackInst
friend

Definition at line 51 of file SandboxVectorizerIR.h.

References PackInst.

Referenced by PackInst.


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