[PATCH] D72310: [mlir][VectorOps] Implement strided_slice conversion

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 17:50:37 PST 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/IR/Attributes.h:1453
+  using reference = UnderlyingTy;
+  explicit attr_value_iterator(ArrayAttr::iterator it)
+      : llvm::mapped_iterator<ArrayAttr::iterator, UnderlyingTy (*)(Attribute)>(
----------------
rriddle wrote:
> This needs more work. Will try to respond by end of day.
(sorry for the delay)

I would move the iterator, and anything related, to ArrayAttr itself. This is cluttering the global `mlir` namespace, which is something that we shouldn't do in general. I would imagine that we would have some 'get*<>' method on ArrayAttr that would hide this from the user(similarly to how we do for DenseElementsAttr). For the default behavior, many attributes already have a 'getValue' method which could be used directly. Otherwise, we could just return the derived attribute itself. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72310





More information about the llvm-commits mailing list