LLVM 18.0.0git
Public Member Functions | Friends | List of all members
llvm::sroa::AllocaSliceRewriter Class Reference

Visitor to rewrite instructions using p particular slice of an alloca to use a new alloca. More...

Inheritance diagram for llvm::sroa::AllocaSliceRewriter:
Inheritance graph

Public Member Functions

 AllocaSliceRewriter (const DataLayout &DL, AllocaSlices &AS, SROAPass &Pass, AllocaInst &OldAI, AllocaInst &NewAI, uint64_t NewAllocaBeginOffset, uint64_t NewAllocaEndOffset, bool IsIntegerPromotable, VectorType *PromotableVecTy, SmallSetVector< PHINode *, 8 > &PHIUsers, SmallSetVector< SelectInst *, 8 > &SelectUsers)
bool visit (AllocaSlices::const_iterator I)
- Public Member Functions inherited from llvm::InstVisitor< AllocaSliceRewriter, bool >
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)
bool visit (Instruction *I)
bool visit (Instruction &I)
void visitModule (Module &M)
void visitFunction (Function &F)
void visitBasicBlock (BasicBlock &BB)
bool visitICmpInst (ICmpInst &I)
bool visitFCmpInst (FCmpInst &I)
bool visitAllocaInst (AllocaInst &I)
bool visitLoadInst (LoadInst &I)
bool visitStoreInst (StoreInst &I)
bool visitAtomicCmpXchgInst (AtomicCmpXchgInst &I)
bool visitAtomicRMWInst (AtomicRMWInst &I)
bool visitFenceInst (FenceInst &I)
bool visitGetElementPtrInst (GetElementPtrInst &I)
bool visitPHINode (PHINode &I)
bool visitTruncInst (TruncInst &I)
bool visitZExtInst (ZExtInst &I)
bool visitSExtInst (SExtInst &I)
bool visitFPTruncInst (FPTruncInst &I)
bool visitFPExtInst (FPExtInst &I)
bool visitFPToUIInst (FPToUIInst &I)
bool visitFPToSIInst (FPToSIInst &I)
bool visitUIToFPInst (UIToFPInst &I)
bool visitSIToFPInst (SIToFPInst &I)
bool visitPtrToIntInst (PtrToIntInst &I)
bool visitIntToPtrInst (IntToPtrInst &I)
bool visitBitCastInst (BitCastInst &I)
bool visitAddrSpaceCastInst (AddrSpaceCastInst &I)
bool visitSelectInst (SelectInst &I)
bool visitVAArgInst (VAArgInst &I)
bool visitExtractElementInst (ExtractElementInst &I)
bool visitInsertElementInst (InsertElementInst &I)
bool visitShuffleVectorInst (ShuffleVectorInst &I)
bool visitExtractValueInst (ExtractValueInst &I)
bool visitInsertValueInst (InsertValueInst &I)
bool visitLandingPadInst (LandingPadInst &I)
bool visitFuncletPadInst (FuncletPadInst &I)
bool visitCleanupPadInst (CleanupPadInst &I)
bool visitCatchPadInst (CatchPadInst &I)
bool visitFreezeInst (FreezeInst &I)
bool visitDbgDeclareInst (DbgDeclareInst &I)
bool visitDbgValueInst (DbgValueInst &I)
bool visitDbgVariableIntrinsic (DbgVariableIntrinsic &I)
bool visitDbgLabelInst (DbgLabelInst &I)
bool visitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
bool visitMemSetInst (MemSetInst &I)
bool visitMemSetInlineInst (MemSetInlineInst &I)
bool visitMemCpyInst (MemCpyInst &I)
bool visitMemCpyInlineInst (MemCpyInlineInst &I)
bool visitMemMoveInst (MemMoveInst &I)
bool visitMemTransferInst (MemTransferInst &I)
bool visitMemIntrinsic (MemIntrinsic &I)
bool visitVAStartInst (VAStartInst &I)
bool visitVAEndInst (VAEndInst &I)
bool visitVACopyInst (VACopyInst &I)
bool visitIntrinsicInst (IntrinsicInst &I)
bool visitCallInst (CallInst &I)
bool visitInvokeInst (InvokeInst &I)
bool visitCallBrInst (CallBrInst &I)
bool visitReturnInst (ReturnInst &I)
bool visitBranchInst (BranchInst &I)
bool visitSwitchInst (SwitchInst &I)
bool visitIndirectBrInst (IndirectBrInst &I)
bool visitResumeInst (ResumeInst &I)
bool visitUnreachableInst (UnreachableInst &I)
bool visitCleanupReturnInst (CleanupReturnInst &I)
bool visitCatchReturnInst (CatchReturnInst &I)
bool visitCatchSwitchInst (CatchSwitchInst &I)
bool visitTerminator (Instruction &I)
bool visitCastInst (CastInst &I)
bool visitUnaryOperator (UnaryOperator &I)
bool visitBinaryOperator (BinaryOperator &I)
bool visitCmpInst (CmpInst &I)
bool visitUnaryInstruction (UnaryInstruction &I)
bool visitCallBase (CallBase &I)
void visitInstruction (Instruction &I)


class InstVisitor< AllocaSliceRewriter, bool >

Detailed Description

Visitor to rewrite instructions using p particular slice of an alloca to use a new alloca.

Also implements the rewriting to vector-based accesses when the partition passes the isVectorPromotionViable predicate. Most of the rewriting logic lives here.

Definition at line 2446 of file SROA.cpp.

Constructor & Destructor Documentation

◆ AllocaSliceRewriter()

llvm::sroa::AllocaSliceRewriter::AllocaSliceRewriter ( const DataLayout DL,
AllocaSlices AS,
SROAPass Pass,
AllocaInst OldAI,
AllocaInst NewAI,
uint64_t  NewAllocaBeginOffset,
uint64_t  NewAllocaEndOffset,
bool  IsIntegerPromotable,
VectorType PromotableVecTy,
SmallSetVector< PHINode *, 8 > &  PHIUsers,
SmallSetVector< SelectInst *, 8 > &  SelectUsers 

Definition at line 2513 of file SROA.cpp.

References assert(), and DL.

Member Function Documentation

◆ visit()

bool llvm::sroa::AllocaSliceRewriter::visit ( AllocaSlices::const_iterator  I)

Friends And Related Function Documentation

◆ InstVisitor< AllocaSliceRewriter, bool >

friend class InstVisitor< AllocaSliceRewriter, bool >

Definition at line 1280 of file SROA.cpp.

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