llvm::sandboxir

Transactional IR layer over LLVM IR with save/restore and an LLVM-like API.

Types

NameDescription
Action Describes how to vectorize a bundle of values.
AddrSpaceCastInst SandboxIR wrapper for an LLVM addrspacecast instruction.
AllocaInst SandboxIR wrapper for an LLVM alloca instruction.
Analyses Analysis results available to Sandbox IR passes.
Argument Argument of a sandboxir::Function.
ArrayType Class to represent array types.
AtomicCmpXchgInst SandboxIR wrapper for an LLVM cmpxchg instruction.
AtomicRMWInst SandboxIR wrapper for an LLVM atomicrmw instruction.
BBIterator Iterator for Instructions in a `BasicBlock.
BasicBlock Contains a list of sandboxir::Instruction's.
BinaryOperator SandboxIR wrapper for an LLVM binary operator.
BitCastInst SandboxIR wrapper for an LLVM bitcast instruction.
BlockAddress A constant that refers to the address of a basic block.
BrInstCommon Shared base for UncondBrInst and CondBrInst successor accessors.
BundleVec A simple bottom-up or top-down vectorizer Region pass.
ByteType Class to represent byte types.
CallBase Base class for SandboxIR call-like instructions.
CallBrInst SandboxIR wrapper for an LLVM callbr instruction.
CallInst SandboxIR wrapper for an LLVM call instruction.
CastInst Base class for SandboxIR cast instructions.
CastInstImpl CRTP helper implementing concrete SandboxIR cast instructions.
CatchPadInst SandboxIR wrapper for an LLVM catchpad instruction.
CatchReturnInst SandboxIR wrapper for an LLVM catchret instruction.
CatchSwitchAddHandler Tracks adding a handler to a catchswitch instruction.
CatchSwitchInst SandboxIR wrapper for an LLVM catchswitch instruction.
CleanupPadInst SandboxIR wrapper for an LLVM cleanuppad instruction.
CleanupReturnInst SandboxIR wrapper for an LLVM cleanupret instruction.
CmpInst Base class for SandboxIR integer and floating-point compares.
CmpSwapOperands Tracks swapping the operands of a compare instruction.
CollectDescr Describes how to collect the values needed by each lane.
CondBrInst SandboxIR wrapper for a conditional branch instruction.
Constant A SandboxIR wrapper for an LLVM constant value.
ConstantAggregate Base class for aggregate constants (with operands).
ConstantAggregateZero A SandboxIR wrapper for an all-zero aggregate constant.
ConstantArray A SandboxIR wrapper for a constant array.
ConstantDataArray A densely packed array constant of simple integer or floating-point elements.
ConstantDataSequential Base class for densely packed array/vector constants of simple data elements.
ConstantDataVector A densely packed vector constant of simple integer or floating-point elements.
ConstantExpr A constant expression computed from other constants.
ConstantFP A SandboxIR wrapper for a floating-point constant.
ConstantInt A SandboxIR wrapper for an integer constant.
ConstantPointerNull A SandboxIR wrapper for a null pointer constant.
ConstantPtrAuth A constant that represents a pointer authenticated (signed) pointer value.
ConstantStruct A SandboxIR wrapper for a constant struct.
ConstantTokenNone A constant token with no value, used for untyped token operands.
ConstantVector A SandboxIR wrapper for a constant vector with operand elements.
Context Owns SandboxIR objects, maps them to LLVM IR, and tracks IR changes.
CreateAndInsertInst Tracks creating and inserting a new instruction.
DGNode A DependencyGraph Node that points to an Instruction and contains memory dependency edges.
DSOLocalEquivalent A wrapper representing a dso_local_equivalent constant for a global value.
DependencyGraph Dependency graph of Sandbox IR instructions used by the vectorizer scheduler.
DiamondReuse Legality result that reuses an existing vector without new code.
DiamondReuseMultiInput Legality result that reuses multiple vectors and/or scalars.
DiamondReuseWithShuffle Legality result that reuses an existing vector with a shuffle.
EraseFromParent Tracks erasing an instruction (and optionally related instructions) from its parent, retaining enough state to restore them.
ExtractElementInst SandboxIR wrapper for an LLVM extractelement instruction.
ExtractValueInst SandboxIR wrapper for an LLVM extractvalue instruction.
FCmpInst SandboxIR wrapper for an LLVM fcmp instruction.
FPExtInst SandboxIR wrapper for an LLVM fpext instruction.
FPMathOperator Utility class for floating-point operations with relaxed accuracy info.
FPToSIInst SandboxIR wrapper for an LLVM fptosi instruction.
FPToUIInst SandboxIR wrapper for an LLVM fptoui instruction.
FPTruncInst SandboxIR wrapper for an LLVM fptrunc instruction.
FenceInst SandboxIR wrapper for an LLVM fence instruction.
FixedVectorType Class to represent fixed width SIMD vectors.
FreezeInst SandboxIR wrapper for an LLVM freeze instruction.
FuncletPadInst Base class for SandboxIR catchpad and cleanuppad instructions.
Function SandboxIR wrapper around an LLVM Function.
FunctionPass A pass that runs on a sandbox::Function.
FunctionPassManager A pass manager that runs function passes on a sandbox::Function.
FunctionType Class to represent function types.
GenericSetter Tracks most instruction setter changes via getter/setter member pointers.
GenericSetterWithIdx Similar to GenericSetter but the setters/getters have an index as their first argument. This is commont in cases like: getOperand(unsigned Idx)
GetElementPtrInst SandboxIR wrapper for an LLVM getelementptr instruction.
GlobalAlias A SandboxIR wrapper for an LLVM global alias.
GlobalIFunc A SandboxIR wrapper for an LLVM indirect function (ifunc).
GlobalObject A SandboxIR wrapper for an LLVM GlobalObject (function, variable, or ifunc).
GlobalValue A SandboxIR wrapper for an LLVM GlobalValue.
GlobalVariable A SandboxIR wrapper for an LLVM global variable.
GlobalWithNodeAPI Mixin that adds module list iterators to SandboxIR globals.
ICmpInst SandboxIR wrapper for an LLVM icmp instruction.
IRChangeBase The base class for IR Change classes.
IRSnapshotChecker Debug checker that snapshots SandboxIR functions and compares them after revert.
InsertElementInst SandboxIR wrapper for an LLVM insertelement instruction.
InsertIntoBB Tracks inserting an instruction into a basic block.
InsertPosition Insertion point for creating SandboxIR instructions.
InsertValueInst SandboxIR wrapper for an LLVM insertvalue instruction.
InstrMaps Maps the original instructions to the vectorized instrs and the reverse. For now an original instr can only map to a single vector.
Instruction A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction list.
IntToPtrInst SandboxIR wrapper for an LLVM inttoptr instruction.
IntegerType Class to represent integer types.
Interval A contiguous inclusive range of ordered nodes from top through bottom.
IntervalIterator A simple iterator for iterating the interval.
IntrinsicInst SandboxIR class IntrinsicInst.
InvokeInst SandboxIR wrapper for an LLVM invoke instruction.
LLVMOpUserItToSBTy Helper that maps LLVM operand-user iterators to SandboxIR types.
LandingPadInst SandboxIR wrapper for an LLVM landingpad instruction.
LegalityAnalysis Performs the legality analysis and returns a LegalityResult object.
LegalityResult Result of a legality check for vectorizing a bundle.
LegalityResultWithReason Base class for results with reason.
LoadInst SandboxIR wrapper for an LLVM load instruction.
LoadStoreVec A Region pass that vectorizes short store-load chains.
MemDGNode A DependencyGraph Node for instructions that may read/write memory, or have some ordering constraints, like with stacksave/stackrestore and alloca/inalloca.
MemDGNodeIntervalBuilder Convenience builders for a MemDGNode interval.
MemSeedBundle Specialization of SeedBundle for memory-access instructions.
Module In SandboxIR the Module is mainly used to access the list of global objects.
MoveInstr Tracks moving an instruction to a new position in the IR.
NoCFIValue A constant that wraps a global value without CFI instrumentation.
NullPass A Region pass that does nothing, for use as a placeholder in tests.
OpaqueInst SandboxIR instruction with no specialized API surface.
OpaqueValue Opaque SandboxIR wrapper for LLVM values without a dedicated subclass.
OperandUseIterator Iterator for the Use edges of a User's operands.
Operator Utility class that abstracts common functionality of Instructions and ConstantExprs.
OverflowingBinaryOperator Utility class for integer operators that may exhibit overflow.
PHIAddIncoming Tracks addition of an incoming value to a PHI node.
PHINode SandboxIR wrapper for an LLVM PHI node.
PHIRemoveIncoming Tracks removal of an incoming value from a PHI node.
Pack Legality result that packs scalars instead of vectorizing.
PackInst A SandboxIR instruction that packs scalar values into a vector.
PackReuse A Region pass that de-duplicates packs by reusing existing pack patterns.
Pass The base class of a Sandbox IR Pass.
PassManager Base class.
PointerType Class to represent pointers.
PoisonValue A SandboxIR wrapper for an LLVM poison value.
PossiblyDisjointInst An or instruction that can be marked "disjoint".
PossiblyNonNegInst Instruction that can have a nneg flag (zext/uitofp).
PredIterator Iterate over both def-use and mem dependencies.
PrintInstructionCount A Region pass that prints the instruction count for the region to stdout. Used to test -sbvec-passes while we don't have any actual optimization passes.
PrintRegion A Region pass that does nothing, for use as a placeholder in tests.
PriorityCmp Comparator that orders ready-list nodes by scheduling priority.
PtrToAddrInst SandboxIR wrapper for an LLVM ptrtoaddr instruction.
PtrToIntInst SandboxIR wrapper for an LLVM ptrtoint instruction.
ReadyListContainer The list holding nodes that are ready to schedule. Used by the scheduler.
Region The unit that RegionPasses operate on: new instructions from vectorization.
RegionInternalsAttorney A helper client-attorney class for unit tests.
RegionPass A pass that runs on a sandbox::Region.
RegionPassManager A pass manager that runs region passes on a sandbox::Region.
RegionWithScore A Region class that tracks its instructions score.
RegionsFromBBs A SandboxIR function pass that builds one region per BB and runs a region pass pipeline on them.
RegionsFromMetadata A SandboxIR function pass that builds regions from IR metadata and then runs a pipeline of region passes on them.
RemoveFromParent Tracks removing an instruction from its parent without deleting it.
ResumeInst SandboxIR wrapper for an LLVM resume instruction.
ReturnInst SandboxIR wrapper for an LLVM return instruction.
SBVecContext SandboxIR context specialized for the SandboxVectorizer.
SExtInst SandboxIR wrapper for an LLVM sext instruction.
SIToFPInst SandboxIR wrapper for an LLVM sitofp instruction.
SandboxVectorizerPassBuilder Factory for creating SandboxVectorizer function and region passes by name.
ScalableVectorType Class to represent scalable SIMD vectors.
SchedBundle The nodes that need to be scheduled back-to-back in a single scheduling cycle form a SchedBundle.
Scheduler The list scheduler.
SchedulerInternalsAttorney A client-attorney class for accessing the Scheduler's internals (used for unit tests).
SchedulingPoint Scheduling cursor used by the Scheduler during top-down or bottom-up scheduling.
ScoreBoard Vectorization Score (cost) tracking class.
SeedBundle A set of candidate Instructions for vectorizing together.
SeedCollection Collects vectorization seed instructions and runs a region-pass pipeline.
SeedCollector Collects load and store seed instructions from a basic block.
SeedContainer Tracks seeds within SeedBundles keyed by pointer, type, and opcode.
SelectInst SandboxIR wrapper for an LLVM select instruction.
ShuffleMask A shuffle mask describing how to rearrange vector lanes.
ShuffleVectorInst SandboxIR wrapper for an LLVM shufflevector instruction.
ShuffleVectorSetMask Tracks changing the shuffle mask of a shufflevector instruction.
SingleLLVMInstructionImpl Instructions that contain a single LLVM Instruction can inherit from this.
StoreInst SandboxIR wrapper for an LLVM store instruction.
StructType Class to represent struct types.
SuccIterator Iterate over both def-use and mem dependencies.
SwitchAddCase Tracks adding a case to a switch instruction.
SwitchInst SandboxIR wrapper for an LLVM switch instruction.
SwitchRemoveCase Tracks removing case(s) from a switch instruction.
TargetExtType Target extension type wrapper (defined elsewhere).
ToStr Helpers that map legality enums to debug string names.
Tracker The tracker collects all the change objects and implements the main API for saving / reverting / accepting.
TransactionAcceptOrRevert A Region pass that accepts or reverts Sandbox IR based on vectorization cost.
TransactionAlwaysAccept A Region pass that always accepts the transaction without checking its cost.
TransactionAlwaysRevert A Region pass that always reverts the transaction without checking its cost.
TransactionSave A Region pass that saves the Sandbox IR state via Context::save().
TruncInst SandboxIR wrapper for an LLVM trunc instruction.
Type Just like llvm::Type these are immutable, unique, never get freed and can only be created via static factory methods.
UIToFPInst SandboxIR wrapper for an LLVM uitofp instruction.
UnaryInstruction An abstract class, parent of unary instructions.
UnaryOperator SandboxIR wrapper for an LLVM unary operator.
UncondBrInst SandboxIR wrapper for an unconditional branch instruction.
UndefValue A SandboxIR wrapper for an LLVM undef value.
UnreachableInst SandboxIR wrapper for an LLVM unreachable instruction.
Use Represents a Def-use/Use-def edge in SandboxIR.
UseSet Tracks the change of the source Value of a sandboxir::Use.
UseSwap Tracks swapping a Use with another Use.
User A sandboxir::User has operands.
UserUseIterator Iterator for the Use edges of a Value's users.
Utils Collector for SandboxIR-related convenience functions that don't belong in other classes.
VAArgInst SandboxIR wrapper for an LLVM va_arg instruction.
Value A SandboxIR Value has users. This is the base class.
VecUtils Convenience helpers for the SandboxVectorizer that do not belong elsewhere.
VectorType Base class of all SIMD vector types.
Widen Legality result indicating the bundle should be widened into a vector.
ZExtInst SandboxIR wrapper for an LLVM zext instruction.

Type Aliases

NameDescription
BundleTy Small vector of values representing a vectorization bundle.
LoadSeedBundle Seed bundle specialized for load instructions.
StoreSeedBundle Seed bundle specialized for store instructions.

Enums

NameDescription
DGNodeID SubclassIDs for isa/dyn_cast etc.
LegalityResultID Identifiers for concrete LegalityResult subclasses.
RegionClassID Identifiers for Region subclasses used by classof-style checks.
ResultReason The reason for vectorizing or not vectorizing.
SchedDirection Direction in which the scheduler walks the dependency graph.

Functions

NameDescription
getLoadStoreAddressSpace Return the address space of a load or store pointer.
schedDirectionToStr Return a string name for scheduling direction Dir.
operator<< Stream insertion operators