HomePhabricator

[mlir] Support partial folding of affine.min/max

Authored by ftynse on May 7 2020, 3:29 AM.

Description

[mlir] Support partial folding of affine.min/max

Originally, these operations were folded only if all expressions in their
affine maps could be folded to a constant expression that can be then subject
to numeric min/max computation. This introduces a more advanced version that
partially folds the affine map by lifting individual constant expression in it
even if some of the expressions remain variable. The folding can update the
operation in place to use a simpler map. Note that this is not as powerful as
canonicalization, in particular this does not remove dimensions or symbols that
became useless. This allows for better composition of Linalg tiling and
promotion transformation, where the latter can handle some canonical forms of
affine.min that the folding can now produce.

Differential Revision: https://reviews.llvm.org/D79502

Details

Committed
ftynseMay 7 2020, 3:30 AM
Differential Revision
D79502: [mlir] Support partial folding of affine.min/max
Parents
rG717bef662329: [clangd] Preserve line information while build PreamblePatch
Branches
Unknown
Tags
Unknown