LLVM 20.0.0git
Public Member Functions | List of all members
BasicLoadAndStorePromoter Class Reference

A basic LoadAndStorePromoter that does not remove store nodes. More...

Inheritance diagram for BasicLoadAndStorePromoter:
Inheritance graph
[legend]

Public Member Functions

 BasicLoadAndStorePromoter (ArrayRef< const Instruction * > Insts, SSAUpdater &S, Type *ZeroType)
 
bool shouldDelete (Instruction *I) const override
 Return false if a sub-class wants to keep one of the loads/stores after the SSA construction.
 
ValuegetValueToUseForAlloca (Instruction *I) const override
 Return the value to use for the point in the code that the alloca is positioned.
 
- Public Member Functions inherited from llvm::LoadAndStorePromoter
 LoadAndStorePromoter (ArrayRef< const Instruction * > Insts, SSAUpdater &S, StringRef Name=StringRef())
 
virtual ~LoadAndStorePromoter ()=default
 
void run (const SmallVectorImpl< Instruction * > &Insts)
 This does the promotion.
 
virtual bool isInstInList (Instruction *I, const SmallVectorImpl< Instruction * > &Insts) const
 Return true if the specified instruction is in the Inst list.
 
virtual void doExtraRewritesBeforeFinalDeletion ()
 This hook is invoked after all the stores are found and inserted as available values.
 
virtual void replaceLoadWithValue (LoadInst *LI, Value *V) const
 Clients can choose to implement this to get notified right before a load is RAUW'd another value.
 
virtual void instructionDeleted (Instruction *I) const
 Called before each instruction is deleted.
 
virtual void updateDebugInfo (Instruction *I) const
 Called to update debug info associated with the instruction.
 
virtual bool shouldDelete (Instruction *I) const
 Return false if a sub-class wants to keep one of the loads/stores after the SSA construction.
 
virtual ValuegetValueToUseForAlloca (Instruction *AI) const
 Return the value to use for the point in the code that the alloca is positioned.
 

Additional Inherited Members

- Protected Attributes inherited from llvm::LoadAndStorePromoter
SSAUpdaterSSA
 

Detailed Description

A basic LoadAndStorePromoter that does not remove store nodes.

Definition at line 5480 of file SROA.cpp.

Constructor & Destructor Documentation

◆ BasicLoadAndStorePromoter()

BasicLoadAndStorePromoter::BasicLoadAndStorePromoter ( ArrayRef< const Instruction * >  Insts,
SSAUpdater S,
Type ZeroType 
)
inline

Definition at line 5482 of file SROA.cpp.

Member Function Documentation

◆ getValueToUseForAlloca()

Value * BasicLoadAndStorePromoter::getValueToUseForAlloca ( Instruction AI) const
inlineoverridevirtual

Return the value to use for the point in the code that the alloca is positioned.

This will only be used if an Alloca is included in Insts, otherwise the value of a uninitialized load will be assumed to be poison.

Reimplemented from llvm::LoadAndStorePromoter.

Definition at line 5489 of file SROA.cpp.

References llvm::UndefValue::get().

◆ shouldDelete()

bool BasicLoadAndStorePromoter::shouldDelete ( Instruction I) const
inlineoverridevirtual

Return false if a sub-class wants to keep one of the loads/stores after the SSA construction.

Reimplemented from llvm::LoadAndStorePromoter.

Definition at line 5485 of file SROA.cpp.

References I.


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