Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
BasicLoadAndStorePromoter Class Reference

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

Inheritance diagram for BasicLoadAndStorePromoter:
[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 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.

Additional Inherited Members

Protected Attributes inherited from llvm::LoadAndStorePromoter
SSAUpdaterSSA

Detailed Description

A basic LoadAndStorePromoter that does not remove store nodes.

Definition at line 5737 of file SROA.cpp.

Constructor & Destructor Documentation

◆ BasicLoadAndStorePromoter()

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

Definition at line 5739 of file SROA.cpp.

References llvm::LoadAndStorePromoter::LoadAndStorePromoter().

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

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

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

References I, and llvm::isa().


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