31 struct NormalizeDenormalizeRewriter
48 NormalizeDenormalizeRewriter::visitAddRecExpr(
const SCEVAddRecExpr *AR) {
52 [&](
const SCEV *
Op) {
return visit(
Op); });
66 for (
int i = 0, e = Operands.
size() - 1; i < e; i++)
67 Operands[i] = SE.getAddExpr(Operands[i], Operands[i + 1]);
90 for (
int i = Operands.
size() - 2; i >= 0; i--)
91 Operands[i] = SE.getMinusSCEV(Operands[i], Operands[i + 1]);
103 return NormalizeDenormalizeRewriter(
Normalize, Pred, SE).visit(S);
108 return NormalizeDenormalizeRewriter(
Normalize, Pred, SE).visit(S);
117 return NormalizeDenormalizeRewriter(
Denormalize, Pred, SE).visit(S);
This class represents lattice values for constants.
const SCEV * normalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE)
Normalize S to be post-increment for all loops present in Loops.
The main scalar evolution driver.
An efficient, type-erasing, non-owning reference to a callable.
Normalize - Normalize according to the given loops.
const Loop * getLoop() const
Denormalize - Perform the inverse transform on the expression with the given loop set...
op_range operands() const
This node represents a polynomial recurrence on the trip count of the specified loop.
const SCEV * normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred, ScalarEvolution &SE)
Normalize S for all add recurrence sub-expressions for which Pred returns true.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
This class represents an analyzed expression in the program.
OutputIt transform(R &&Range, OutputIt d_first, UnaryPredicate P)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const SCEV * denormalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops, ScalarEvolution &SE)
Denormalize S to be post-increment for all loops present in Loops.
TransformKind
TransformKind - Different types of transformations that TransformForPostIncUse can do...
This visitor recursively visits a SCEV expression and re-writes it.