diff options
author | Alex Zinenko <zinenko@google.com> | 2022-07-08 15:46:10 +0000 |
---|---|---|
committer | Alex Zinenko <zinenko@google.com> | 2022-07-12 15:06:55 +0000 |
commit | a5c802a429e2746c3d5190b2f3ed781911c62ed8 (patch) | |
tree | 35494b7c1fee8e643bafc5b802ad2d9f765389b8 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | d489268392d231492827c5b0a3be88b707e1fd31 (diff) | |
download | llvm-a5c802a429e2746c3d5190b2f3ed781911c62ed8.zip llvm-a5c802a429e2746c3d5190b2f3ed781911c62ed8.tar.gz llvm-a5c802a429e2746c3d5190b2f3ed781911c62ed8.tar.bz2 |
[mlir] fold more eagerly in structured op splitting
Existing implementation of structured op splitting creates several
affine.apply and affine.min operations in its subshape computation.
As these shapes are further used in data slice extraction, this may lead
to slice shapes being dynamic even when the original shapes and the
splitting point are static. This is particularly visible when splitting
is combined with further subsetting transformations such as tiling. Use
composition and folding more aggressively in splitting to avoid this.
In particular, introduce a `createComposedAffineMin` function that the
affine map used in "min" with the maps used by any `affine.apply` that
may be feeding the operands to the "min". This enables production of
more static shapes. Also introduce a `createComposedFoldedAffineApply`
function that combines the existing `createComposedAffineApply` with
in-place folding to propagate constants produced by zero-input affine
maps. Using these when splitting allows the subsequent canonicalizer
pass to recover static shapes for structured ops.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D129379
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions