This class uses information about analyze scalars to rewrite expressions in canonical form.
Synopsis
Declared in <llvm/Transforms/Utils/ScalarEvolutionExpander.h>
class SCEVExpander
: public SCEVUseVisitor<SCEVExpander, Value*>
Description
Clients should create an instance of this class when rewriting is needed, and destroy it when finished to allow the release of the associated memory.
Base Classes
Name |
Description |
A visitor class for SCEVUse. |
Member Functions
Name |
Description |
|
Construct a SCEVExpander in "canonical" mode. |
|
Destroy the expander and assert that insert‐point guards were balanced. |
Set location information used by debugging information. |
|
Clear cached expansions and inserted‐value tracking. |
|
Clear the current insertion point. This is useful if the instruction that had been serving as the insertion point may have been deleted. |
|
Disable all post‐inc expansion. |
|
Disable the behavior of expanding expressions in canonical form rather than in a more literal form. Non‐canonical mode is useful for late optimization passes. |
|
Enable strength‐reduction mode for loop strength reduction. |
|
Remove inserted instructions that are dead, e.g. due to InstSimplifyFolder simplifications. |
|
|
|
Expand |
|
A specialized variant of expandCodeForPredicate, handling the case when we are expanding code for a SCEVComparePredicate. |
|
A specialized variant of expandCodeForPredicate, handling the case when we are expanding code for a SCEVUnionPredicate. |
|
A specialized variant of expandCodeForPredicate, handling the case when we are expanding code for a SCEVWrapPredicate. |
|
Returns a suitable insert point after |
|
Generates code that evaluates if the |
|
Return a vector containing all instructions inserted during expansion. |
|
Get location information used by debugging information. |
|
Return the induction variable increment's IV operand. |
|
Return the induction variables created during expansion. |
|
Return the ScalarEvolution instance used by this expander. |
|
Determine whether there is an existing expansion of S that can be reused. This is used to check whether S can be expanded cheaply. |
|
Hoist |
|
Return true for expressions that can't be evaluated at runtime within given Budget. |
|
Return true if the specified instruction was inserted by the code rewriter. |
|
Return true if |
|
Return true if |
|
replace congruent phis with their most canonical representative. Return the number of phis eliminated. |
|
Record |
|
Set the current IV increment loop and position. |
|
|
|
Enable post‐inc expansion for addrecs referring to the given loops. Post‐inc expansion is only supported in non‐canonical mode. |
|
Dispatch to the typed visit method for SCEVUse |
|
Default handler for SCEVCouldNotCompute uses; aborts on use. |
Static Member Functions
Name |
Description |
Return true if original and wide IV increments can share poison flags. |
|
Drop poison‐generating flags from |
|
Find an existing cast among |
Friends
Name |
Description |
A visitor class for SCEVUse. |
|
Helper to remove instructions inserted during SCEV expansion, unless they are marked as used. |
Created with MrDocs