LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
llvm::LoadAndStorePromoter Class Reference

Helper class for promoting a collection of loads and stores into SSA Form using the SSAUpdater. More...

#include <SSAUpdater.h>

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

Public Member Functions

 LoadAndStorePromoter (const SmallVectorImpl< Instruction * > &Insts, SSAUpdater &S, StringRef Name=StringRef())
 
virtual ~LoadAndStorePromoter ()
 
void run (const SmallVectorImpl< Instruction * > &Insts) const
 This does the promotion. More...
 
virtual bool isInstInList (Instruction *I, const SmallVectorImpl< Instruction * > &Insts) const
 Return true if the specified instruction is in the Inst list. More...
 
virtual void doExtraRewritesBeforeFinalDeletion () const
 This hook is invoked after all the stores are found and inserted as available values. More...
 
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. More...
 
virtual void instructionDeleted (Instruction *I) const
 Called before each instruction is deleted. More...
 
virtual void updateDebugInfo (Instruction *I) const
 Called to update debug info associated with the instruction. More...
 

Protected Attributes

SSAUpdaterSSA
 

Detailed Description

Helper class for promoting 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 133 of file SSAUpdater.h.

Constructor & Destructor Documentation

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

Definition at line 139 of file SSAUpdater.h.

Member Function Documentation

virtual void llvm::LoadAndStorePromoter::doExtraRewritesBeforeFinalDeletion ( ) const
inlinevirtual

This hook is invoked after all the stores are found and inserted as available values.

Definition at line 158 of file SSAUpdater.h.

Referenced by run().

virtual void llvm::LoadAndStorePromoter::instructionDeleted ( Instruction I) const
inlinevirtual

Called before each instruction is deleted.

Definition at line 167 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.

The Insts list is the one passed into the constructor. Clients should implement this with a more efficient version if possible.

Definition at line 488 of file SSAUpdater.cpp.

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

Referenced by run().

virtual void llvm::LoadAndStorePromoter::replaceLoadWithValue ( LoadInst LI,
Value V 
) const
inlinevirtual

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

Definition at line 163 of file SSAUpdater.h.

Referenced by run().

void LoadAndStorePromoter::run ( const SmallVectorImpl< Instruction * > &  Insts) const
virtual void llvm::LoadAndStorePromoter::updateDebugInfo ( Instruction I) const
inlinevirtual

Called to update debug info associated with the instruction.

Definition at line 171 of file SSAUpdater.h.

Referenced by run().

Member Data Documentation

SSAUpdater& llvm::LoadAndStorePromoter::SSA
protected

Definition at line 135 of file SSAUpdater.h.

Referenced by LoadAndStorePromoter(), and run().


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