[PATCH] D79502: [mlir] Support partial folding of affine.min/max
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 11:19:57 PDT 2020
bondhugula added a comment.
> partially folds the affine map by lifting individual constant expression in it
Thanks for the detailed summary, but I'm sorry this part isn't clear. canonicalizeMapAndOperands does propagate constants from the operands into the maps. It isn't clear if you are doing the same or whether you are taking min/max over the subset of the results that are constant: for eg. `affine.min affine_map<(d0, d1, d2) -> (d0, d1, d2)> (2, 3, %N)` is `affine.min affine_map<(d0) -> (2, d0)> (%N)`. I don't see any test cases of the latter form - so didn't look at the code carefully.
================
Comment at: mlir/include/mlir/IR/AffineMap.h:147
+ /// Folds the constant operands into this affine map. Returns a new map, which
+ /// may be equal to the old map if no folding happened. Operands are allowed
----------------
By 'Folds', did you mean propagates?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79502/new/
https://reviews.llvm.org/D79502
More information about the llvm-commits
mailing list