llvm-project/mlir/test/Transforms
Nicolas Vasilache 071ca8da91 Support composition of symbols in AffineApplyOp
This CL revisits the composition of AffineApplyOp for the special case where a symbol
itself comes from an AffineApplyOp.
This is achieved by rewriting such symbols into dims to allow composition to occur mathematically.
The implementation is also refactored to improve readability.

Rationale for locally rewriting symbols as dims:
================================================
The mathematical composition of AffineMap must always concatenate symbols
because it does not have enough information to do otherwise. For example,
composing `(d0)[s0] -> (d0 + s0)` with itself must produce
`(d0)[s0, s1] -> (d0 + s0 + s1)`.

The result is only equivalent to `(d0)[s0] -> (d0 + 2 * s0)` when
applied to the same mlir::Value* for both s0 and s1.
As a consequence mathematical composition of AffineMap always concatenates
symbols.

When AffineMaps are used in AffineApplyOp however, they may specify
composition via symbols, which is ambiguous mathematically. This corner case
is handled by locally rewriting such symbols that come from AffineApplyOp
into dims and composing through dims.

PiperOrigin-RevId: 239791597
2019-03-29 17:30:59 -07:00
..
Vectorize Support composition of symbols in AffineApplyOp 2019-03-29 17:30:59 -07:00
canonicalize.mlir Clean up some stray mlfunc/cfgfunc leftovers. 2019-03-29 17:13:26 -07:00
constant-fold.mlir Modify the canonicalizations of select and muli to use the fold hook. 2019-03-29 16:20:06 -07:00
cse.mlir Clean up some stray mlfunc/cfgfunc leftovers. 2019-03-29 17:13:26 -07:00
dma-generate.mlir Fix misc bugs / TODOs / other improvements to analysis utils 2019-03-29 17:15:27 -07:00
loop-fusion.mlir Use FlatAffineConstraints::unionBoundingBox to perform slice bounds union for loop fusion pass (WIP). 2019-03-29 16:59:21 -07:00
loop-tiling.mlir Add a basic model to set tile sizes + some cleanup 2019-03-29 17:06:51 -07:00
lower-affine.mlir Automated rollback of changelist 232728977. 2019-03-29 16:21:38 -07:00
memref-bound-check.mlir Fix misc bugs / TODOs / other improvements to analysis utils 2019-03-29 17:15:27 -07:00
memref-dataflow-opt.mlir Automated rollback of changelist 232717775. 2019-03-29 16:19:33 -07:00
memref-dependence-check.mlir Automated rollback of changelist 232728977. 2019-03-29 16:21:38 -07:00
parallelism-detection.mlir Change parallelism detection test pass to emit a note 2019-03-29 17:16:27 -07:00
pipeline-data-transfer.mlir Generate dealloc's for alloc's of pipeline-data-transfer 2019-03-29 16:25:53 -07:00
simplify-affine-structures.mlir Automated rollback of changelist 232728977. 2019-03-29 16:21:38 -07:00
slicing_utils.mlir Eliminate extfunc/cfgfunc/mlfunc as a concept, and just use 'func' instead. 2019-03-29 14:51:37 -07:00
strip-debuginfo.mlir Automated rollback of changelist 232728977. 2019-03-29 16:21:38 -07:00
unroll-jam.mlir Extend loop unrolling and unroll-jamming to non-matching bound operands and 2019-03-29 17:14:12 -07:00
unroll.mlir Support composition of symbols in AffineApplyOp 2019-03-29 17:30:59 -07:00