class LoadAndStorePromoter
Declaration
class LoadAndStorePromoter { /* full declaration omitted */ };
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.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:136
Member Variables
- protected llvm::SSAUpdater& SSA
Method Overview
- public LoadAndStorePromoter(ArrayRef<const llvm::Instruction *> Insts, llvm::SSAUpdater & S, llvm::StringRef Name = llvm::StringRef())
- public virtual void doExtraRewritesBeforeFinalDeletion()
- public virtual void instructionDeleted(llvm::Instruction * I) const
- public virtual bool isInstInList(llvm::Instruction * I, const SmallVectorImpl<llvm::Instruction *> & Insts) const
- public virtual void replaceLoadWithValue(llvm::LoadInst * LI, llvm::Value * V) const
- public void run(const SmallVectorImpl<llvm::Instruction *> & Insts)
- public virtual void updateDebugInfo(llvm::Instruction * I) const
- public virtual ~LoadAndStorePromoter()
Methods
¶LoadAndStorePromoter(
ArrayRef<const llvm::Instruction*> Insts,
llvm::SSAUpdater& S,
llvm::StringRef Name = llvm::StringRef())
LoadAndStorePromoter(
ArrayRef<const llvm::Instruction*> Insts,
llvm::SSAUpdater& S,
llvm::StringRef Name = llvm::StringRef())
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:141
Parameters
- ArrayRef<const llvm::Instruction*> Insts
- llvm::SSAUpdater& S
- llvm::StringRef Name = llvm::StringRef()
¶virtual void doExtraRewritesBeforeFinalDeletion()
virtual void doExtraRewritesBeforeFinalDeletion()
Description
This hook is invoked after all the stores are found and inserted as available values.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:161
¶virtual void instructionDeleted(
llvm::Instruction* I) const
virtual void instructionDeleted(
llvm::Instruction* I) const
Description
Called before each instruction is deleted.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:168
Parameters
¶virtual bool isInstInList(
llvm::Instruction* I,
const SmallVectorImpl<llvm::Instruction*>&
Insts) const
virtual bool isInstInList(
llvm::Instruction* I,
const SmallVectorImpl<llvm::Instruction*>&
Insts) const
Description
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.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:156
Parameters
- llvm::Instruction* I
- const SmallVectorImpl<llvm::Instruction*>& Insts
¶virtual void replaceLoadWithValue(
llvm::LoadInst* LI,
llvm::Value* V) const
virtual void replaceLoadWithValue(
llvm::LoadInst* LI,
llvm::Value* V) const
Description
Clients can choose to implement this to get notified right before a load is RAUW'd another value.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:165
Parameters
- llvm::LoadInst* LI
- llvm::Value* V
¶void run(
const SmallVectorImpl<llvm::Instruction*>&
Insts)
void run(
const SmallVectorImpl<llvm::Instruction*>&
Insts)
Description
This does the promotion. Insts is a list of loads and stores to promote, and Name is the basename for the PHIs to insert. After this is complete, the loads and stores are removed from the code.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:150
Parameters
- const SmallVectorImpl<llvm::Instruction*>& Insts
¶virtual void updateDebugInfo(
llvm::Instruction* I) const
virtual void updateDebugInfo(
llvm::Instruction* I) const
Description
Called to update debug info associated with the instruction.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:171
Parameters
¶virtual ~LoadAndStorePromoter()
virtual ~LoadAndStorePromoter()
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdater.h:143