An interface layer with SCEV used to manage how we see SCEV expressions for values in the context of existing predicates. We can add new predicates, but we cannot remove them.
Synopsis
Declared in <llvm/Analysis/ScalarEvolution.h>
class PredicatedScalarEvolution;
Description
This layer has multiple purposes:
-
provides a simple interface for SCEV versioning.
-
guarantees that the order of transformations applied on a SCEV expression for a single Value is consistent across two different getSCEV calls. This means that, for example, once we've obtained an AddRec expression for a certain value through expression rewriting, we will continue to get an AddRec expression for that Value.
-
lowers the number of expression rewrites.
Member Functions
Name |
Description |
|
We need to explicitly define the copy constructor due to the ownership of the SCEVUnionPredicate Preds. |
Adds a new predicate. |
|
Adds all predicates in |
|
Check if |
|
Attempts to produce an AddRecExpr for V by adding additional SCEV predicates. If we can't transform the expression into an AddRecExpr we return nullptr and not add additional SCEV predicates to the current context. If |
|
Get the (predicated) backedge count for the analyzed loop. |
|
Returns the rewritten SCEV for |
|
Returns the SCEV expression of V, in the context of the current SCEV predicate. The order of transformations applied on the expression of V returned by ScalarEvolution is guaranteed to be preserved, even when adding new predicates. |
|
Returns the ScalarEvolution analysis used. |
|
Returns the upper bound of the loop trip count as a normal unsigned value, or 0 if the trip count is unknown. |
|
Get the (predicated) symbolic max backedge count for the analyzed loop. |
|
Returns true if we've statically proved that V doesn't wrap. |
|
Print the SCEV mappings done by the Predicated Scalar Evolution. The printed text is indented by |
Non-Member Functions
Name |
Description |
If the pointer has a constant stride return it in units of the access type size. If the pointer is loop‐invariant, return 0. Otherwise return std::nullopt. |
|
Overload of |
|
Return the SCEV corresponding to a pointer with the symbolic stride replaced with constant one, assuming the SCEV predicate associated with |
Created with MrDocs