|
Enzyme main
|
Replace every non-affine recurrence (of degree at most three) inside an expression by its closed form in the canonical induction variable of its loop, treated as an opaque value. More...


Public Member Functions | |
| NonAffineClosedFormRewriter (ScalarEvolution &SE) | |
| const SCEV * | visitAddRecExpr (const SCEVAddRecExpr *AR) |
Replace every non-affine recurrence (of degree at most three) inside an expression by its closed form in the canonical induction variable of its loop, treated as an opaque value.
SCEVExpander expands a recurrence with more than two operands literally, as nested loop-carried phis (it would otherwise need a canonical IV one bit wider than the value). Such a phi is as impossible to recompute in the reverse pass as the accumulator it came from, so e.g. the start value i*(2*d-i-1)/2 of an inner index, expanded while rewriting the inner phi, would leave acc += 2*d-1-2*i in the outer loop and get cached once per iteration. evaluateAtIterationWithoutExt needs no wider type, so it can take the case the expander declines.
Definition at line 228 of file CacheUtility.cpp.
|
inline |
Definition at line 230 of file CacheUtility.cpp.
|
inline |
Definition at line 232 of file CacheUtility.cpp.
References evaluateAtIterationWithoutExt().