LLVM: BasicLoadAndStorePromoter Class Reference (original) (raw)

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

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.
Value * getValueToUseForAlloca (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 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.

A basic LoadAndStorePromoter that does not remove store nodes.

Definition at line 5784 of file SROA.cpp.

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 5793 of file SROA.cpp.

References llvm::UndefValue::get(), and I.

shouldDelete()

bool BasicLoadAndStorePromoter::shouldDelete ( Instruction * I) const inlineoverridevirtual

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