This class represents an analyzed expression in the program. These are opaque objects that the client is not allowed to do much with directly.

Synopsis

Declared in <llvm/Analysis/ScalarEvolution.h>

class SCEV
    : public FoldingSetNode

Base Classes

Name

Description

FoldingSetNode

Convenience alias for the base node type stored in a folding set.

Type Aliases

Name

Description

NoWrapFlags

SCEV no‐wrap flags; alias of SCEVNoWrapFlags.

Member Functions

Name

Description

SCEV [constructor] [deleted]

Deleted copy constructor.

SCEV [constructor]

Construct a SCEV of kind SCEVTy with interned ID ID.

operator= [deleted]

Deleted copy assignment.

computeAndSetCanonical

Compute and set the canonical SCEV, by constructing a SCEV with the same operands, but all SCEVUse flags dropped.

dump

This method is used for debugging.

getCanonical

Return the canonical SCEV.

getExpressionSize

Return the estimated size of this SCEV's expression tree.

getSCEVType

Return the SCEV opcode of this expression.

getType

Return the LLVM type of this SCEV expression.

isAllOnesValue

Return true if the expression is a constant all‐ones value.

isNonConstantNegative

Return true if the specified scev is negated, but not a constant.

isOne

Return true if the expression is a constant one.

isZero

Return true if the expression is a constant zero.

operands

Return operands of this SCEV expression.

print

Print this SCEV to OS.

Static Data Members

Name

Description

FlagAnyWrap

No wrap guarantee.

FlagNSW

No signed wrap.

FlagNUW

No unsigned wrap.

FlagNW

No self‐wrap.

NoWrapMask

Mask of all no‐wrap flag bits.

Protected Data Members

Name

Description

CanonicalSCEV

Pointer to the canonical version of the SCEV, i.e. one where all operands have no SCEVUse flags.

ExpressionSize

Estimated complexity of this node's expression tree size.

SubclassData

This field is initialized to zero and may be used in subclasses to store miscellaneous information.

Ty

Immutable type of the SCEV.

Friends

Name

Description

llvm::FoldingSetTrait<SCEV>

FoldingSetTrait specialization for SCEV using interned FastID.

Non-Member Functions

Name

Description

SCEVExprContains

Return true if any node in Root satisfies the predicate Pred.

cannotBeMaxInLoop

Returns true if S is defined and never is equal to signed/unsigned max.

cannotBeMinInLoop

Returns true if S is defined and never is equal to signed/unsigned min.

denormalizeForPostIncUse

Denormalize S to be post‐increment for all loops present in Loops.

getStartAndEndForAccess

Calculate Start and End points of memory access using exact backedge taken count BTC if computable or maximum backedge taken count MaxBTC otherwise.

getStartAndEndForAccess

Overload of getStartAndEndForAccess taking the element size as a SCEV.

isDereferenceableAndAlignedInLoop

Overload for isDereferenceableAndAlignedInLoop taking the pointer and access size directly as SCEVs.

isKnownNegativeInLoop

Returns true if we can prove that S is defined and always negative in loop L.

isKnownNonNegativeInLoop

Returns true if we can prove that S is defined and always non‐negative in loop L.

isKnownNonPositiveInLoop

Returns true if we can prove that S is defined and always non‐positive in loop L.

isKnownPositiveInLoop

Returns true if we can prove that S is defined and always positive in loop L.

normalizeForPostIncUse

Normalize S to be post‐increment for all loops present in Loops.

normalizeForPostIncUseIf

Normalize S for all add recurrence sub‐expressions for which Pred returns true.

replaceSymbolicStrideSCEV

Return the SCEV corresponding to a pointer with the symbolic stride replaced with constant one, assuming the SCEV predicate associated with PSE is true.

visitAll

Use SCEVTraversal to visit all nodes in the given expression tree.

SCEVPatternMatch::m_SCEV

Match a SCEV, capturing it if we match.

SCEVPatternMatch::m_scev_Specific

Match if we have a specific specified SCEV.

SCEVPatternMatch::match

Match SCEV S against pattern P.

Derived Classes

Name

Description

SCEVCastExpr

This is the base class for unary cast operator classes.

SCEVConstant

SCEV expression wrapping a constant integer value.

SCEVCouldNotCompute

Sentinel SCEV returned when a query cannot be answered.

SCEVNAryExpr

This node is a base class providing common functionality for n'ary operators.

SCEVUDivExpr

This class represents a binary unsigned division operation.

SCEVUnknown

SCEV expression for a value that ScalarEvolution cannot analyze further.

SCEVVScale

This class represents the value of vscale, as used when defining the length of a scalable vector or returned by the llvm.vscale() intrinsic.

Created with MrDocs