31struct NormalizeDenormalizeRewriter
48NormalizeDenormalizeRewriter::visitAddRecExpr(
const SCEVAddRecExpr *AR) {
52 [&](
const SCEV *
Op) { return visit(Op); });
66 for (
int i = 0, e =
Operands.size() - 1; i < e; i++)
90 for (
int i =
Operands.size() - 2; i >= 0; i--)
100 bool CheckInvertible) {
106 const SCEV *Normalized =
107 NormalizeDenormalizeRewriter(
Normalize, Pred, SE).visit(S);
110 if (CheckInvertible && Denormalized != S)
117 return NormalizeDenormalizeRewriter(
Normalize, Pred, SE).visit(S);
128 return NormalizeDenormalizeRewriter(
Denormalize, Pred, SE).visit(S);
mir Rename Register Operands
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
TransformKind
TransformKind - Different types of transformations that TransformForPostIncUse can do.
@ Normalize
Normalize - Normalize according to the given loops.
@ Denormalize
Denormalize - Perform the inverse transform on the expression with the given loop set.
This class represents an Operation in the Expression.
This node represents a polynomial recurrence on the trip count of the specified loop.
const Loop * getLoop() const
ArrayRef< const SCEV * > operands() const
This visitor recursively visits a SCEV expression and re-writes it.
const SCEV * visitAddRecExpr(const SCEVAddRecExpr *Expr)
This class represents an analyzed expression in the program.
The main scalar evolution driver.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
const SCEV * denormalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE)
Denormalize S to be post-increment for all loops present in Loops.
const SCEV * normalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE, bool CheckInvertible=true)
Normalize S to be post-increment for all loops present in Loops.
const SCEV * normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred, ScalarEvolution &SE)
Normalize S for all add recurrence sub-expressions for which Pred returns true.