[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
Loading
Please sign in to comment