LLVM API Documentation

Public Member Functions | Protected Attributes
llvm::LoadAndStorePromoter Class Reference

#include <SSAUpdater.h>

Collaboration diagram for llvm::LoadAndStorePromoter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LoadAndStorePromoter (const SmallVectorImpl< Instruction * > &Insts, SSAUpdater &S, StringRef Name=StringRef())
virtual ~LoadAndStorePromoter ()
void run (const SmallVectorImpl< Instruction * > &Insts) const
virtual bool isInstInList (Instruction *I, const SmallVectorImpl< Instruction * > &Insts) const
virtual void doExtraRewritesBeforeFinalDeletion () const
virtual void replaceLoadWithValue (LoadInst *LI, Value *V) const
virtual void instructionDeleted (Instruction *I) const
 This is called before each instruction is deleted.
virtual void updateDebugInfo (Instruction *I) const

Protected Attributes

SSAUpdaterSSA

Detailed Description

LoadAndStorePromoter - This little helper class provides a convenient way to promote a collection of loads and stores into SSA Form using the SSAUpdater. This handles complexities that SSAUpdater doesn't, such as multiple loads and stores in one block.

Clients of this class are expected to subclass this and implement the virtual methods.

Definition at line 125 of file SSAUpdater.h.


Constructor & Destructor Documentation

LoadAndStorePromoter::LoadAndStorePromoter ( const SmallVectorImpl< Instruction * > &  Insts,
SSAUpdater S,
StringRef  Name = StringRef() 
)
virtual llvm::LoadAndStorePromoter::~LoadAndStorePromoter ( ) [inline, virtual]

Definition at line 131 of file SSAUpdater.h.


Member Function Documentation

virtual void llvm::LoadAndStorePromoter::doExtraRewritesBeforeFinalDeletion ( ) const [inline, virtual]

doExtraRewritesBeforeFinalDeletion - This hook is invoked after all the stores are found and inserted as available values, but

Definition at line 147 of file SSAUpdater.h.

Referenced by run().

virtual void llvm::LoadAndStorePromoter::instructionDeleted ( Instruction I) const [inline, virtual]

This is called before each instruction is deleted.

Definition at line 156 of file SSAUpdater.h.

Referenced by run().

bool LoadAndStorePromoter::isInstInList ( Instruction I,
const SmallVectorImpl< Instruction * > &  Insts 
) const [virtual]

Return true if the specified instruction is in the Inst list (which was passed into the run method). Clients should implement this with a more efficient version if possible.

Definition at line 526 of file SSAUpdater.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), and I.

Referenced by run().

virtual void llvm::LoadAndStorePromoter::replaceLoadWithValue ( LoadInst LI,
Value V 
) const [inline, virtual]

replaceLoadWithValue - Clients can choose to implement this to get notified right before a load is RAUW'd another value.

Definition at line 152 of file SSAUpdater.h.

Referenced by run().

void LoadAndStorePromoter::run ( const SmallVectorImpl< Instruction * > &  Insts) const
virtual void llvm::LoadAndStorePromoter::updateDebugInfo ( Instruction I) const [inline, virtual]

updateDebugInfo - This is called to update debug info associated with the instruction.

Definition at line 161 of file SSAUpdater.h.

Referenced by run().


Member Data Documentation

Definition at line 127 of file SSAUpdater.h.

Referenced by LoadAndStorePromoter(), and run().


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