[PATCH] D79815: [mlir] [VectorOps] Implement vector.constant_mask lowering to LLVM IR

Aart Bik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 11:57:49 PDT 2020


aartbik marked an inline comment as done.
aartbik added inline comments.
Herald added a subscriber: jurahul.


================
Comment at: mlir/lib/Dialect/Vector/VectorTransforms.cpp:1223
+        new_dim_sizes.push_back(dim_sizes[r].cast<IntegerAttr>().getInt());
+      trueVal = rewriter.create<vector::ConstantMaskOp>(
+          loc, lowType, rewriter.getI64ArrayAttr(new_dim_sizes));
----------------
ftynse wrote:
> aartbik wrote:
> > ftynse wrote:
> > > There is some mechanism a pattern can tell the conversion infra it creates operations that the same pattern can match again, but this iteration is finite. I suppose it's worth using even if the pattern seems to work as is.
> > Thanks, yes, I saw the recent developments on that (hasBoundedRewriteRecursion() right?). For the vector->vector progressive lowering, we use "applyPatternsAndFoldGreedily" so that it does not really matter, yet (other than of course making sure that the iteration terminates, for most cases by stripping of a rank or so). But it does not hurt to add, although probably in a new CL for all the rules in this file so far.
> Last time I looked at it `applyPatternsAndFoldGreedily` applied the same pattern no more than 10 times. We may want to remove or raise this bound if `hasBoundedRewriteRecursion` tells it's okay.
Ah, thanks for that background!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79815/new/

https://reviews.llvm.org/D79815





More information about the llvm-commits mailing list