LLVM  8.0.1
Public Member Functions | Friends | List of all members
AllocaSlices::SliceBuilder Class Reference

Builder for the alloca slices. More...

Inheritance diagram for AllocaSlices::SliceBuilder:
Inheritance graph
[legend]
Collaboration diagram for AllocaSlices::SliceBuilder:
Collaboration graph
[legend]

Public Member Functions

 SliceBuilder (const DataLayout &DL, AllocaInst &AI, AllocaSlices &AS)
 
- Public Member Functions inherited from llvm::PtrUseVisitor< SliceBuilder >
 PtrUseVisitor (const DataLayout &DL)
 
PtrInfo visitPtr (Instruction &I)
 Recursively visit the uses of the given pointer. More...
 

Friends

class PtrUseVisitor< SliceBuilder >
 
class InstVisitor< SliceBuilder >
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::PtrUseVisitor< SliceBuilder >
void visitStoreInst (StoreInst &SI)
 
void visitBitCastInst (BitCastInst &BC)
 
void visitPtrToIntInst (PtrToIntInst &I)
 
void visitGetElementPtrInst (GetElementPtrInst &GEPI)
 
void visitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
 
void visitMemIntrinsic (MemIntrinsic &I)
 
void visitIntrinsicInst (IntrinsicInst &II)
 
void visitCallSite (CallSite CS)
 
- Protected Member Functions inherited from llvm::InstVisitor< SliceBuilder >
void visit (Iterator Start, Iterator End)
 
void visit (Module &M)
 
void visit (Function &F)
 
void visit (BasicBlock &BB)
 
void visit (Module *M)
 
void visit (Function *F)
 
void visit (BasicBlock *BB)
 
void visit (Instruction *I)
 
void visit (Instruction &I)
 
void visitModule (Module &M)
 
void visitFunction (Function &F)
 
void visitBasicBlock (BasicBlock &BB)
 
void visitICmpInst (ICmpInst &I)
 
void visitFCmpInst (FCmpInst &I)
 
void visitAllocaInst (AllocaInst &I)
 
void visitLoadInst (LoadInst &I)
 
void visitStoreInst (StoreInst &I)
 
void visitAtomicCmpXchgInst (AtomicCmpXchgInst &I)
 
void visitAtomicRMWInst (AtomicRMWInst &I)
 
void visitFenceInst (FenceInst &I)
 
void visitGetElementPtrInst (GetElementPtrInst &I)
 
void visitPHINode (PHINode &I)
 
void visitTruncInst (TruncInst &I)
 
void visitZExtInst (ZExtInst &I)
 
void visitSExtInst (SExtInst &I)
 
void visitFPTruncInst (FPTruncInst &I)
 
void visitFPExtInst (FPExtInst &I)
 
void visitFPToUIInst (FPToUIInst &I)
 
void visitFPToSIInst (FPToSIInst &I)
 
void visitUIToFPInst (UIToFPInst &I)
 
void visitSIToFPInst (SIToFPInst &I)
 
void visitPtrToIntInst (PtrToIntInst &I)
 
void visitIntToPtrInst (IntToPtrInst &I)
 
void visitBitCastInst (BitCastInst &I)
 
void visitAddrSpaceCastInst (AddrSpaceCastInst &I)
 
void visitSelectInst (SelectInst &I)
 
void visitVAArgInst (VAArgInst &I)
 
void visitExtractElementInst (ExtractElementInst &I)
 
void visitInsertElementInst (InsertElementInst &I)
 
void visitShuffleVectorInst (ShuffleVectorInst &I)
 
void visitExtractValueInst (ExtractValueInst &I)
 
void visitInsertValueInst (InsertValueInst &I)
 
void visitLandingPadInst (LandingPadInst &I)
 
void visitFuncletPadInst (FuncletPadInst &I)
 
void visitCleanupPadInst (CleanupPadInst &I)
 
void visitCatchPadInst (CatchPadInst &I)
 
void visitDbgDeclareInst (DbgDeclareInst &I)
 
void visitDbgValueInst (DbgValueInst &I)
 
void visitDbgVariableIntrinsic (DbgVariableIntrinsic &I)
 
void visitDbgLabelInst (DbgLabelInst &I)
 
void visitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
 
void visitMemSetInst (MemSetInst &I)
 
void visitMemCpyInst (MemCpyInst &I)
 
void visitMemMoveInst (MemMoveInst &I)
 
void visitMemTransferInst (MemTransferInst &I)
 
void visitMemIntrinsic (MemIntrinsic &I)
 
void visitVAStartInst (VAStartInst &I)
 
void visitVAEndInst (VAEndInst &I)
 
void visitVACopyInst (VACopyInst &I)
 
void visitIntrinsicInst (IntrinsicInst &I)
 
void visitCallInst (CallInst &I)
 
void visitInvokeInst (InvokeInst &I)
 
void visitReturnInst (ReturnInst &I)
 
void visitBranchInst (BranchInst &I)
 
void visitSwitchInst (SwitchInst &I)
 
void visitIndirectBrInst (IndirectBrInst &I)
 
void visitResumeInst (ResumeInst &I)
 
void visitUnreachableInst (UnreachableInst &I)
 
void visitCleanupReturnInst (CleanupReturnInst &I)
 
void visitCatchReturnInst (CatchReturnInst &I)
 
void visitCatchSwitchInst (CatchSwitchInst &I)
 
void visitTerminator (Instruction &I)
 
void visitCastInst (CastInst &I)
 
void visitUnaryOperator (UnaryOperator &I)
 
void visitBinaryOperator (BinaryOperator &I)
 
void visitCmpInst (CmpInst &I)
 
void visitUnaryInstruction (UnaryInstruction &I)
 
void visitCallBase (CallBase &I)
 
void visitCallSite (CallSite CS)
 
void visitInstruction (Instruction &I)
 
- Protected Member Functions inherited from llvm::detail::PtrUseVisitorBase
 PtrUseVisitorBase (const DataLayout &DL)
 Note that the constructor is protected because this class must be a base class, we can't create instances directly of this class. More...
 
void enqueueUsers (Instruction &I)
 Enqueue the users of this instruction in the visit worklist. More...
 
bool adjustOffsetForGEP (GetElementPtrInst &GEPI)
 Walk the operands of a GEP and adjust the offset as appropriate. More...
 
- Protected Attributes inherited from llvm::detail::PtrUseVisitorBase
const DataLayoutDL
 
PtrInfo PI
 The info collected about the pointer being visited thus far. More...
 
SmallVector< UseToVisit, 8 > Worklist
 The worklist of to-visit uses. More...
 
SmallPtrSet< Use *, 8 > VisitedUses
 A set of visited uses to break cycles in unreachable code. More...
 
UseU
 The use currently being visited. More...
 
bool IsOffsetKnown
 True if we have a known constant offset for the use currently being visited. More...
 
APInt Offset
 The constant offset of the use if that is known. More...
 

Detailed Description

Builder for the alloca slices.

This class builds a set of alloca slices by recursively visiting the uses of an alloca and making a slice for each load and store at each offset.

Definition at line 655 of file SROA.cpp.

Constructor & Destructor Documentation

◆ SliceBuilder()

AllocaSlices::SliceBuilder::SliceBuilder ( const DataLayout DL,
AllocaInst AI,
AllocaSlices AS 
)
inline

Definition at line 671 of file SROA.cpp.

References llvm::sroa::AllocaSlices::AllocaSlices(), assert(), llvm::sys::path::begin(), llvm::SmallPtrSetImpl< PtrType >::count(), llvm::count(), llvm::dbgs(), llvm::sroa::AllocaSlices::dump(), llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::sys::path::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), foldPHINodeOrSelectInst(), GEP, llvm::gep_type_begin(), llvm::gep_type_end(), llvm::detail::PtrUseVisitorBase::PtrInfo::getAbortingInst(), llvm::CallBase::getArgOperand(), llvm::APInt::getBitWidth(), llvm::Module::getDataLayout(), llvm::StructLayout::getElementOffset(), llvm::detail::PtrUseVisitorBase::PtrInfo::getEscapingInst(), llvm::MemIntrinsicBase< Derived >::getLength(), llvm::ConstantInt::getLimitedValue(), llvm::APInt::getLimitedValue(), llvm::Instruction::getModule(), llvm::User::getOperand(), llvm::MemIntrinsicBase< Derived >::getRawDest(), llvm::MemTransferBase< BaseCL >::getRawSource(), llvm::DataLayout::getStructLayout(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), llvm::ConstantInt::getValue(), llvm::StoreInst::getValueOperand(), llvm::ConstantInt::getZExtValue(), llvm::APInt::getZExtValue(), I, Indent, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::detail::PtrUseVisitorBase::PtrInfo::isAborted(), llvm::detail::PtrUseVisitorBase::PtrInfo::isEscaped(), llvm::GetElementPtrInst::isInBounds(), llvm::Type::isIntegerTy(), llvm::Instruction::isLifetimeStartOrEnd(), llvm::LoadInst::isSimple(), llvm::StoreInst::isSimple(), llvm::Type::isSingleValueType(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile, llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::MemIntrinsic::isVolatile(), LLVM_DEBUG, LLVM_DUMP_METHOD, llvm::max(), now(), llvm::SmallVectorImpl< T >::pop_back_val(), print(), llvm::sroa::AllocaSlices::print(), llvm::sroa::AllocaSlices::printSlice(), llvm::sroa::AllocaSlices::printUse(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::remove_if(), llvm::APInt::sextOrTrunc(), SI, Size, llvm::SmallVectorBase::size(), llvm::sort(), SROARandomShuffleSlices, SROAStrictInbounds, llvm::APInt::uge(), llvm::APInt::ugt(), llvm::Value::use_empty(), llvm::Value::users(), and llvm::PtrUseVisitor< DerivedT >::visitPtr().

Friends And Related Function Documentation

◆ InstVisitor< SliceBuilder >

friend class InstVisitor< SliceBuilder >
friend

Definition at line 657 of file SROA.cpp.

◆ PtrUseVisitor< SliceBuilder >

friend class PtrUseVisitor< SliceBuilder >
friend

Definition at line 656 of file SROA.cpp.


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