class SSAUpdaterBulk
Declaration
class SSAUpdaterBulk { /* full declaration omitted */ };
Description
Helper class for SSA formation on a set of values defined in multiple blocks. This is used when code duplication or another unstructured transformation wants to rewrite a set of uses of one value with uses of a set of values. The update is done only when RewriteAllUses is called, all other methods are used for book-keeping. That helps to share some common computations between updates of different uses (which is not the case when traditional SSAUpdater is used).
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:40
Method Overview
- public void AddAvailableValue(unsigned int Var, llvm::BasicBlock * BB, llvm::Value * V)
- public void AddUse(unsigned int Var, llvm::Use * U)
- public unsigned int AddVariable(llvm::StringRef Name, llvm::Type * Ty)
- public bool HasValueForBlock(unsigned int Var, llvm::BasicBlock * BB)
- public void RewriteAllUses(llvm::DominatorTree * DT, SmallVectorImpl<llvm::PHINode *> * InsertedPHIs = nullptr)
- public SSAUpdaterBulk()
- public SSAUpdaterBulk(const llvm::SSAUpdaterBulk &)
- public ~SSAUpdaterBulk()
Methods
¶void AddAvailableValue(unsigned int Var,
llvm::BasicBlock* BB,
llvm::Value* V)
void AddAvailableValue(unsigned int Var,
llvm::BasicBlock* BB,
llvm::Value* V)
Description
Indicate that a rewritten value is available in the specified block with the specified value.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:68
Parameters
- unsigned int Var
- llvm::BasicBlock* BB
- llvm::Value* V
¶void AddUse(unsigned int Var, llvm::Use* U)
void AddUse(unsigned int Var, llvm::Use* U)
Description
Record a use of the symbolic value. This use will be updated with a rewritten value when RewriteAllUses is called.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:72
Parameters
- unsigned int Var
- llvm::Use* U
¶unsigned int AddVariable(llvm::StringRef Name,
llvm::Type* Ty)
unsigned int AddVariable(llvm::StringRef Name,
llvm::Type* Ty)
Description
Add a new variable to the SSA rewriter. This needs to be called before AddAvailableValue or AddUse calls. The return value is the variable ID, which needs to be passed to AddAvailableValue and AddUse.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:64
Parameters
- llvm::StringRef Name
- llvm::Type* Ty
¶bool HasValueForBlock(unsigned int Var,
llvm::BasicBlock* BB)
bool HasValueForBlock(unsigned int Var,
llvm::BasicBlock* BB)
Description
Return true if the SSAUpdater already has a value for the specified variable in the specified block.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:76
Parameters
- unsigned int Var
- llvm::BasicBlock* BB
¶void RewriteAllUses(
llvm::DominatorTree* DT,
SmallVectorImpl<llvm::PHINode*>*
InsertedPHIs = nullptr)
void RewriteAllUses(
llvm::DominatorTree* DT,
SmallVectorImpl<llvm::PHINode*>*
InsertedPHIs = nullptr)
Description
Perform all the necessary updates, including new PHI-nodes insertion and the requested uses update. The function requires dominator tree DT, which is used for computing locations for new phi-nodes insertions. If a nonnull pointer to a vector InsertedPHIs is passed, all the new phi-nodes will be added to this vector.
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:85
Parameters
- llvm::DominatorTree* DT
- SmallVectorImpl<llvm::PHINode*>* InsertedPHIs = nullptr
¶SSAUpdaterBulk()
SSAUpdaterBulk()
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:56
¶SSAUpdaterBulk(const llvm::SSAUpdaterBulk&)
SSAUpdaterBulk(const llvm::SSAUpdaterBulk&)
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:57
Parameters
- const llvm::SSAUpdaterBulk&
¶~SSAUpdaterBulk()
~SSAUpdaterBulk()
Declared at: llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h:59