Helper class for SSA formation on a set of values defined in multiple blocks.

Synopsis

Declared in <llvm/Transforms/Utils/SSAUpdaterBulk.h>

class SSAUpdaterBulk;

Description

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).

Member Functions

Name

Description

SSAUpdaterBulk [constructor]

Constructors

~SSAUpdaterBulk [destructor]

Destructor

operator= [deleted]

Copy assignment operator

AddAvailableValue

Indicate that a rewritten value is available in the specified block with the specified value.

AddUse

Record a use of the symbolic value. This use will be updated with a rewritten value when RewriteAllUses is called.

AddVariable

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.

RewriteAllUses

Perform all the necessary updates, including new PHI‐nodes insertion and the requested uses update.

RewriteAndOptimizeAllUses

Rewrite all uses and simplify the inserted PHI nodes. Use this method to preserve behavior when replacing SSAUpdater.

Created with MrDocs