class SCEVAddRecExpr
Declaration
class SCEVAddRecExpr : public SCEVNAryExpr { /* full declaration omitted */ };
Description
This node represents a polynomial recurrence on the trip count of the specified loop. This is the primary focus of the ScalarEvolution framework; all the other SCEV subclasses are mostly just supporting infrastructure to allow SCEVAddRecExpr expressions to be created and analyzed. All operands of an AddRec are required to be loop invariant.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:296
Inherits from: SCEVNAryExpr
Member Variables
Inherited from SCEVNAryExpr:
Inherited from SCEV:
Method Overview
- public static bool classof(const llvm::SCEV * S)
- public const llvm::SCEV * evaluateAtIteration(const llvm::SCEV * It, llvm::ScalarEvolution & SE) const
- public const llvm::Loop * getLoop() const
- public const llvm::SCEV * getNumIterationsInRange(const llvm::ConstantRange & Range, llvm::ScalarEvolution & SE) const
- public const llvm::SCEVAddRecExpr * getPostIncExpr(llvm::ScalarEvolution & SE) const
- public const llvm::SCEV * getStart() const
- public const llvm::SCEV * getStepRecurrence(llvm::ScalarEvolution & SE) const
- public bool isAffine() const
- public bool isQuadratic() const
- public void setNoWrapFlags(llvm::SCEV::NoWrapFlags Flags)
Inherited from SCEVNAryExpr:
- public classof
- public getNoWrapFlags
- public getNumOperands
- public getOperand
- public getType
- public hasNoSelfWrap
- public hasNoSignedWrap
- public hasNoUnsignedWrap
- public op_begin
- public op_end
- public operands
Inherited from SCEV:
- public dump
- public getExpressionSize
- public getSCEVType
- public getType
- public isAllOnesValue
- public isNonConstantNegative
- public isOne
- public isZero
- public print
Inherited from FoldingSetBase::Node:
Methods
¶static bool classof(const llvm::SCEV* S)
static bool classof(const llvm::SCEV* S)
Description
Methods for support type inquiry through isa, cast, and dyn_cast:
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:362
Parameters
- const llvm::SCEV* S
¶const llvm::SCEV* evaluateAtIteration(
const llvm::SCEV* It,
llvm::ScalarEvolution& SE) const
const llvm::SCEV* evaluateAtIteration(
const llvm::SCEV* It,
llvm::ScalarEvolution& SE) const
Description
Return the value of this chain of recurrences at the specified iteration number.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:346
Parameters
- const llvm::SCEV* It
- llvm::ScalarEvolution& SE
¶const llvm::Loop* getLoop() const
const llvm::Loop* getLoop() const
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:307
¶const llvm::SCEV* getNumIterationsInRange(
const llvm::ConstantRange& Range,
llvm::ScalarEvolution& SE) const
const llvm::SCEV* getNumIterationsInRange(
const llvm::ConstantRange& Range,
llvm::ScalarEvolution& SE) const
Description
Return the number of iterations of this loop that produce values in the specified constant range. Another way of looking at this is that it returns the first iteration number where the value is not in the condition, thus computing the exit count. If the iteration count can't be computed, an instance of SCEVCouldNotCompute is returned.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:354
Parameters
- const llvm::ConstantRange& Range
- llvm::ScalarEvolution& SE
¶const llvm::SCEVAddRecExpr* getPostIncExpr(
llvm::ScalarEvolution& SE) const
const llvm::SCEVAddRecExpr* getPostIncExpr(
llvm::ScalarEvolution& SE) const
Description
Return an expression representing the value of this expression one iteration of the loop ahead.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:359
Parameters
¶const llvm::SCEV* getStart() const
const llvm::SCEV* getStart() const
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:306
¶const llvm::SCEV* getStepRecurrence(
llvm::ScalarEvolution& SE) const
const llvm::SCEV* getStepRecurrence(
llvm::ScalarEvolution& SE) const
Description
Constructs and returns the recurrence indicating how much this expression steps by. If this is a polynomial of degree N, it returns a chrec of degree N-1. We cannot determine whether the step recurrence has self-wraparound.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:313
Parameters
¶bool isAffine() const
bool isAffine() const
Description
Return true if this represents an expression A + B*x where A and B are loop invariant values.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:322
¶bool isQuadratic() const
bool isQuadratic() const
Description
Return true if this represents an expression A + B*x + C*x^2 where A, B and C are loop invariant values. This corresponds to an addrec of the form {L,+,M,+,N}
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:331
¶void setNoWrapFlags(llvm::SCEV::NoWrapFlags Flags)
void setNoWrapFlags(llvm::SCEV::NoWrapFlags Flags)
Description
Set flags for a recurrence without clearing any previously set flags. For AddRec, either NUW or NSW implies NW. Keep track of this fact here to make it easier to propagate flags.
Declared at: llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h:338
Parameters
- llvm::SCEV::NoWrapFlags Flags