LLVM 22.0.0git
llvm::sandboxir Namespace Reference

Classes

struct  Action
class  AddrSpaceCastInst
class  AllocaInst
class  Analyses
class  Argument
 Argument of a sandboxir::Function. More...
class  ArrayType
class  AtomicCmpXchgInst
class  AtomicRMWInst
class  BinaryOperator
class  BitCastInst
class  BlockAddress
class  BottomUpVec
 This is a simple bottom-up vectorizer Region pass. More...
class  BranchInst
class  CallBase
class  CallBrInst
class  CallInst
class  CastInst
class  CastInstImpl
class  CatchPadInst
class  CatchReturnInst
class  CatchSwitchAddHandler
class  CatchSwitchInst
class  CleanupPadInst
class  CleanupReturnInst
class  CmpInst
class  CmpSwapOperands
class  CollectDescr
 Describes how to collect the values needed by each lane. More...
class  Constant
class  ConstantAggregate
 Base class for aggregate constants (with operands). More...
class  ConstantAggregateZero
class  ConstantArray
class  ConstantDataArray
class  ConstantDataSequential
 ConstantDataSequential - A vector or array constant whose element type is a simple 1/2/4/8-byte integer or half/bfloat/float/double, and whose elements are just simple data values (i.e. More...
class  ConstantDataVector
 A vector constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. More...
class  ConstantExpr
class  ConstantFP
class  ConstantInt
class  ConstantPointerNull
class  ConstantPtrAuth
class  ConstantStruct
class  ConstantTokenNone
class  ConstantVector
class  Context
class  CreateAndInsertInst
class  DependencyGraph
class  DGNode
 A DependencyGraph Node that points to an Instruction and contains memory dependency edges. More...
class  DiamondReuse
class  DiamondReuseMultiInput
class  DiamondReuseWithShuffle
class  DSOLocalEquivalent
class  EraseFromParent
class  ExtractElementInst
class  ExtractValueInst
class  FCmpInst
class  FenceInst
class  FixedVectorType
class  FPExtInst
class  FPMathOperator
class  FPToSIInst
class  FPToUIInst
class  FPTruncInst
class  FreezeInst
class  FuncletPadInst
class  Function
class  FunctionPass
 A pass that runs on a sandbox::Function. More...
class  FunctionPassManager
class  FunctionType
class  GenericSetter
 This class can be used for tracking most instruction setters. More...
class  GenericSetterWithIdx
 Similar to GenericSetter but the setters/getters have an index as their first argument. More...
class  GetElementPtrInst
class  GlobalAlias
class  GlobalIFunc
class  GlobalObject
class  GlobalValue
class  GlobalVariable
class  GlobalWithNodeAPI
 Provides API functions, like getIterator() and getReverseIterator() to GlobalIFunc, Function, GlobalVariable and GlobalAlias. More...
class  ICmpInst
class  InsertElementInst
class  InsertIntoBB
class  InsertPosition
class  InsertValueInst
class  InstrMaps
 Maps the original instructions to the vectorized instrs and the reverse. More...
class  Instruction
 A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction list. More...
class  IntegerType
 Class to represent integer types. More...
class  Interval
class  IntervalIterator
 A simple iterator for iterating the interval. More...
class  IntrinsicInst
class  IntToPtrInst
class  InvokeInst
class  IRChangeBase
 The base class for IR Change classes. More...
class  IRSnapshotChecker
 A class that saves hashes and textual IR snapshots of functions in a SandboxIR Context, and does hash comparison when expectNoDiff is called. More...
class  LandingPadInst
class  LegalityAnalysis
 Performs the legality analysis and returns a LegalityResult object. More...
class  LegalityResult
 The legality outcome is represented by a class rather than an enum class because in some cases the legality checks are expensive and look for a particular instruction that can be passed along to the vectorizer to avoid repeating the same expensive computation. More...
class  LegalityResultWithReason
 Base class for results with reason. More...
class  LoadInst
class  MemDGNode
 A DependencyGraph Node for instructions that may read/write memory, or have some ordering constraints, like with stacksave/stackrestore and alloca/inalloca. More...
class  MemDGNodeIntervalBuilder
 Convenience builders for a MemDGNode interval. More...
class  MemSeedBundle
 Specialization of SeedBundle for memory access instructions. More...
class  Module
 In SandboxIR the Module is mainly used to access the list of global objects. More...
class  MoveInstr
class  NoCFIValue
class  NullPass
 A Region pass that does nothing, for use as a placeholder in tests. More...
class  OpaqueInst
 An LLLVM Instruction that has no SandboxIR equivalent class gets mapped to an OpaqueInstr. More...
class  OpaqueValue
class  OperandUseIterator
 Iterator for the Use edges of a User's operands. More...
class  Operator
class  OverflowingBinaryOperator
class  Pack
class  PackReuse
 This pass aims at de-duplicating packs, i.e., try to reuse already existing pack patterns instead of keeping both. More...
class  Pass
 The base class of a Sandbox IR Pass. More...
class  PassManager
 Base class. More...
class  PHIAddIncoming
class  PHINode
class  PHIRemoveIncoming
class  PointerType
class  PoisonValue
class  PossiblyDisjointInst
 An or instruction, which can be marked as "disjoint", indicating that the inputs don't have a 1 in the same bit position. More...
class  PossiblyNonNegInst
 Instruction that can have a nneg flag (zext/uitofp). More...
class  PredIterator
 Iterate over both def-use and mem dependencies. More...
class  PrintInstructionCount
 A Region pass that prints the instruction count for the region to stdout. More...
class  PrintRegion
 A Region pass that does nothing, for use as a placeholder in tests. More...
class  PriorityCmp
class  PtrToAddrInst
class  PtrToIntInst
class  ReadyListContainer
 The list holding nodes that are ready to schedule. Used by the scheduler. More...
class  Region
 The main job of the Region is to point to new instructions generated by vectorization passes. More...
class  RegionInternalsAttorney
 A helper client-attorney class for unit tests. More...
class  RegionPass
 A pass that runs on a sandbox::Region. More...
class  RegionPassManager
class  RegionsFromBBs
class  RemoveFromParent
class  ResumeInst
class  ReturnInst
class  SandboxVectorizerPassBuilder
class  ScalableVectorType
class  SchedBundle
 The nodes that need to be scheduled back-to-back in a single scheduling cycle form a SchedBundle. More...
class  Scheduler
 The list scheduler. More...
class  SchedulerInternalsAttorney
 A client-attorney class for accessing the Scheduler's internals (used for unit tests). More...
class  ScoreBoard
class  SeedBundle
 A set of candidate Instructions for vectorizing together. More...
class  SeedCollection
 This pass collects the instructions that can become vectorization "seeds", like stores to consecutive memory addresses. More...
class  SeedCollector
class  SeedContainer
 Class to conveniently track Seeds within SeedBundles. More...
class  SelectInst
class  SExtInst
class  ShuffleMask
class  ShuffleVectorInst
class  ShuffleVectorSetMask
class  SingleLLVMInstructionImpl
 Instructions that contain a single LLVM Instruction can inherit from this. More...
class  SIToFPInst
class  StoreInst
class  StructType
class  SwitchAddCase
class  SwitchInst
class  SwitchRemoveCase
struct  ToStr
class  Tracker
 The tracker collects all the change objects and implements the main API for saving / reverting / accepting. More...
class  TransactionAcceptOrRevert
class  TransactionAlwaysAccept
class  TransactionAlwaysRevert
class  TransactionSave
class  TruncInst
class  Type
 Just like llvm::Type these are immutable, unique, never get freed and can only be created via static factory methods. More...
class  UIToFPInst
class  UnaryInstruction
 An abstract class, parent of unary instructions. More...
class  UnaryOperator
class  UndefValue
class  UnreachableInst
class  Use
 Represents a Def-use/Use-def edge in SandboxIR. More...
class  User
 A sandboxir::User has operands. More...
class  UserUseIterator
 Iterator for the Use edges of a Value's users. More...
class  UseSet
 Tracks the change of the source Value of a sandboxir::Use. More...
class  UseSwap
 Tracks swapping a Use with another Use. More...
class  Utils
class  VAArgInst
class  Value
 A SandboxIR Value has users. This is the base class. More...
class  VectorType
class  VecUtils
class  Widen
class  ZExtInst

Typedefs

using iterator = BBIterator
using StoreSeedBundle = MemSeedBundle<sandboxir::StoreInst>
using LoadSeedBundle = MemSeedBundle<sandboxir::LoadInst>

Enumerations

enum class  DGNodeID { DGNode , MemDGNode }
 SubclassIDs for isa/dyn_cast etc. More...
enum class  LegalityResultID {
  Pack , Widen , DiamondReuse , DiamondReuseWithShuffle ,
  DiamondReuseMultiInput
}
enum class  ResultReason {
  NotInstructions , DiffOpcodes , DiffTypes , DiffMathFlags ,
  DiffWrapFlags , DiffBBs , RepeatedInstrs , NotConsecutive ,
  CantSchedule , Unimplemented , Infeasible , ForcePackForDebugging
}
 The reason for vectorizing or not vectorizing. More...

Functions

 BasicBlock (llvm::BasicBlock *BB, Context &SBCtx)
 ~BasicBlock ()=default
static bool classof (const Value *From)
 For isa/dyn_cast.
LLVM_ABI FunctiongetParent () const
LLVM_ABI iterator begin () const
iterator end () const
std::reverse_iterator< iteratorrbegin () const
std::reverse_iterator< iteratorrend () const
ContextgetContext () const
LLVM_ABI InstructiongetTerminator () const
bool empty () const
LLVM_ABI Instructionfront () const
LLVM_ABI Instructionback () const
void verify () const final
void dumpOS (raw_ostream &OS) const final
static llvm::Instruction::CastOps getLLVMCastOp (Instruction::Opcode Opc)
static llvm::Instruction::UnaryOps getLLVMUnaryOp (Instruction::Opcode Opc)
 \Returns the LLVM opcode that corresponds to Opc.
static llvm::Instruction::BinaryOps getLLVMBinaryOp (Instruction::Opcode Opc)
 \Returns the LLVM opcode that corresponds to Opc.
static bool isOrdered (Instruction *I)
static SmallVector< Value *, 4 > getOperand (ArrayRef< Value * > Bndl, unsigned OpIdx)
static BasicBlock::iterator getInsertPointAfterInstrs (ArrayRef< Value * > Vals, BasicBlock *BB)
 \Returns the BB iterator after the lowest instruction in Vals, or the top of BB if no instruction found in Vals.
template<typename LoadOrStoreT>
static bool isValidMemSeed (LoadOrStoreT *LSI)
template bool isValidMemSeed< LoadInst > (LoadInst *LSI)
template bool isValidMemSeed< StoreInst > (StoreInst *LSI)
template<typename T>
static void dumpImpl (ArrayRef< T * > Bndl)

Variables

template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI< GlobalIFunc, llvm::GlobalIFunc, GlobalObject, llvm::GlobalObject >
template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI< Function, llvm::Function, GlobalObject, llvm::GlobalObject >
template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI< GlobalVariable, llvm::GlobalVariable, GlobalObject, llvm::GlobalObject >
template class LLVM_TEMPLATE_ABI GlobalWithNodeAPI< GlobalAlias, llvm::GlobalAlias, GlobalValue, llvm::GlobalValue >
template class LLVM_TEMPLATE_ABI Interval< MemDGNode >
template class LLVM_TEMPLATE_ABI Interval< Instruction >
static constexpr int MaxRegisteredCallbacks = 16
static cl::opt< unsignedSeedBundleSizeLimit ("sbvec-seed-bundle-size-limit", cl::init(32), cl::Hidden, cl::desc("Limit the size of the seed bundle to cap compilation time."))
static cl::opt< unsignedSeedGroupsLimit ("sbvec-seed-groups-limit", cl::init(256), cl::Hidden, cl::desc("Limit the number of collected seeds groups in a BB to " "cap compilation time."))

Typedef Documentation

◆ iterator

using llvm::sandboxir::iterator = BBIterator

Definition at line 87 of file BasicBlock.h.

◆ LoadSeedBundle

◆ StoreSeedBundle

Enumeration Type Documentation

◆ DGNodeID

enum class llvm::sandboxir::DGNodeID
strong

SubclassIDs for isa/dyn_cast etc.

Enumerator
DGNode 
MemDGNode 

Definition at line 40 of file DependencyGraph.h.

◆ LegalityResultID

Enumerator
Pack 
Widen 

Collect scalar values.

DiamondReuse 

Vectorize by combining scalars to a vector.

DiamondReuseWithShuffle 

Don't generate new code, reuse existing vector.

DiamondReuseMultiInput 

Reuse the existing vector but add a shuffle.

Definition at line 80 of file Legality.h.

◆ ResultReason

enum class llvm::sandboxir::ResultReason
strong

The reason for vectorizing or not vectorizing.

Enumerator
NotInstructions 
DiffOpcodes 
DiffTypes 
DiffMathFlags 
DiffWrapFlags 
DiffBBs 
RepeatedInstrs 
NotConsecutive 
CantSchedule 
Unimplemented 
Infeasible 
ForcePackForDebugging 

Definition at line 89 of file Legality.h.

Function Documentation

◆ back()

LLVM_ABI Instruction & llvm::sandboxir::back ( ) const

References LLVM_ABI.

◆ BasicBlock()

llvm::sandboxir::BasicBlock ( llvm::BasicBlock * BB,
Context & SBCtx )

Definition at line 75 of file BasicBlock.h.

References llvm::Block.

Referenced by llvm::sandboxir::SwitchInst::addCase(), llvm::sandboxir::CatchSwitchInst::addHandler(), llvm::sandboxir::PHINode::addIncoming(), llvm::sandboxir::BlockAddress::Context, llvm::sandboxir::CallBrInst::Context, llvm::sandboxir::CatchReturnInst::Context, llvm::sandboxir::CatchSwitchInst::Context, llvm::sandboxir::CleanupReturnInst::Context, llvm::sandboxir::InvokeInst::Context, llvm::sandboxir::BranchInst::create(), llvm::sandboxir::BranchInst::create(), llvm::sandboxir::CatchReturnInst::create(), llvm::sandboxir::CatchSwitchInst::create(), llvm::sandboxir::CleanupReturnInst::create(), llvm::sandboxir::InvokeInst::create(), llvm::sandboxir::SwitchInst::create(), llvm::sandboxir::Region::createRegionsFromMD(), llvm::sandboxir::SwitchInst::findCaseDest(), llvm::sandboxir::BlockAddress::get(), llvm::sandboxir::BlockAddress::get(), llvm::sandboxir::BlockAddress::getBasicBlock(), llvm::sandboxir::InsertPosition::getBasicBlock(), llvm::sandboxir::PHINode::getBasicBlockIndex(), llvm::sandboxir::CallBrInst::getDefaultDest(), llvm::sandboxir::SwitchInst::getDefaultDest(), llvm::sandboxir::PHINode::getIncomingBlock(), llvm::sandboxir::PHINode::getIncomingBlock(), llvm::sandboxir::PHINode::getIncomingValueForBlock(), llvm::sandboxir::CallBrInst::getIndirectDest(), getInsertPointAfterInstrs(), llvm::sandboxir::VecUtils::getLowest(), llvm::sandboxir::InvokeInst::getNormalDest(), llvm::sandboxir::Instruction::getParent(), llvm::sandboxir::BranchInst::getSuccessor(), llvm::sandboxir::CallBrInst::getSuccessor(), llvm::sandboxir::CatchReturnInst::getSuccessor(), llvm::sandboxir::CatchSwitchInst::getSuccessor(), llvm::sandboxir::InvokeInst::getSuccessor(), llvm::sandboxir::SwitchInst::getSuccessor(), llvm::sandboxir::CatchSwitchInst::getUnwindDest(), llvm::sandboxir::CleanupReturnInst::getUnwindDest(), llvm::sandboxir::InvokeInst::getUnwindDest(), llvm::sandboxir::Instruction::insertInto(), llvm::sandboxir::InsertPosition::InsertPosition(), llvm::sandboxir::BlockAddress::lookup(), llvm::sandboxir::Instruction::moveBefore(), llvm::sandboxir::PHINode::removeIncomingValue(), llvm::sandboxir::PHINode::replaceIncomingBlockWith(), llvm::sandboxir::RegionsFromBBs::runOnFunction(), llvm::sandboxir::PackReuse::runOnRegion(), llvm::sandboxir::Scheduler::SchedulerInternalsAttorney, llvm::sandboxir::SeedCollector::SeedCollector(), llvm::sandboxir::CallBrInst::setDefaultDest(), llvm::sandboxir::SwitchInst::setDefaultDest(), llvm::sandboxir::PHINode::setIncomingBlock(), llvm::sandboxir::CallBrInst::setIndirectDest(), llvm::sandboxir::InvokeInst::setNormalDest(), llvm::sandboxir::CatchReturnInst::setSuccessor(), llvm::sandboxir::CatchSwitchInst::setSuccessor(), llvm::sandboxir::InvokeInst::setSuccessor(), llvm::sandboxir::SwitchInst::setSuccessor(), llvm::sandboxir::CatchSwitchInst::setUnwindDest(), llvm::sandboxir::CleanupReturnInst::setUnwindDest(), and llvm::sandboxir::InvokeInst::setUnwindDest().

◆ begin()

LLVM_ABI iterator llvm::sandboxir::begin ( ) const

◆ classof()

bool llvm::sandboxir::classof ( const Value * From)
static

For isa/dyn_cast.

Definition at line 83 of file BasicBlock.h.

References llvm::sandboxir::Value::getSubclassID().

◆ dumpImpl()

template<typename T>
void llvm::sandboxir::dumpImpl ( ArrayRef< T * > Bndl)
static

◆ dumpOS()

void llvm::sandboxir::dumpOS ( raw_ostream & OS) const
final

References const, and dumpOS().

Referenced by llvm::sandboxir::Type::dump(), and dumpOS().

◆ empty()

bool llvm::sandboxir::empty ( ) const

◆ end()

iterator llvm::sandboxir::end ( ) const

Definition at line 89 of file BasicBlock.h.

References llvm::cast().

Referenced by empty(), and rbegin().

◆ front()

LLVM_ABI Instruction & llvm::sandboxir::front ( ) const

References LLVM_ABI.

◆ getContext()

◆ getInsertPointAfterInstrs()

BasicBlock::iterator llvm::sandboxir::getInsertPointAfterInstrs ( ArrayRef< Value * > Vals,
BasicBlock * BB )
static

\Returns the BB iterator after the lowest instruction in Vals, or the top of BB if no instruction found in Vals.

Definition at line 55 of file BottomUpVec.cpp.

References BasicBlock(), llvm::BasicBlock::begin(), llvm::BasicBlock::empty(), llvm::sandboxir::VecUtils::getLastPHIOrSelf(), and llvm::sandboxir::VecUtils::getLowest().

◆ getLLVMBinaryOp()

llvm::Instruction::BinaryOps llvm::sandboxir::getLLVMBinaryOp ( Instruction::Opcode Opc)
static

\Returns the LLVM opcode that corresponds to Opc.

Definition at line 1188 of file Instruction.cpp.

References Opc.

Referenced by llvm::sandboxir::BinaryOperator::create().

◆ getLLVMCastOp()

llvm::Instruction::CastOps llvm::sandboxir::getLLVMCastOp ( Instruction::Opcode Opc)
static

Definition at line 998 of file Instruction.cpp.

References Opc.

Referenced by llvm::sandboxir::CastInst::create().

◆ getLLVMUnaryOp()

llvm::Instruction::UnaryOps llvm::sandboxir::getLLVMUnaryOp ( Instruction::Opcode Opc)
static

\Returns the LLVM opcode that corresponds to Opc.

Definition at line 1036 of file Instruction.cpp.

References llvm_unreachable, and Opc.

Referenced by canUnwindPastLandingPad().

◆ getOperand()

◆ getParent()

LLVM_ABI Function * llvm::sandboxir::getParent ( ) const

References LLVM_ABI.

◆ getTerminator()

LLVM_ABI Instruction * llvm::sandboxir::getTerminator ( ) const

References LLVM_ABI.

◆ isOrdered()

◆ isValidMemSeed()

template<typename LoadOrStoreT>
bool llvm::sandboxir::isValidMemSeed ( LoadOrStoreT * LSI)
static

◆ isValidMemSeed< LoadInst >()

◆ isValidMemSeed< StoreInst >()

◆ rbegin()

std::reverse_iterator< iterator > llvm::sandboxir::rbegin ( ) const

Definition at line 93 of file BasicBlock.h.

References end().

◆ rend()

std::reverse_iterator< iterator > llvm::sandboxir::rend ( ) const

Definition at line 96 of file BasicBlock.h.

References begin().

◆ verify()

void llvm::sandboxir::verify ( ) const
final

References const.

◆ ~BasicBlock()

llvm::sandboxir::~BasicBlock ( )
default

Variable Documentation

◆ GlobalWithNodeAPI< Function, llvm::Function, GlobalObject, llvm::GlobalObject >

◆ GlobalWithNodeAPI< GlobalAlias, llvm::GlobalAlias, GlobalValue, llvm::GlobalValue >

◆ GlobalWithNodeAPI< GlobalIFunc, llvm::GlobalIFunc, GlobalObject, llvm::GlobalObject >

◆ GlobalWithNodeAPI< GlobalVariable, llvm::GlobalVariable, GlobalObject, llvm::GlobalObject >

◆ Interval< Instruction >

Definition at line 46 of file Interval.cpp.

◆ Interval< MemDGNode >

◆ MaxRegisteredCallbacks

◆ SeedBundleSizeLimit

cl::opt< unsigned > llvm::sandboxir::SeedBundleSizeLimit("sbvec-seed-bundle-size-limit", cl::init(32), cl::Hidden, cl::desc("Limit the size of the seed bundle to cap compilation time.")) ( "sbvec-seed-bundle-size-limit" ,
cl::init(32) ,
cl::Hidden ,
cl::desc("Limit the size of the seed bundle to cap compilation time.")  )
static

◆ SeedGroupsLimit

cl::opt< unsigned > llvm::sandboxir::SeedGroupsLimit("sbvec-seed-groups-limit", cl::init(256), cl::Hidden, cl::desc("Limit the number of collected seeds groups in a BB to " "cap compilation time.")) ( "sbvec-seed-groups-limit" ,
cl::init(256) ,
cl::Hidden ,
cl::desc("Limit the number of collected seeds groups in a BB to " "cap compilation time.")  )
static